1

There are couple of libs for data serialisation like MessagePack, Protocol Buffers etc.

But what should be the Transport Protocol? Should it be HTTP REST or any other?

To me it doesn't make much sense to use REST because HTTP has overhead. So, if we decide to optimise for speed and use let's say ProtoBuff it seems un-logical to go just a halfway and optimise only the serialisation without optimising the Transport.

Alexey Petrushin
  • 1,311
  • 3
  • 10
  • 24

2 Answers2

3

For Protobuf, you should use gRPC, which is Google's official RPC implementation. It's efficient, but more importantly, it is designed to integrate well with Protobuf -- e.g. you can write your service definitions in .proto files along-side your message types.

Another commonly-used transport which pairs well with many serialization formats is ZeroMQ.

Kenton Varda
  • 41,353
  • 8
  • 121
  • 105
2

Protocol buffers are just the common serialisation format. You can transport them however you want.

You can send the raw bytes via a tcp or even udp socket. But it may also be reasonable for your application to use http. You could even encapsulate them in html/xml if it makes sense.

david
  • 187
  • 8