Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protocol Buffers versus JSON or BSON [closed]

Does anyone have any information on the performance characteristics of Protocol Buffers versus BSON (binary JSON) or versus JSON in general?

  • Wire size
  • Serialization speed
  • Deserialization speed

These seem like good binary protocols for use over HTTP. I'm just wondering which would be better in the long run for a C# environment.

Here's some info that I was reading on BSON and Protocol Buffers.

like image 239
Jeff Meatball Yang Avatar asked Jan 04 '10 17:01

Jeff Meatball Yang


People also ask

Why are protocol buffers better than JSON?

Protocol buffers are much faster than JSON. JSON is lightweight and is faster than other serialization techniques like pickling. Protobuf schemas are encoded along with data; it ensures that signals don't get lost between applications. Language interoperability.

Are protocol buffers still used?

In particular, it was designed to be smaller and faster than XML. Protocol Buffers are widely used at Google for storing and interchanging all kinds of structured information. The method serves as a basis for a custom remote procedure call (RPC) system that is used for nearly all inter-machine communication at Google.

What are protocol buffers?

Protocol buffers are a combination of the definition language (created in . proto files), the code that the proto compiler generates to interface with data, language-specific runtime libraries, and the serialization format for data that is written to a file (or sent across a network connection).

Is Protobuf lighter than JSON?

Protobuf messages were 9% smaller than JSON messages and they took only 4% less time to be available to the JavaScript code.


1 Answers

This post compares serialization speeds and sizes in .NET, including JSON, BSON and XML.

alt text

alt text

http://james.newtonking.com/archive/2010/01/01/net-serialization-performance-comparison.aspx

like image 183
James Newton-King Avatar answered Sep 29 '22 11:09

James Newton-King