Details
-
New Feature
-
Status: Closed
-
Trivial
-
Resolution: Won't Fix
-
None
-
None
-
Windows/Linux/OS X
-
Patch Available
Description
This is a Java async thread pool server which my shop would like to contribute to 1.0.
This server creates a single thread pool to execute all client requests. Any thread may be dispatched to service any request on any connection. Async operations use direct ByteBuffers, allowing the underlying system to write directly to the server buffer in some JVMs. No memory is typically copied by the server, the Protocol reads directly from the I/O buffer. The HotSpot JVM implements AsynchronousChannelGroups with I/O completion ports on Windows, event port on Solaris, and epoll on Linux. The IOCP implementation makes a noticeable difference in some scale out scenarios on Windows. Have found this server to be good for large client counts and TThreadPoolServer to be a little better with lower client counts (our experience only of course).
In the tar:
Server: TAsyncThreadPoolServer.java
Channel: TChannelManager.java
Transport: TFramedChannelTransport.java
Test: TestAsyncThreadPoolServer.java
Requires Java 7.
Happy to field questions and turn patches if needed.