Link Details

Link 910951 thumbnail
User 1093571 avatar

By rameshpatel321
Published: Jan 23 2013 / 15:20

Prior to Servlet API 3.0, in order to create servlet implementations that are asynchronous you would have to use something like Comet. However, Tomcat 7 and Servlet API 3.0, it is now possible to create servlets that can operate in both asynchronous and synchronous mode (and are portable across any 3.0 compliant app server, like Tomcat 7 or GlassFish 3.x). With synchronous servlets, a thread handling the client HTTP request would be tied up for the entire duration of time it takes to process the request. For long running tasks, where the server primarily waits around for a response (from somewhere else), this leads to thread starvation, under heavy load. This is due to the fact that even though the server isn’t doing anything but waiting around, the threads are being consumed by lots of requests as they come in (and threads are a finite resource).
  • 10
  • 0
  • 3571
  • 2102

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java