3 ms·
What you use is perfect for short-range communication (application and child process talking over shared memory), but not good for long-range communication (ove
by codedokode 6mo ago
What you use is perfect for short-range communication (application and child process talking over shared memory), but not good for long-range communication (over Internet) because you can have old client talking to new version of a server, so you will have to add version numbers and have the code to parse outdated formats. But protobuf has compatibility built in and you do not need to write anything to support outdated clients. Also, protobuf uses solutions like varints to compress data to use less network traffic. So it is obviously made for long-range communication, and you probably do not have that and send 7 zeros for every small number.
TL;DR protobuf has version compatibility and compact number encoding.
- mgaunard 5mo agoI already said you can UUIDs and schemas, and even dynamic conversion between mismatched schemas. Doing plain C structs doesn't prevent any of this.
- codedokode 5mo agoIt requires extra effort to write conversion algorithm for older data structure version.
- mgaunard 5mo agoThe converter is generated automatically based on the differences between the two schemas. Takes zero effort other than CPU cycles.