You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2013/04/03 21:45:18 UTC

[jira] [Updated] (THRIFT-1034) Add a multiplexing Java client

     [ https://issues.apache.org/jira/browse/THRIFT-1034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier updated THRIFT-1034:
--------------------------------

    Issue Type: Sub-task  (was: New Feature)
        Parent: THRIFT-1915
    
> Add a multiplexing Java client
> ------------------------------
>
>                 Key: THRIFT-1034
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1034
>             Project: Thrift
>          Issue Type: Sub-task
>          Components: Java - Library
>         Environment: Java v1.4 or higher 
>            Reporter: Xing Jin
>            Assignee: Jake Farrell
>         Attachments: thrift-1034-patch.txt
>
>
> One of our recent projects requires to fetch responses from several hundred servers. All servers have similar settings. The client needs to send same request to all servers, and then fetch their responses.
> We would like to use non-blocking sockets to implement it, as it is much faster than setting up hundreds of blocking sockets. So in this patch, we create a client class, which sends a same request to multiple servers (using java.nio.selector and non-blocking socket), then fetches response from all these servers, and returns results as an array of ByteBuffer. We also pass a timeout value to the client, so that when a pre-defined time duration passes, the client would shutdown all sockets and return any available responses.
> It assumes all servers are non-blocking servers and all use TFramedTransport. 
> We have done many local tests. We could generate some unittest if necessary. Appreciate any comments!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira