Your understanding is not correct. The nonblocking servers make use of nonblocking IO to allow more open connections than executing threads, which is good for having many persistent connections to lots of intermittent clients. The server.serve() method will still block, and clients will still wait for responses as appropriate.
On Mon, Jun 20, 2011 at 7:59 PM, Randall Keeler <[email protected]> wrote: > Can someone briefly describe the difference between a non-blocking server > TNonblockingServer and a blocking threaded server e.g. TThreadedServer? > > If I understand correctly, it is that in TNonblockingServer the > "server.serve()" call does not block the caller? And it is NOT that calls > from the client will be non-blocking? In other words the clients will STILL > have to wait for a response from the server when using a service, provided > the interface isn't defined as a oneway void? > > If this is the case, is it possible to just take a TThreadedServer and > place > the "server.serve()" call inside an independent thread that was spawned > outside of Thrift and sole purpose is to manage the server.serve call? What > disadvantages are there to this approach vs. using TNonblockingServer? > > Thank you. >
