Don't Use Protobuf for Telemetry
richardstartin.github.io
Don't Use Protobuf for Telemetry
1–10 of 195 posts
Re: Don't Use Protobuf for Telemetry
#2Re: Don't Use Protobuf for Telemetry
#3Re: Don't Use Protobuf for Telemetry
#4Re: Don't Use Protobuf for Telemetry
#5Re: Don't Use Protobuf for Telemetry
#6then what should we use? MQTT?
Re: Don't Use Protobuf for Telemetry
#7By comparison, protobuf-net [1] is about 260KB and 68 classes. Python's [2] is a 1MB package download (with source).
Why's the Java one so big?
Re: Don't Use Protobuf for Telemetry
#8Re: Don't Use Protobuf for Telemetry
#9His point on protobuf-java library adding nontrivial bloat to his Java app is definitely valid. However, his other argument about protobuf wire format being inefficient is hard to square with decades of practical experience Google had with protobufs, which are used for literally everything, including telemetry, and high throughput, low latency applications. Sure, having to recursively precompute lengths before serial…
I didn’t like it until I was forced to use it. Now I’m not sure I’ll ever go back.
There’s a handy code snippet to turn any protobuf message into JSON:
from google.protobuf.json_format import MessageToJson
import json
from pprint import pprint as pp
pp(json.loads(MessageToJson(msg)))
Examples of turning arbitrary tensorflow objects into JSON: https://twitter.com/theshawwn/status/1331625739993575427?s=2...Re: Don't Use Protobuf for Telemetry
#10We already have FlatBuffers, which allow you to send structs on the wire without reinventing anything. It sounds like it's a good match here. Protobuf is better if you care about the byte count on the wire and less about the CPU time to pack and unpack it.
https://codeburst.io/json-vs-protocol-buffers-vs-flatbuffers...