On Friday, January 25, 2013 11:18:46 AM UTC+8, kira kk wrote:
Thanks Marc. Before I run some trial tests. May you advise some benefit of using protocal buffer instead of a collection of primitive data type.
To name some of the benefits (over using primitive data types):
1. Backward compatibility: After you add more data fields to the message (which is very likely when your system is evolving), a server with the new message definition will still be able to recognize the data from an old server. Some sort of forward compatibility is also provided. An old server can recognized the data from a new server with newly added fields treated as unknown fields.
2. Language neutral and platform neutral: There are protobuf implementations for many other languages besides C++. They share the same wire format, so you can read the data in any other language as you like. This is very useful in some cases (e.g., communication between servers written in different languages, writing a tool in python for data analysis, etc).
3. Rich feature set: Various wire types, repeated fields, text format, extensions, reflection...