473,749 Members | 2,626 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to wake up an asynchroneous process ?

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
Sep 21 '08 #1
3 1411
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:
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
Sep 21 '08 #2
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_Fav orite_Time_Unit s, then things
should be fine.

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

"Gilbert Tordeur" <Gi************ @discussions.mi crosoft.comwrot e in
message news:98******** *************** ***********@mic rosoft.com...
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
Sep 21 '08 #3
JB and Mike, thank you.
Gilbert

"Gilbert Tordeur" <Gi************ @discussions.mi crosoft.coma écrit dans le
message de news: 98************* *************** **...icrosof t.com...
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

Sep 22 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1787
by: The New Celibacy | last post by:
I go to bed at night, leaving XP running, and my Internet connection is dropped when I wake up. I go to bed at night, leaving Suse Linux running. I wake up in the morning, and it's still connected.
17
5671
by: Benny Raymond | last post by:
I have a thread that sleeps for 5 minutes once it's finished running a method and then it repeats itself if it's supposed to (bool = true). Prior to 2.0 I was able to resume the thread after marking the bool to false which would cause the thread to finish what it was doing and complete, or to wake up for it's sleep state and not loop back into itself anymore. How do we tell a thread to stop sleeping now that Thread.Resume is obsolete?
1
1696
by: Moosdau | last post by:
Hi everyone: I have only found system.windows.forms.application.setsuspendstate method could make system into standby or hibernate state, but I don't know how to reboot the system. And I want to know how to wake up the system after hibernate/standby? For example, if my user input "3" and hibernate, the system should enter hibernate and wake up itself after 3 minutes.
1
2572
by: Oscar | last post by:
Hi, Is there a way to to "wake" a win xp machine from screen power save using c#? I got a computer that turns off the screen after a while and i'm programming an app that reads smart cards and I want the screen to "power on" as soon as some one inserts a card to the reader. Oscar
1
1968
by: Johannes Kiehl | last post by:
guys, I need one more hint on this. I feel I am not tackling this in a php'ish way. I've been asking before, in this NG, how to monitor a (semaphore-like) file for timestamp changes, other than doing a (sleep + filectime) loop. The comments I received suggested using external tools, such as
3
8627
by: ercastro | last post by:
I am a new user of Visual Basic. I am currently using VB 2005. I am running a time-consuming task on the built-in BackgroundWorker() control of VB. I am using nested loops and sometimes I need to issue Thread.Sleep() while waiting for a specific keyword from my TextBox display window. How do I wake up the BackgroundWorker() thread and resume my code when I detect the keyword that I have been waiting for? How do I call an Interrupt from...
2
1503
by: nondos | last post by:
Hi I have solution with two projects, one of them is a user control I created public shared sub in the user control which mean to wake up the control and start doing somthing, but when i try to call it from the main project i get error message "Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class." What can i do?
0
1420
by: =?Utf-8?B?QnJhbmR5?= | last post by:
When I select standby by computer goes to sleep. When I try to wake it up with the mouse or keyboard it will not work. The drives and monitor are functioning though. I can even open the DVD/CD drives. I end having to hold the power button and restart. I've disabled Hibernate thinking that be it. I've enabled keyboard to wake it up in the device manager. -- Brandy
4
10591
by: prometka | last post by:
Hi, I'm new here and I need a small advice Do you know how to wake up computer from hibernation or sleeping mode(in windows) by programming under C#? Let me explain my problem. I created a simple programme which I want to run in the morning in different time. My problem is I don't know how to programme it to wake up computer and run programme . Every evening I want just add to my programme time to wake up. I know that under windows it's...
0
8833
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4709
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3320
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.