Hello,

About 2 years ago I used the protobufs for a client-server based
system, and I was quite happy with the results. The system is still
running and has proven to provide an easy to modify communication
protocol, all that thanks to the protobufs.

The only grudge I still hold with the protobufs is the parsing method.
For the project I mentioned above, data would be coming in from serial
ports and sockets, buffered then parsed using the ParseFromArray
method. Messages would be processed once the ParseFromArray method
would return true.

This worked ok, but we had to take assumptions. We tried several
methods:

- either we would read the input stream in chunks until no data would
be available for more than TBD milliseconds. We would then try to
parse what we had received
- or we would read the input data byte by byte and try to parse after
each byte received

The first solution allowed for a quicker execution time. However
assuming a whole packet would be received if a timeout was detected
was not always true. Also since we were reading the data in chunks and
since there was no way to detect the beginning of a packet we would
sometimes consume the beginning of a second packet coming in to soon
after the first one...

The second solution worked when more than one packet would be sent in
the data stream, but proved to be slow.

Since my last use of the protobuf (again, about 2 years ago) as there
been additions to how the protobufs are parsed? More specifically how
they are parsed from real time datastreams?

Thanks,
Jean-Sebastien

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@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