gregw

Friday Aug 15, 2008

Asynchronous Restful Webapplication

This blog annotates the Jetty 7 example web application that uses Jetty asynchronous HTTP client and the proposed suspendable servlets 3.0 API, to call an eBay restful web service.   The technique combines the Jetty asynchronous HTTP client with the Jetty servers ability to suspend servlet processing, so that threads are not held while waiting for rest responses. Thus threads can handle many more requests and web applications using this technique should obtain at least ten fold increases in performance.[Read More]

Thursday Nov 22, 2007

Asynchronous IO is hard!

The tomcat 6 developers have proposed an asynchronous IO extension as their solution for Comet and Ajax push.  I have long argued that asynchronous handling is needed for Servlets (for comet and other use-cases), but that it is very important to make the distinction between asynchronous IO and asynchronous handling of requests. Asynchronous programming is hard and asynchronous IO even harder.  I maintain that asynchronous IO should be implemented by the container and that only asynchronous events should be delivered to an asynchronous servlet. As if to illustrate my point,the example code that tomcat provide for their asynchronous IO contains some classic bugs and inefficiencies that I examine here as they well illustrate why we should be making all efforts possible to encapsulate asynchronous IO below the level of the servlet API.
[Read More]

Webtide

Calendar

Tags

Search

Links

Navigation