Skip to content
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

Backwards compatibility for v1 peers #167

Closed
kurtkilpela opened this issue Jan 13, 2025 · 4 comments
Closed

Backwards compatibility for v1 peers #167

kurtkilpela opened this issue Jan 13, 2025 · 4 comments
Assignees

Comments

@kurtkilpela
Copy link
Member

RSR protocol v2 is not backwards compatible with v1 clients. This means, a server and all connected clients must simultaneously migrate to protocol v2 at the same time.

Backwards compatibility for v1 clients should be assessed and added if it can be done.

@kurtkilpela kurtkilpela self-assigned this Jan 13, 2025
@kurtkilpela
Copy link
Member Author

Protocol V2 changes affect:

  • RsrServiceSnapshot>>#encode:using:
  • RsrServiceSnapshot>>#decode:using:
  • RsrTemplateResolver
  • RsrProtocolVersionNegotiation(Client|Server)

@kurtkilpela
Copy link
Member Author

The move to protocol v2 is small. The breaking change is the switch to passing the template name and desired persona (client or server) to be created on the other side of the Connection. Previously, the name of the desired Client or Server class was put out onto the wire.

Right now, classes such as RsrServiceSnapshot handle encoding themselves using an encoder. I think this is wrong. This should be a double-dispatch and the encoder (or decoder) should handle the mapping between each object and its wire format. This would permit the use of a V1 and a V2 codec, each of which implements that specific version of the wire protocol.

@martinmcclure
Copy link
Member

Reference also the "transports" design for encoding/decoding, which will be required in order to support encrypted communications.

@kurtkilpela
Copy link
Member Author

Support merged in #171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants