protobuf is so interesting, can mongodb use protobuf?
Hi @anlex_N,
There’s a brief mention on the BSON spec homepage:
BSON can be compared to binary interchange formats, like Protocol Buffers. BSON is more “schema-less” than Protocol Buffers, which can give it an advantage in flexibility but also a slight disadvantage in space efficiency (BSON has overhead for field names within the serialized data).
The protobuf (Protocol Buffers) serialisation format uses a .proto
description of the data structure you want to work with. BSON uses schema-on-read: field names and data types are embedded in the BSON document.
The schema-on-read aspect provides an advantage in distributed data systems: there is no central schema catalog to maintain or refer to, and a document contains all the information needed for deserialisation.
You could use protobuf (or other serialisation formants) in your client applications, but data ultimately has to be serialised to/from BSON for the current MongoDB Wire Protocol.
Regards,
Stennie
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.