Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance comparison of Thrift, Protocol Buffers, JSON, EJB, other?

We're looking into transport/protocol solutions and were about to do various performance tests, so I thought I'd check with the community if they've already done this:

Has anyone done server performance tests for simple echo services as well as serialization/deserialization for various messages sizes comparing EJB3, Thrift, and Protocol Buffers on Linux?

Primarily languages will be Java, C/C++, Python, and PHP.

Update: I'm still very interested in this, if anyone has done any further benchmarks please let me know. Also, very interesting benchmark showing compressed JSON performing similar / better than Thrift / Protocol Buffers, so I'm throwing JSON into this question as well.

like image 978
Parand Avatar asked Nov 17 '08 19:11

Parand


People also ask

Is Protobuf faster than JSON?

TL;DR — encoding and decoding string-intensive data in JavaScript is faster with JSON than it is with protobuf. When you have structured data in JavaScript, which needs to be sent over the network (for another microservice for example) or saved into a storage system, it first needs to be serialized.

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.

What is the difference between Protobuf and JSON?

JSON is simple to parse and generate. You can connect pieces written in different programming languages; “after all, it's just a string.” Protobuf is binary, so it doesn't have the advantage of being easily portable on its own.


2 Answers

Latest comparison available here at the thrift-protobuf-compare project wiki. It includes many other serialization libraries.

like image 70
Eishay Smith Avatar answered Sep 20 '22 07:09

Eishay Smith


I'm in the process of writing some code in an open source project named thrift-protobuf-compare comparing between protobuf and thrift. For now it covers few serialization aspects, but I intend to cover more. The results (for Thrift and Protobuf) are discussed in my blog, I'll add more when I'll get to it. You may look at the code to compare API, description language and generated code. I'll be happy to have contributions to achieve a more rounded comparison.

like image 36
eishay Avatar answered Sep 20 '22 07:09

eishay