thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Craig <>
Subject Re: Generic questions
Date Wed, 19 Jun 2013 13:25:04 GMT
Here are the answers for C++.  Often, they apply to the other languages, 
but I know that some languages (Java) give some of the servers different 

1) The "raw" transports like TSocket do no buffering.  BufferedTransport 
and FramedTransports are more like transport decorators. BufferedTransport 
adds buffering, but it doesn't change the byte sequence that goes over the 
raw transport.  FramedTransports add buffering, and whenever someone calls 
flush() on the transport, FramedTransport will first write out the size of 
the buffered data, then follow it up with the data.  So FramedTransport 
changes what bytes are sent / parsed on the raw transport.
2) Very little documentation that I've found.  Binary tends to be 
relatively straightforward, but it isn't doing an awesome job at 
optimizing for message size.  Compact is a bit trickier, but I haven't 
looked at it all that much.  I don't know if there are downsides to using 
compact or not.  JSON is almost certainly larger than binary or compact, 
but it should be easier to debug.
3) In C++, the simple server only permits one connection.  The threaded 
server allocates one thread per connection.  The nonblocking server is 
strange, and I haven't really used it yet.  I know that it requires a 
framed transport, and requires you to use something socket based because 
it has a select loop in it.  It claims to be high performance.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message