Re:FlexBuffers
by senderista on Sunday June 21, 2020 @02:54PM
(#23594341)
If this is your thing, then this is your book:
https://www.cambridge.org/core/books/compact-data-structures...
https://www.cambridge.org/core/books/compact-data-structures...
It doesn't seem to me like Protobuf is ideal for this use case, but sure, I see how the light compression afforded by Protobuf encoding could lead to a win vs. bare C structs.
I think a better answer here, though, would be to use an actual compression algorithm that has been tuned for this purpose.
Of course, then the uncompressed data needs to be position-independent, so no (native) pointers. You could use something hand-rolled here... but also, this is exactly the problem zero-copy serializations solve, so they might be a good fit here. Hmm!
I'd be pretty interested to compare layering a zero-copy serialization on top of compression vs. protobuf encoding in these high-performance computing scenarios. Is that something you tried doing?