AsyncWeb
News
AsyncWeb move to Mina getting closer!
http://issues.apache.org/jira/browse/DIRMINA-353![]()
Older News
AsyncWeb at OSCON 2006 http://conferences.oreillynet.com/cs/os2006/view/e_sess/9065![]()
What is it?
AsyncWeb is a high-throughput, non blocking Java HTTP engine - designed throughout to support asynchronous request processing
AsyncWeb (built on top of the excellent Mina network framework
) employs non-blocking selector driven IO at the transport level, and is asynchronous thoughout - from the initial parsing of requests, right through to and including the services implemented by users.
AsyncWeb breaks away from the blocking request / response architecture found in todays popular HTTP engines. This allows it to be highly scalable and capable of supporting very high throughput - even in high processing latency scenarios.
A simple API allows new asynchronous services to be created easily - and out-of-the-box Spring integration allows them to be configured simply and with great flexibility. In addition to "endpoint" HTTP services, AsyncWeb also allows configurable "chains" of behaviour - enabling "filter" like behaviour to be applied to all requests. Pluggable "resolvers" map incoming requests to their target HTTP service - and are given access to the entire incoming request - allowing the routing possibilities to be very flexible.
See the Async Web Feature Set for a a listing of the features currently offered by AsyncWeb.
How is AsyncWeb used today?
AsyncWeb is currently succesfully employed as an embedded server in a live high-performance / high-throughput messaging system - as a feed for SOAP (using Apache Axis) and other forms of messaging protocols over HTTP.
To provide SOAP support, a custom AsyncWeb HttpService implementation is employed - as a replacement for the "AxisServlet" in the Servlet world.
In the current deployment, the messaging system must make requests to external servers before sending the SOAP response for a received request. The external servers are outside of the control of the messaging system - and individual request latency can rise to several seconds.
However, by scaling the number of connections made to the messaging system (or by employing connection pipelining - which AsyncWeb fully supports), it is possible to maintain a consistently high messaging throughput - even at very high processing latencies.
This is simply not possible with the blocking HTTP engines in widespread use today where this sort of problem is typically solved by increasing the number of threads in the system.
The motivation for AsyncWeb
The AsyncWeb author has for some time worked on projects which expose functionality over various protocols using HTTP as the transport mechanism - all with a common theme: High throughput rates must be acheived even though an individual request may exhibit high processing latency (e.g. because the application is required to send a high-latency out-bound request across the network before it can respond to the original client).
The majority of today's popular java HTTP engines are built around the J2EE Servlet Specification - and are inherently synchronous in their operation. The typical order of play is that an individual HTTP connection is mapped to a thread of execution which reads data from the underlying socket, parses the request and forwards it up through the web container to the target Servlet - blocking until a response is completed.
As processing latency (as described above) increases, a real scalability problem is encountered: To increase throughput, it is necessary to increase the number of connection threads. This, however, is not the best way to scale - and depending on the JVM / operating system employed, having a very large number of threads can become a big problem very quickly.
A real problem then needed to be solved: How can we obtain a very high throughput - whilst dealing with high processing latency - without requiring a potentially unbounded number of threads? An initial area of investigation was to provide a NIO transport connector for an existing HTTP engine. However, existing popular HTTP engines built around the J2EE Servlet Specification have a blocking synchronous architecture throughout. Swapping in a NIO transport to such an engine does not solve the problem: We'd still need to scale processing threads in order to push requests up through the container.
What was needed was an http engine which provided non-blocking behaviour throughout - and so work began on writing such an engine.
The History of AsyncWeb
AsyncWeb was originally developed by Dave Irving within the LogicaCMG Telecoms division where it is used to provide a high-performance HTTP-Server engine for LogicaCMG's SOAP messaging framework. LogicaCMG recognised the potential of this technology to facilitate the development of high performance asynchronous web services and has kindly supported the release of this software into the public domain.