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...

*
> *
> *Kira *
>
>
> On 24 January 2013 15:40, Marc Gravell <marc.g...@gmail.com 
> <javascript:>>wrote:
>
>> Exact performance is very implementation- / application-specific. Yes, 
>> protobuf will be fast - but probably not quite as fast as a raw memcpy. But 
>> if you want *actual* numbers, the best thing to do would be to measure it 
>> on the sort of data you want to work with.
>>
>> Marc
>>
>>
>> On 24 January 2013 03:44, kira kk <kir...@gmail.com <javascript:>> wrote:
>>
>>> Hi,
>>>
>>> I am considering to adopt protocol buffer in c++. However, I cannot find 
>>> there is any performance about it.
>>> Here is my situation: the applications are distributed and 
>>> performance-critical C++ applications. Each application communicates 
>>> through message by socket.
>>> So the message is serialize to a buffer and publish it. Currently memcpy 
>>> is used for serialization as these messages are just a collection of C++ 
>>> primitive data type 
>>> and char array. So I don't know if it is suitable to switch to use 
>>> protocol buffer. Any suggestion is appreciated!
>>>
>>> Regards,
>>> Kira
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Protocol Buffers" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/protobuf/-/0uFenUWso_MJ.
>>> To post to this group, send email to prot...@googlegroups.com<javascript:>
>>> .
>>> To unsubscribe from this group, send email to 
>>> protobuf+u...@googlegroups.com <javascript:>.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/protobuf?hl=en.
>>>
>>
>>
>>
>> -- 
>> Regards, 
>>
>> Marc 
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to