thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cthrift with state-machine based receive
Date Fri, 02 Apr 2010 10:20:55 GMT

Sorry about the _LONG_ delay between releases of cthrift. I was working on
replacing the recursive deserializer with a state-machine based one. It's
now been implemented and tested to the same level as the recursive

Why is this interesting? Well, the main loop looks like:
  while( have_not_finished_reading_message ) {
But it also lets us do the following:
  while( (status = process_next_arc(state)) != DONE ) {
     if( status == SOCKET_WOULD_HAVE_BLOCKED ) {
    if( status == ERROR )

So, we get the ability to handle part of a message, then switch to
handling another message, then come back to the message, etc.

As you might gather, this will be a nice platform for implementing
streaming messages as well.

Another thing, that is specific to the implementation. The state-machine
approach creates a data structure per type. So, its a _LOT_ less expensive
to compose types.

View raw message