Permalink
..
Failed to load latest commit information.
src/main Initial sync of EAP and WildFly quickstarts Feb 21, 2017
README.adoc
pom.xml Next is 15 Alpha Aug 31, 2018

README.adoc

servlet-async: How to Write an Asynchronous Servlet

The servlet-async quickstart demonstrates how to use asynchronous servlets to detach long-running tasks and free up the request processing thread.

What is it?

The servlet-async quickstart is a sample project showing the use of asynchronous servlets in {productNameFull}.

It shows how to detach the execution of a long-running task from the request processing thread, so the thread is free to serve other client requests. The long-running tasks are executed using a dedicated thread pool and create the client response asynchronously.

A long-running task in this context does not refer to a computation intensive task executed on the same machine but could for example be contacting a third-party service that has limited resources or only allows for a limited number of concurrent connections. Moving the calls to this service into a separate and smaller sized thread pool ensures that less threads will be busy interacting with the long-running service and that more requests can be served that do not depend on this service.