Connecting Tech Pros Worldwide Forums | Help | Site Map

How to wake up an asynchroneous process ?

=?Utf-8?B?R2lsYmVydCBUb3JkZXVy?=
Guest
 
Posts: n/a
#1: Sep 21 '08
Context : Windows Server 2003, IIS 6, VB 2008

My asp.net application A stores data in an SQL 2000 database. My application
B (on the same server but under a different userid - not ASPNET) reads these
data, does its job (big load, low priority) and updates the database. A does
not wait any answer nor acknowledgement from B.

Questions :
1) I think B can be a console application, am I right ?
2) How can A wake up B when A has stored data for B in the database ?
3) How can B wait when it has completed a task, until A wakes it up ?

Thank you,
Gilbert

=?Utf-8?B?SkI=?=
Guest
 
Posts: n/a
#2: Sep 21 '08

re: How to wake up an asynchroneous process ?


One thought would be to add a table to the database containing a single row
with two columns. Col1 is the last datetime that A updated the data and Col2
is last datetime that B did its thing. When A updates the data, it updates
the Col1 date. B then checks the dates and if col2 date is earlier than Col1
datetime, it does its work and finishes by updating Col1. B could be any
sort of app that runs on a timer, e.g. a .net app using a form timer or an
app using a thread with a sleep that times out. When the "timer" event is
raised, B checks the dates and either goes to work or goes back to sleep.
--
JB


"Gilbert Tordeur" wrote:
Quote:
Context : Windows Server 2003, IIS 6, VB 2008
>
My asp.net application A stores data in an SQL 2000 database. My application
B (on the same server but under a different userid - not ASPNET) reads these
data, does its job (big load, low priority) and updates the database. A does
not wait any answer nor acknowledgement from B.
>
Questions :
1) I think B can be a console application, am I right ?
2) How can A wake up B when A has stored data for B in the database ?
3) How can B wait when it has completed a task, until A wakes it up ?
>
Thank you,
Gilbert
Family Tree Mike
Guest
 
Posts: n/a
#3: Sep 22 '08

re: How to wake up an asynchroneous process ?


1) My feeling is B should be a service so that it is not dependent on a
logged in user. The ASP activity from A may occur when there is no active
login, correct?

2) A should not "wake up" B, but B should periodically poll the data. By
the nature of your setup there is some latency for the "B" operation,
meaning it is not as immediate as A doing the store. Therefore if the timer
in the service fires every N Insert_Your_Favorite_Time_Units, then things
should be fine.

3) As I think things should be set up, this question is moot.

"Gilbert Tordeur" <GilbertTordeur@discussions.microsoft.comwrote in
message news:9854ECDE-6BC3-4093-99EB-7926F5F7A0CB@microsoft.com...
Quote:
Context : Windows Server 2003, IIS 6, VB 2008
>
My asp.net application A stores data in an SQL 2000 database. My
application
B (on the same server but under a different userid - not ASPNET) reads
these
data, does its job (big load, low priority) and updates the database. A
does
not wait any answer nor acknowledgement from B.
>
Questions :
1) I think B can be a console application, am I right ?
2) How can A wake up B when A has stored data for B in the database ?
3) How can B wait when it has completed a task, until A wakes it up ?
>
Thank you,
Gilbert
Gilbert Tordeur
Guest
 
Posts: n/a
#4: Sep 22 '08

re: How to wake up an asynchroneous process ?


JB and Mike, thank you.
Gilbert

"Gilbert Tordeur" <GilbertTordeur@discussions.microsoft.coma écrit dans le
message de news: 9854ECDE-6BC3-4093-99EB-7926F5F7A0CB@microsoft.com...
Quote:
Context : Windows Server 2003, IIS 6, VB 2008
>
My asp.net application A stores data in an SQL 2000 database. My
application
B (on the same server but under a different userid - not ASPNET) reads
these
data, does its job (big load, low priority) and updates the database. A
does
not wait any answer nor acknowledgement from B.
>
Questions :
1) I think B can be a console application, am I right ?
2) How can A wake up B when A has stored data for B in the database ?
3) How can B wait when it has completed a task, until A wakes it up ?
>
Thank you,
Gilbert

Closed Thread