Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1894

Thrift multi-threaded async Java Server using Java 7 AsynchronousChannelGroup

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Trivial
    • Resolution: Won't Fix
    • None
    • 0.9.2
    • Java - Library
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            codesf Randy Abernethy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: