Asynchronous Web Service Call

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default Re: Asynchronous Web Service Call

    Karl,

    If the webservice is out of process (whether it be on another machine or
    just out of process), then it will be executed using a thread from the
    standard threadpool, of which the managed runtime uses (I believe this
    is defaulted to a count of 25 threads in the threadpool). As to which
    thread exactly, well it could be any from the threadpool.

    So in answer to your questions :-

    A) & b) It will execute within a thread from the standard system
    threadpool (from which ASP grabs its threads I believe) unless you are
    making the SOAp call via an inproc method (eg.
    "soap.inproc://SomeEndPoint.asmx" using WSE2) in which case it will
    probably run from a thread grabbed from the system threadpool on the
    local machine.

    Note: I have not verified any of this, but this is how I believe it
    would work.

    - Paul Glavich

    -----Original Message-----
    From: karl bond [mailto:karl.bond@nospam.nospam]
    Posted At: Saturday, 14 August 2004 12:31 AM
    Posted To: microsoft.public.dotnet.framework.aspnet.webservic es
    Conversation: Asynchronous Web Service Call
    Subject: Asynchronous Web Service Call


    Hi everyone,

    We want to call a webservice asynchronously by a .net soap proxy
    component written in c# via SoapHttpClientProtocol.BeginInvoke(). The
    (inproc-) .net soap proxy component itself could be called a)by a com+
    server written in C++.
    b)by an asp-page

    The question is now: on which thread will the asynchronous operation
    (triggered by the call through SoapHttpClientProtocol.BeginInvoke() in
    a) and
    b) be executed ?

    Is it in
    a) a thread of the COM+ Threadpool or any other Thread (Which one?)
    b) a thread of the ASP Threadpool or any other Thread (Which one?)

    Thank you for answers in advance!

    Regards,
    Karl Bond

    Paul Glavich [ASP.NET MVP] Guest

  2. Similar Questions and Discussions

    1. asynchronous call timeout
      rHow could I set a timeout for this asynchonous call? I tried wait.one, but didn't work. thanks a lot. private void Button1_Click(object...
    2. asynchronous call to web service from a web page
      My web service is to update a database. When user clicks on a button on a web page, it calls web service to update database. With hundred...
    3. how to make asynchronous call to web service when its OneWay property is set to true.
      I have web service with the following signature public void Update(XmlElement objElement) { // //call another C# library that update the...
    4. Web service Asynchronous call fails
      Hi I created a webservice with a simple we method to increment a number passed from the client(a console app) . Then i call this web service method...
    5. Asynchronous Web Service Call Fails
      Hi I created a webservice with a simple we method to increment a number passed from the client(a console app) . Then i call this web service method...
  3. #2

    Default Re: Asynchronous Web Service Call

    Paul,

    thank you for your answer. But reflecting your post, there is still
    something unclear to me. The background of my question adresses server to
    server communication. The first server could host a com+ middle tier (or in
    case [b] an asp application). The second server is a backend server hosting a
    webservice. We want to avoid long running blocking threads on the first
    server, so that the first server is able to service further incoming
    requests. In order to keep the server scalable we want to use asynchronous
    web service calls on base of SoapHttpClientProtocol.BeginInvoke() with a
    callback. When asynchronous sending of the Soap-Request and the execution of
    the delegate would be done on a thread of the com+ Thread-pool (in [b] on a
    thread of the asp page) the first server could not scale, and i could do the
    long running web-service call also synchronously. Is there any solution
    available with the added benefit that launching of the backend processing
    (the soap-request) is not done in the same thread pool that is servicing the
    com+ middle-tier (or in [b] the asp-tier) in the way that asynchonous calls
    make sense? Thank you for your answer in advance.

    "Paul Glavich [ASP.NET MVP]" wrote:
    > Karl,
    >
    > If the webservice is out of process (whether it be on another machine or
    > just out of process), then it will be executed using a thread from the
    > standard threadpool, of which the managed runtime uses (I believe this
    > is defaulted to a count of 25 threads in the threadpool). As to which
    > thread exactly, well it could be any from the threadpool.
    >
    > So in answer to your questions :-
    >
    > A) & b) It will execute within a thread from the standard system
    > threadpool (from which ASP grabs its threads I believe) unless you are
    > making the SOAp call via an inproc method (eg.
    > "soap.inproc://SomeEndPoint.asmx" using WSE2) in which case it will
    > probably run from a thread grabbed from the system threadpool on the
    > local machine.
    >
    > Note: I have not verified any of this, but this is how I believe it
    > would work.
    >
    > - Paul Glavich
    >
    > -----Original Message-----
    > From: karl bond [mailto:karl.bond@nospam.nospam]
    > Posted At: Saturday, 14 August 2004 12:31 AM
    > Posted To: microsoft.public.dotnet.framework.aspnet.webservic es
    > Conversation: Asynchronous Web Service Call
    > Subject: Asynchronous Web Service Call
    >
    >
    > Hi everyone,
    >
    > We want to call a webservice asynchronously by a .net soap proxy
    > component written in c# via SoapHttpClientProtocol.BeginInvoke(). The
    > (inproc-) .net soap proxy component itself could be called a)by a com+
    > server written in C++.
    > b)by an asp-page
    >
    > The question is now: on which thread will the asynchronous operation
    > (triggered by the call through SoapHttpClientProtocol.BeginInvoke() in
    > a) and
    > b) be executed ?
    >
    > Is it in
    > a) a thread of the COM+ Threadpool or any other Thread (Which one?)
    > b) a thread of the ASP Threadpool or any other Thread (Which one?)
    >
    > Thank you for answers in advance!
    >
    > Regards,
    > Karl Bond
    >
    karl bond Guest

  4. #3

    Default Re: Asynchronous Web Service Call

    Hmmm. I think I understand your request so here goes....

    How is the request handled from a consumer perpective? By this I mean, if
    you fire off all these async web services from your middle tier, how are you
    notifying the consumer/client of their completion? Either the consumer (who
    is originally calling your COM+ middle tier component) is doing a
    synchronous call or they are somehow being notified of the completion of the
    web service process. If its a sync call, then I think all this worry about
    which threadpool is servicing your request is probably unneccessary and you
    could use object pooling to set limits in terms of simulateneous
    requests/calls (you dont want to let this go unfettered as you could
    potentially flood your middle tier component).

    If your consumer is asynchronous and only requires notification at some
    stage later when the web service process is complete, then you could queue
    the requests in a MSMQ or a database and process them either 1, 5 or however
    many threads you want at one time.

    By simply servicing the requests in "another threadpool", I dont think you
    are going to be ensuring scalability and threads will still be blocked in
    the other threadpool, in the same way they would have been in your default
    threadpool. You'll still have to deal with it somewhere, so you might as
    well bump up the thread count in your default pool if thats the case.

    I hope I haqve understood your situation correctly.

    --
    - Paul Glavich
    Microsoft MVP - ASP.NET


    "karl bond" <karl.bond@nospam.nospam> wrote in message
    news:9DC045E8-0FC9-4443-B8CA-04AFBA7F58A6@microsoft.com...
    > Paul,
    >
    > thank you for your answer. But reflecting your post, there is still
    > something unclear to me. The background of my question adresses server to
    > server communication. The first server could host a com+ middle tier (or
    in
    > case [b] an asp application). The second server is a backend server
    hosting a
    > webservice. We want to avoid long running blocking threads on the first
    > server, so that the first server is able to service further incoming
    > requests. In order to keep the server scalable we want to use asynchronous
    > web service calls on base of SoapHttpClientProtocol.BeginInvoke() with a
    > callback. When asynchronous sending of the Soap-Request and the execution
    of
    > the delegate would be done on a thread of the com+ Thread-pool (in [b] on
    a
    > thread of the asp page) the first server could not scale, and i could do
    the
    > long running web-service call also synchronously. Is there any solution
    > available with the added benefit that launching of the backend processing
    > (the soap-request) is not done in the same thread pool that is servicing
    the
    > com+ middle-tier (or in [b] the asp-tier) in the way that asynchonous
    calls
    > make sense? Thank you for your answer in advance.
    >
    > "Paul Glavich [ASP.NET MVP]" wrote:
    >
    > > Karl,
    > >
    > > If the webservice is out of process (whether it be on another machine or
    > > just out of process), then it will be executed using a thread from the
    > > standard threadpool, of which the managed runtime uses (I believe this
    > > is defaulted to a count of 25 threads in the threadpool). As to which
    > > thread exactly, well it could be any from the threadpool.
    > >
    > > So in answer to your questions :-
    > >
    > > A) & b) It will execute within a thread from the standard system
    > > threadpool (from which ASP grabs its threads I believe) unless you are
    > > making the SOAp call via an inproc method (eg.
    > > "soap.inproc://SomeEndPoint.asmx" using WSE2) in which case it will
    > > probably run from a thread grabbed from the system threadpool on the
    > > local machine.
    > >
    > > Note: I have not verified any of this, but this is how I believe it
    > > would work.
    > >
    > > - Paul Glavich
    > >
    > > -----Original Message-----
    > > From: karl bond [mailto:karl.bond@nospam.nospam]
    > > Posted At: Saturday, 14 August 2004 12:31 AM
    > > Posted To: microsoft.public.dotnet.framework.aspnet.webservic es
    > > Conversation: Asynchronous Web Service Call
    > > Subject: Asynchronous Web Service Call
    > >
    > >
    > > Hi everyone,
    > >
    > > We want to call a webservice asynchronously by a .net soap proxy
    > > component written in c# via SoapHttpClientProtocol.BeginInvoke(). The
    > > (inproc-) .net soap proxy component itself could be called a)by a com+
    > > server written in C++.
    > > b)by an asp-page
    > >
    > > The question is now: on which thread will the asynchronous operation
    > > (triggered by the call through SoapHttpClientProtocol.BeginInvoke() in
    > > a) and
    > > b) be executed ?
    > >
    > > Is it in
    > > a) a thread of the COM+ Threadpool or any other Thread (Which one?)
    > > b) a thread of the ASP Threadpool or any other Thread (Which one?)
    > >
    > > Thank you for answers in advance!
    > >
    > > Regards,
    > > Karl Bond
    > >

    Paul Glavich [MVP - ASP.NET] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139