Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Single Thread model in practice

 
Hari babu
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can any one tell me where the single threaded servlet model is used in the real world applications

Hari
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer: Not in many apps.
A typical app server has to service many requests per unit time. It would not be practical to have a pool of that many servlets around or conversely to slow down the processing of requests by making them wait for THE servlet to be free.
However, there are always non-typical apps...
 
Rick Hightower
Author
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree. It is not used that often in practice.
 
Ken Robinson
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tony Alicea:
A typical app server has to service many requests per unit time. It would not be practical to have a pool of that many servlets around or conversely to slow down the processing of requests by making them wait for THE servlet to be free.

A question on a seperate front.
Is this not exactly how STRUTS, via a pool of Action instances, works?
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actions are not servlets (Struts).
Struts uses only one servlet (ActionServlet).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic