I updated the protobuf-socket-rpc implementation so it leaves the
connection open, and I was able to get a 4 or 5 times improvement in
the time it takes to run the test. It also solved the problem of
running out of ephemeral ports.

It was necessary to add a length prefix to the request/response
messages in order to remove the dependency on closing the connection
to know when the protobuf was finished being read. Also, since
Message.Builder.mergeFrom() expects to be able to read the InputStream
to the "end", I had to create a FilterInputStream to trick it into
thinking the "end" was the end of the protobuf. The other option would
have been to use the version that accepts a byte array, but that seems
less ideal because it would limit the size of messages that could be
processed.

I still need to update the unit tests and do a little bit of cleanup,
but I can make the code available if anyone is interested.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to