Execution queue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lorenzo

    Execution queue

    I'm trying to figure out the webservices architecture for library that
    we currently use as a monolithic component.

    Every execution is expressed by a call like this one

    public static IList executeIt(someA rguments)...

    To be completed teh executeIt method can take up to 15 seconds, so I
    need to use asynchronous calls.

    I read how .NET 2.0 manages async webservices very well, throught the
    class System.Componen tModel.AsyncCom pletedEventArgs (as explained here

    -sorry for the use of google cache but weblogs.asp.net seems to be
    down right now)



    Now I'm trying to find out how the service should be created in order
    to have just one flow of execution at a time. I mean if the service
    receives two calls, there must be some kind of check to assure the
    execution of the second call begins after the first one's ended.

    How can I do that? Could you tell me some good links?
    Thanks a lot
    Lorenzo

  • Mike

    #2
    RE: Execution queue

    Lorenzo,

    Why would you want to allow only one instance of execution for your web
    service? Also, I would suggest reevaluating how you are designing your web
    services. RPC-like calls are not really the desired way of doing business
    for web services. They are really more about document exchange and business
    processes, IMHO. Services exchange documents (in XML) which are processed
    and affect some change in states (perhaps) in a database, or produce some
    outcome. That is my view on them. I am not an expert though.

    That being said, maybe you have no control over the web service design, so
    that may not help you. With respect to your original question, I would offer
    that you could create one main web service which is the entry point to your
    system. This service would queue requests into a message queue (perhaps
    MSMQ). Another service would then, one at a time, service the queued
    requests. This second service could be written as a Windows Service to run
    24/7 in the background. It would read from the queue, process, then repeat.

    Hope that helps.

    --
    Mike

    Comment

    Working...