-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kitsune2 Top-Level P2P Protocol #38
Conversation
@neonphog, have you ever worked with flatbuffers? I've never used them but I've heard that they're a better and more efficient version of protocol buffers. |
Protobuf is good with me, I think it's easier to keep track of breaking changes because protobuf provide good guidance for how to think about that and this doesn't affect app developers anyway. I can't think why somebody would want to integrate with Kitsune at the wire level but not want to use any of our types. I think that would only happen if they weren't using Rust and then what they'll actually want is the |
I have not, although I'd heard the same. My sense is that protobuf has the first mover advantage in popularity and tooling/rust integration. And I'm not too worried about the small amount of protocol overhead as the majority of the data we'll be transferring is the op content. But I'm totally up for experimenting with it if you think it is worth it! |
I don't know enough about flatbuffers to risk convincing you to use them 😉 all I know is that I trust the person who told me they are easier to work with and that it would avoid a lot of the boilerplate we added to support things like backwards compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top-level protocol, does this mean that inside of this protobuf message encoding there'll be MessagePack encoded messages that are passed onto Holochain?
Setting asside holochain for the moment, we indeed can do anything for the sub-encoding. Messagepack, json, cbor, whatever. If we're picking protobuf for the top-level, though, it probably makes the most sense to use it also for our internal module protocols. Now, on to holochain. The op encoding will be entirely defined by holochain. I don't think we want to change that yet, so that will remain messagepack. But that is opaque to kitsune and would be included in a sub-sub-encoding of the modules' protocols. |
So there are 3 levels of encoding. Is the |
Yep : ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with it all =)
RESOLVES: #26
Consider before approving:
pulling in and building the protobuf-src cratehaving to deal with needing the protoc binary. If we're switching to this, we should probably use it for the module message encoding as well (e.g. gossip messages / fetch queue messages / etc).