gaus...@gmail.com
unread,Jun 7, 2019, 9:03:15 PM6/7/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Cap'n Proto
I have a use case that I'm not sure this library supports, but this is the most likely choice I've seen. If you're aware of a better option, I would be delighted to know about it.
I have a multiprocess system, probably multi-machine. When starting up, there is a connection phase as everything gets going, then steady streams of typed data. (Not a fixed list. May be additions after compiling)
Right now, data is passed between processes as void*, size_t. Lots of issues there, not least of which is that there no way to check the types except looking at documentation. So if you connect the wrong thing, not only do you fail, you fail while you're supposed to be running.
I want to use Cap'n Proto to, during the connection phase, send something to verify the data is compatible. I won't have access to actual data at this point. I don't think I can compare schemas directly, since they can be added onto and changed.
All of the processes are "trusted". Namely, they're not malicious, but they might be stupid. If they break things, I want to be able to point at them and say "They did it".
I have the authority to limit the capabilities of Cap'n Proto we support, though I would prefer not to.
I saw the unique ID generator, but if some future dev just copies a schema and changes it, that won't work, right?
My other idea was to do a default construction and send that, then try to decode it at the other end. I can't tell what happens if it fails (an exception, I think), or what happens if you have two different, but similar struts (xyz coordinates and GPS LLA are all 3 float64s for example).
I think the default message should work, but I can't be sure. And it doesn't feel like the right way.
Thanks for any advice.