3 ms·
Do you have any opinions on Cap'n Proto vs Extprot[0]? [0]: https://github.com/mfp/extprot https://github.com/mfp/extprot
by lj3 10y ago
Do you have any opinions on Cap'n Proto vs Extprot[0]?
[0]: https://github.com/mfp/extprot https://github.com/mfp/extprot
- erichocean 10y agoI haven't seen Extprot before you mentioned it. That said, it appears to require deserialization and that's something we avoid. LMDB can hand you back a pointer to your object in the memory map, and we can easily use that pointer with Cap'n Proto without any calls to malloc().
- AnbeSivam 10y agoWhat are your thoughts on SBE vs Cap'n Proto. I don't know much about serialization libraries, but was thinking about looking into these both soon. Since you are using Aeron, I thought you would have looked into SBE( since developer being same for both) and not decided to go with it.
- erichocean 10y agoSBE is better if you don't have (much) in the way of message format evolution and you intend to read each message in full. Cap'n Proto has a way better compatibility story, and there's no need to read the entire message just to read a particular part. SBE is very good for its intended use case: high-frequency trading with tiny, but tons, of small messages. Cap'n Proto is better for use as a stable (but evolvable) message format between systems (e.g. RPCs), or for on-disk storage if you've got a database (like LMDB) that doesn't force you to copy read-only data.
- lj3 10y agoThank you! I'm very newbish on this stuff, but I'm trying to learn.
- kentonv 10y agoI hadn't heard of Extprot before so I took a quick look. It appears to be heavily inspired by Protobuf, having almost exactly the same arrangement on the wire, adding a few tweaks but keeping many idiosyncrasies. The Cap'n Proto documentation compares it extensively with Protobuf and most of those comparisons probably apply to Extprot as well. (Disclosure: I am the author of Cap'n Proto and also Protobuf v2.)