Staged Server Framework
This framework can be used to quickly build highly concurrent Java servers with a stage based architecture. It is being used in production in an ad server which serves around 300 million ads every month, and a few other servers.
The following features are available:
- A staging framework - useful in building applications which can be expressed in a stages separated by queues design (refer to SEDA for details)
- A simple HTTP server - to receive requests to be processed by the server
- GET and POST support
- Multi-part form data support (accept files over HTTP and process them)
- Consistent hashing - Easy deployment of multiple nodes in a multi-master or 1:N master-slave architecture with load distribution achieved via consistent hashing (if it makes sense for the application)
- A socket pool implementation to help in multi node communication
Download or check out from:
http://208.78.102.143/svn/ssf/trunk/
The examples directory contains a sample application which accepts GET or POST requests on port 8080 and echoes the parameters.
Credits
- The staging framework is based on the the one used in Cassandra, with the following enhancements:
- Ability to select the type of BlockingQueue feeding each stage
- Support for batch submission of callable tasks into a stage
- Multi-part form handling uses some code from Apache Commons FileUpload
Bugs, suggestions or feedback? Please send it to thejo@kote.in
Home