Ask a Question related to ASP.NET Web Services, Design and Development.
-
Paul Glavich [ASP.NET MVP] #1
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
-
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... -
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... -
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... -
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... -
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... -
karl bond #2
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
-
Paul Glavich [MVP - ASP.NET] #3
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...in> 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 (orhosting a> case [b] an asp application). The second server is a backend serverof> 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 executiona> the delegate would be done on a thread of the com+ Thread-pool (in [b] onthe> thread of the asp page) the first server could not scale, and i could dothe> 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 servicingcalls> com+ middle-tier (or in [b] the asp-tier) in the way that asynchonous> 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



Reply With Quote

