[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Alex Mirzayanov

8/22/2003 3:30:00 AM

Hi all,
*A theoretical question: When does multithreading a webservice come into
play (if ever)? Is there such thing as a multi-threaded high-performance
optimized webservice? Or does each user hitting a webservice cause a
webservice to spawn a new instance/process so it makes no sense to even talk
about threads and a webservice? any ideas? Thanks in advance.
Alex M


2 Answers

Christian Weyer

8/22/2003 9:56:00 AM

0

Well, Web services in .NET (ASMX) are hosted by the ASP.NET runtime. And you can be sure that the processing of different requests is optimized.
It may though make sense to spawn different threads in your Web service, but please be aware. A much better suited approach for such scenarios are aynch WebMethods:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcreatingasynchronousxmlwebservicemethod.asp?...
Please also consider this very interesting approach which involves quite a few lines of custom coding:
http://msdn.microsoft.com/webservices/default.aspx?pull=/library/en-us/dnservice/html/service07...

Cheers,
--
Christian Weyer
Microsoft .NET & Service Oriented Architectures

[Microsoft Regional Director, Germany]
http://www.regionaldir...

* XML Web Services: http://www.xmlwebse...
* Weblog: http://weblogs.asp.n...


> Hi all,
> *A theoretical question: When does multithreading a webservice come into
> play (if ever)? Is there such thing as a multi-threaded high-performance
> optimized webservice? Or does each user hitting a webservice cause a
> webservice to spawn a new instance/process so it makes no sense to even talk
> about threads and a webservice? any ideas? Thanks in advance.
> Alex M
>
>

arno.huetter

8/22/2003 11:20:00 AM

0

Hi there,

each webservice invocation will run within its own thread context.
That does not mean that each time a new thread must be started.
Threads will be pooled and reused, just like webservice instances, as
they are stateless by definition.

The thought of blocking werbservices makes me tremble... spawning
processes? Not since the old days of CGI...

There is something like IIS out-off-process pooled applications... in
case you want a certain web application to run within its own,
prioritized process...

Kind regards,
Arno Huetter

"Alex Mirzayanov" <amirzayanov@cta.net> wrote in message news:<eyPWo2FaDHA.2344@TK2MSFTNGP09.phx.gbl>...
> Hi all,
> *A theoretical question: When does multithreading a webservice come into
> play (if ever)? Is there such thing as a multi-threaded high-performance
> optimized webservice? Or does each user hitting a webservice cause a
> webservice to spawn a new instance/process so it makes no sense to even talk
> about threads and a webservice? any ideas? Thanks in advance.
> Alex M