Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Some questions on ASP.NET web services on IIS 6

Reply
Thread Tools

Some questions on ASP.NET web services on IIS 6

 
 
Navin Mishra
Guest
Posts: n/a
 
      03-31-2005
1. Is maxIothreads parameter used still in IIS 6 ? For processing web
service requests, I don't see ASp.NET AvailableIOThreads going down ? If I
use another web service from my web service, would IO thread be used or
worker thread ?
2. My web service is used by another web service(A) which sends a one-way
request to my web service and I want to free up that consumer web service A
as soon as possible. So, I use ThreadPool.QueueUserWorkItem to qeuee request
for procssing. I see the thread pool thread is the SAME as the request
thread used by A web service. Is that normal ? Is the web service A really
freed-up ?
3. Is invoking a web service asynchronously a good idea as it would still
use a thread from thread pool and petform thread context switch ?

Thanks in advance and regards

Navin


 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      03-31-2005
> 1. Is maxIothreads parameter used still in IIS 6 ? For processing web
> service requests, I don't see ASp.NET AvailableIOThreads going down ?
> If I use another web service from my web service, would IO thread be used
> or worker thread ?


IOThreads are no longer used to service requests in IIS6.

> 2. My web service is used by another web service(A) which sends a
> one-way
> request to my web service and I want to free up that consumer web
> service A
> as soon as possible. So, I use ThreadPool.QueueUserWorkItem to qeuee
> request
> for procssing. I see the thread pool thread is the SAME as the request
> thread used by A web service. Is that normal ? Is the web service A
> really
> freed-up ?


The concern with using the thread pool to do async work in ASP.NET (and webservices)
is that it's the same threadpool that is servicing your pages and webservices.
So it's very easy to flood your threadpool with async work such that your
application is no longer responsive. I'd suggest doing async work with your
own threadpool. Mike Woording has a great one that I've used before:

http://www.bearcanyon.com/dotnet/#threadpool

-Brock
DevelopMentor
http://staff.develop.com/ballen



 
Reply With Quote
 
 
 
 
Navin Mishra
Guest
Posts: n/a
 
      03-31-2005
Thanks for response. If I call another web service C from my web service B,
wouldn't an I/O thread be used ? And, in which case, making the web service
B's web method asynschronous to call web sevice C asynchronously would help
? I saw that recommendation in MSDN. Wouldn't I/O thread be also used when
web service sends data asynschronously over a socket connection ? More
comments below:


"Brock Allen" <> wrote in message
news: ...
>> 1. Is maxIothreads parameter used still in IIS 6 ? For processing web
>> service requests, I don't see ASp.NET AvailableIOThreads going down ?
>> If I use another web service from my web service, would IO thread be used
>> or worker thread ?

>
> IOThreads are no longer used to service requests in IIS6.
>
>> 2. My web service is used by another web service(A) which sends a
>> one-way
>> request to my web service and I want to free up that consumer web
>> service A
>> as soon as possible. So, I use ThreadPool.QueueUserWorkItem to qeuee
>> request
>> for procssing. I see the thread pool thread is the SAME as the request
>> thread used by A web service. Is that normal ? Is the web service A
>> really
>> freed-up ?

>
> The concern with using the thread pool to do async work in ASP.NET (and
> webservices) is that it's the same threadpool that is servicing your pages
> and webservices. So it's very easy to flood your threadpool with async
> work such that your application is no longer responsive. I'd suggest doing
> async work with your own threadpool. Mike Woording has a great one that
> I've used before:
>
> http://www.bearcanyon.com/dotnet/#threadpool

[Navin]Indeed. The question above is different a bit. Just for my
information, when using the system thread pool, is the web service A sending
one way request to web service B in above scenario is really freed up when
its worker thread is reused to server a queued request from the pool.
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>



 
Reply With Quote
 
Brock Allen
Guest
Posts: n/a
 
      03-31-2005
Well, it's unclear. There was a lively discussion on DevelopMentor's listservs
just this past 2 weeks on the topic. Here were the 3 more relevant posts:

http://discuss.develop.com/archives/...0&F=&S=&P=1712

http://discuss.develop.com/archives/...0&F=&S=&P=1829

http://discuss.develop.com/archives/...0&F=&S=&P=3211

You still have the issue of how to handle your response back to your client
(I assume your code is in a asp.net page of webserice and it's using another
webservice to do something interesting). So you still have to make your webservice
an async one from ASP.NET's perspective. Fritz has an article on how to do
this for pages, but I don't see why it wouldn't also work for web services
(BTW, his article was what kicked off the above discussion in the first place):

http://msdn.microsoft.com/msdnmag/is...g/default.aspx

-Brock
DevelopMentor
http://staff.develop.com/ballen



> Thanks for response. If I call another web service C from my web
> service B, wouldn't an I/O thread be used ? And, in which case, making
> the web service B's web method asynschronous to call web sevice C
> asynchronously would help ? I saw that recommendation in MSDN.
> Wouldn't I/O thread be also used when web service sends data
> asynschronously over a socket connection ? More comments below:
>
> "Brock Allen" <> wrote in message
> news: ...
>
>>> 1. Is maxIothreads parameter used still in IIS 6 ? For processing
>>> web
>>> service requests, I don't see ASp.NET AvailableIOThreads going down
>>> ?
>>> If I use another web service from my web service, would IO thread be
>>> used
>>> or worker thread ?

>> IOThreads are no longer used to service requests in IIS6.
>>
>>> 2. My web service is used by another web service(A) which sends a
>>> one-way
>>> request to my web service and I want to free up that consumer web
>>> service A
>>> as soon as possible. So, I use ThreadPool.QueueUserWorkItem to qeuee
>>> request
>>> for procssing. I see the thread pool thread is the SAME as the
>>> request
>>> thread used by A web service. Is that normal ? Is the web service A
>>> really
>>> freed-up ?

>> The concern with using the thread pool to do async work in ASP.NET
>> (and webservices) is that it's the same threadpool that is servicing
>> your pages and webservices. So it's very easy to flood your
>> threadpool with async work such that your application is no longer
>> responsive. I'd suggest doing async work with your own threadpool.
>> Mike Woording has a great one that I've used before:
>>
>> http://www.bearcanyon.com/dotnet/#threadpool
>>

> [Navin]Indeed. The question above is different a bit. Just for my
> information, when using the system thread pool, is the web service A
> sending one way request to web service B in above scenario is really
> freed up when its worker thread is reused to server a queued request
> from the pool.
>
>> -Brock
>> DevelopMentor
>> http://staff.develop.com/ballen




 
Reply With Quote
 
Navin Mishra
Guest
Posts: n/a
 
      04-01-2005
Thanks...that was very helpful. BTW my web service uses other web services
and dispatches events to clients via TCP. It also being used by other web
services.


"Brock Allen" <> wrote in message
news: ...
> Well, it's unclear. There was a lively discussion on DevelopMentor's
> listservs just this past 2 weeks on the topic. Here were the 3 more
> relevant posts:
>
> http://discuss.develop.com/archives/...0&F=&S=&P=1712
>
> http://discuss.develop.com/archives/...0&F=&S=&P=1829
>
> http://discuss.develop.com/archives/...0&F=&S=&P=3211
>
> You still have the issue of how to handle your response back to your
> client (I assume your code is in a asp.net page of webserice and it's
> using another webservice to do something interesting). So you still have
> to make your webservice an async one from ASP.NET's perspective. Fritz has
> an article on how to do this for pages, but I don't see why it wouldn't
> also work for web services (BTW, his article was what kicked off the above
> discussion in the first place):
>
> http://msdn.microsoft.com/msdnmag/is...g/default.aspx
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>> Thanks for response. If I call another web service C from my web
>> service B, wouldn't an I/O thread be used ? And, in which case, making
>> the web service B's web method asynschronous to call web sevice C
>> asynchronously would help ? I saw that recommendation in MSDN.
>> Wouldn't I/O thread be also used when web service sends data
>> asynschronously over a socket connection ? More comments below:
>>
>> "Brock Allen" <> wrote in message
>> news: ...
>>
>>>> 1. Is maxIothreads parameter used still in IIS 6 ? For processing
>>>> web
>>>> service requests, I don't see ASp.NET AvailableIOThreads going down
>>>> ?
>>>> If I use another web service from my web service, would IO thread be
>>>> used
>>>> or worker thread ?
>>> IOThreads are no longer used to service requests in IIS6.
>>>
>>>> 2. My web service is used by another web service(A) which sends a
>>>> one-way
>>>> request to my web service and I want to free up that consumer web
>>>> service A
>>>> as soon as possible. So, I use ThreadPool.QueueUserWorkItem to qeuee
>>>> request
>>>> for procssing. I see the thread pool thread is the SAME as the
>>>> request
>>>> thread used by A web service. Is that normal ? Is the web service A
>>>> really
>>>> freed-up ?
>>> The concern with using the thread pool to do async work in ASP.NET
>>> (and webservices) is that it's the same threadpool that is servicing
>>> your pages and webservices. So it's very easy to flood your
>>> threadpool with async work such that your application is no longer
>>> responsive. I'd suggest doing async work with your own threadpool.
>>> Mike Woording has a great one that I've used before:
>>>
>>> http://www.bearcanyon.com/dotnet/#threadpool
>>>

>> [Navin]Indeed. The question above is different a bit. Just for my
>> information, when using the system thread pool, is the web service A
>> sending one way request to web service B in above scenario is really
>> freed up when its worker thread is reused to server a queued request
>> from the pool.
>>
>>> -Brock
>>> DevelopMentor
>>> http://staff.develop.com/ballen

>
>
>



 
Reply With Quote
 
Navin Mishra
Guest
Posts: n/a
 
      04-26-2005
Is there any example of implementing HTTPAsyncHandlers for web services ? It
turns out that asynchronous web methods are not a solution for my secnario.
I want to handle a web request in a separate thread which hosts an object
which must be used in THAT thread only beacuse of its thread-affinity. I
want to wait in ASP.NET web service method until the utility object has
returned results.

Is it possible using HTTPAsyncHandlers or any other mechanism ?

Thanks in advance and regards

Navin

"Brock Allen" <> wrote in message
news: ...
> Well, it's unclear. There was a lively discussion on DevelopMentor's
> listservs just this past 2 weeks on the topic. Here were the 3 more
> relevant posts:
>
> http://discuss.develop.com/archives/...0&F=&S=&P=1712
>
> http://discuss.develop.com/archives/...0&F=&S=&P=1829
>
> http://discuss.develop.com/archives/...0&F=&S=&P=3211
>
> You still have the issue of how to handle your response back to your
> client (I assume your code is in a asp.net page of webserice and it's
> using another webservice to do something interesting). So you still have
> to make your webservice an async one from ASP.NET's perspective. Fritz has
> an article on how to do this for pages, but I don't see why it wouldn't
> also work for web services (BTW, his article was what kicked off the above
> discussion in the first place):
>
> http://msdn.microsoft.com/msdnmag/is...g/default.aspx
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>> Thanks for response. If I call another web service C from my web
>> service B, wouldn't an I/O thread be used ? And, in which case, making
>> the web service B's web method asynschronous to call web sevice C
>> asynchronously would help ? I saw that recommendation in MSDN.
>> Wouldn't I/O thread be also used when web service sends data
>> asynschronously over a socket connection ? More comments below:
>>
>> "Brock Allen" <> wrote in message
>> news: ...
>>
>>>> 1. Is maxIothreads parameter used still in IIS 6 ? For processing
>>>> web
>>>> service requests, I don't see ASp.NET AvailableIOThreads going down
>>>> ?
>>>> If I use another web service from my web service, would IO thread be
>>>> used
>>>> or worker thread ?
>>> IOThreads are no longer used to service requests in IIS6.
>>>
>>>> 2. My web service is used by another web service(A) which sends a
>>>> one-way
>>>> request to my web service and I want to free up that consumer web
>>>> service A
>>>> as soon as possible. So, I use ThreadPool.QueueUserWorkItem to qeuee
>>>> request
>>>> for procssing. I see the thread pool thread is the SAME as the
>>>> request
>>>> thread used by A web service. Is that normal ? Is the web service A
>>>> really
>>>> freed-up ?
>>> The concern with using the thread pool to do async work in ASP.NET
>>> (and webservices) is that it's the same threadpool that is servicing
>>> your pages and webservices. So it's very easy to flood your
>>> threadpool with async work such that your application is no longer
>>> responsive. I'd suggest doing async work with your own threadpool.
>>> Mike Woording has a great one that I've used before:
>>>
>>> http://www.bearcanyon.com/dotnet/#threadpool
>>>

>> [Navin]Indeed. The question above is different a bit. Just for my
>> information, when using the system thread pool, is the web service A
>> sending one way request to web service B in above scenario is really
>> freed up when its worker thread is reused to server a queued request
>> from the pool.
>>
>>> -Brock
>>> DevelopMentor
>>> http://staff.develop.com/ballen

>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some daft Questions About web Services Namshub ASP .Net Web Services 1 09-05-2007 04:32 PM
Start Web services as Windows Services start Anup ASP .Net 1 05-09-2006 11:44 AM
How .NET web services client handles exceptions from Java web services? John ASP .Net Web Services 4 03-31-2006 10:13 PM
What is the difference between C# windows Services and web services in vs.net? Nick ASP .Net 1 09-12-2005 02:33 PM
how to implement Services Interface Tier (web services) Szymi MCSD 0 11-03-2003 10:50 AM



Advertisments
 



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