[ 
https://issues.apache.org/jira/browse/THRIFT-791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871817#action_12871817
 ] 

David Reiss commented on THRIFT-791:
------------------------------------

TNonblockingServer uses libevent to manage all I/O in a nonblocking fashion, 
and can handle request processing inline or with a threadpool.  I would suggest 
using libevent as your event loop since it is well-established and can use all 
of the major "C10K-compliant" mechanisms (epoll, kqueue, etc.).  If you need to 
use glib or something else, you have a few options.  One is just running the 
Thrift server in a separate thread.  Another is writing a glib backend for 
libevent.  I know it sounds daunting, but I actually suspect it would be pretty 
easy.  The libevent backends only define 5 functions and run about 300-400 
lines of C.

> Let C++ TSimpleServer be driven by an external main loop
> --------------------------------------------------------
>
>                 Key: THRIFT-791
>                 URL: https://issues.apache.org/jira/browse/THRIFT-791
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (C++)
>            Reporter: Nick Welch
>         Attachments: mainloop-coop.patch
>
>
> This patch exposes TSimpleServer's file descriptors and allows for processing 
> a single request at a time, to facilitate using it in cooperation with a 
> different main loop.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to