How to wake up an asynchroneous process ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?R2lsYmVydCBUb3JkZXVy?=

    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
  • =?Utf-8?B?SkI=?=

    #2
    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:
    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

    Comment

    • Family Tree Mike

      #3
      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_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" <GilbertTordeur @discussions.mi crosoft.comwrot e in
      message news:9854ECDE-6BC3-4093-99EB-7926F5F7A0CB@mi crosoft.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

      Comment

      • Gilbert Tordeur

        #4
        Re: How to wake up an asynchroneous process ?

        JB and Mike, thank you.
        Gilbert

        "Gilbert Tordeur" <GilbertTordeur @discussions.mi crosoft.coma écrit dans le
        message de news: 9854ECDE-6BC3-4093-99EB-7926F5F7A0CB@mi crosoft.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

        Comment

        Working...