Comments (4)
Another option, I'm realizing, is to treat msg_type
as a version. So a msg_type=1
message will ALWAYS look the way it's specified in the spec, as a data response
, but of course that doesn't prevent us from specifying a data response v2
message type with a larger msg_type
value that works differently. The same idea applies for post types.
This would prevent old nodes from breaking, and adds no extra data overhead. A downside is that a pair of peers will have no explicit knowledge that they're on different versions, but one side can infer they are when they receive a message of a type they aren't familiar with.
This logic also applies in the event that a message or post type has a security vulnerability discovered in it, where newer clients can choose to ignore older post and message types that are known to be deprecated and have newer replacement versions. Like the previous situation, here the newer client will detect there is a compatibility mismatch when they receive deprecated messages or posts.
from cable.
This is a good point. I think we need both of these: protocol versioning and post versioning. We're definitely not going to get everything right on the first try. 🙃
I like the idea of exchanging protocol version #s during handshake, primarily because even if we end up changing something very fundamental, like the shape of request headers, peers will know right away they aren't compatible with each other. This would mean us adding wire protocol for said initial handshake.
I think it would be reasonable to add one byte to the post header. Given the header's current size (129+ bytes), another byte only makes it 0.78% larger!
from cable.
If we treat each message type definition as immutable (i.e. msg_type=1
will ALWAYS have the given binary format), we don't need any other versioning across the protocol, right? Right now the cable protocol is made up exclusively from messages and posts, and if both are implicitly versioned, we're done, right?
I do think that, if we have a handshake specification, that ought to be versioned!
from cable.
we have a handshake with versioning now :) https://github.com/cabal-club/cable/blob/main/handshake.md
from cable.
Related Issues (14)
- Some Questions HOT 1
- Time? Whose? HOT 4
- what kind of varint HOT 1
- reusable circuits
- sub-protocols
- Questions & Comments HOT 1
- post header: move timestamp to be header field 5 HOT 1
- after v1 review: create test vectors to facilitate interoperating implementations
- SHA-256 or SHA-512 when signing? HOT 3
- handling of deletes and channel state HOT 16
- Handshake: Post-Handshake Operation missing end-of-stream marker to protect against stream truncation HOT 6
- Eventual consistency issue + proposed solution
- how to handle "aliveness" of a req_id in the case of a requester sending a post request to multiple peers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cable.