RestExpress/RestExpress — Issue #29: Create Thread Pool for Long-Running Requests
Author: tfredrich
Created: 2011-12-14 23:50:46+00:00
State: open

Since Netty uses non-blocking I/O, using its worker threads to perform long-running activities, such as database and file I/O, etc. is not optimal. Instead, for long-running activities like this, utilize a thread pool to execute the service controller outside Netty's I/O worker thread(s).

Preliminary thoughts on design:
1. Netty pipeline simply creates RESTExpress Request.
2. Put Request on request queue.
3. Worker is freed to handle next request.
4. Service thread(s) read Request from request queue.
5. Handle request.
6. Place Response on response queue.
7. Netty pipeline monitors response queue and sends them back to client.