protocol-buffers - Apache Thrift、Google Protocol Buffers、MessagePack、ASN.1 和 Apache Avro 之间的主要区别是什么?

标签 protocol-buffers thrift asn.1 avro

所有这些都提供二进制序列化、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)。这消除了一堆选择。同样对他们来说,发挥作用的不仅是原始编码/解码时间,还有静止数据的大小。

尺寸结果

Size Results

速度结果

enter image description here

关于protocol-buffers - Apache Thrift、Google Protocol Buffers、MessagePack、ASN.1 和 Apache Avro 之间的主要区别是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4633611/

相关文章:

java - 在 Python 中使用 HTTPS 的示例 Apache Thrift 服务

python - 无法在thrift教程中导入shared.SharedService

java - 解析 ASN1 数据

java - 如何解码ASN1字节以提取信息?

asp.net-web-api - 带有 Protocol Buffer 的 ASP.NET Web Api - 错误处理

protocol-buffers - 我可以在 proto3 中定义一个有序的混合消息数组吗?

protocol-buffers - ProtoBuf 中的 "missing optional"/"empty repeated"字段使用了多少内存?

c++ - 向客户公开服务

java - 谷歌 Protocol Buffer pretty-print

ios - IA5STRING ASN.1编码格式: in-app purchase receipt validation and decoding