Difference between Apache Thrift and ZeroMQ

前端 未结 3 1218
甜味超标
甜味超标 2021-01-31 08:57

I understand that Apache Thrift and ZeroMQ are softwares belonging to different categories, and it is not easy to do a comparison since it is an apple to orange comparison. But

3条回答
  •  独厮守ぢ
    2021-01-31 09:36

    Thrift defines how to represent complex data so that it can be written and read by different languages (hence it has IDL to define types that will be transported). It also defines simple means to transport such formatted message between two end points (aka thirft transport).

    On the other hand ZeroMQ shines in ways you can transport message between endpoints in order to acquire different behaviors like one to one, one to many, many to many, and different expectations of speed and reliability of such transfers. And as for message itself it is just a blob to ZeroMQ, and apps should find a way to encode decode them.

    So if you have complex data structures but simple messaging patterns, you might lean on the thrift side. If you have simple data but complex messaging patterns, you might lean on the ZeroMQ or something like that (AMQP).

    And if you need both, you could use THrift and ZeroMQ in pair, thrift to format the message, and ZeroMQ to transport it.

提交回复
热议问题