所有这些都提供二进制序列化、RPC 框架和 IDL。我对它们之间的主要区别和特性(性能、易用性、编程语言支持)感兴趣。
如果您知道任何其他类似的技术,请在答案中提及。
最佳答案
除了性能方面,Uber 最近在其工程博客上评估了其中几个库:
https://eng.uber.com/trip-data-squeeze/
他们的赢家? MessagePack + zlib 用于压缩
Our goal was to find the combination of encoding protocol and compression algorithm with the most compact result at the highest speed. We tested encoding protocol and compression algorithm combinations on 2,219 pseudorandom anonymized trips from Uber New York City (put in a text file as JSON).
这里的教训是,您的需求决定了哪个库适合您。对于 Uber,由于消息传递的无模式特性,他们无法使用基于 IDL 的协议(protocol)。这消除了一堆选择。同样对他们来说,发挥作用的不仅是原始编码/解码时间,还有静止数据的大小。
尺寸结果
速度结果
关于protocol-buffers - Apache Thrift、Google Protocol Buffers、MessagePack、ASN.1 和 Apache Avro 之间的主要区别是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4633611/