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

Clients should provide a websocket protocol version to specify which version of the Websocket protocol they speak #1368

Closed
cloutiertyler opened this issue Jun 11, 2024 · 3 comments
Assignees

Comments

@cloutiertyler
Copy link
Contributor

cloutiertyler commented Jun 11, 2024

John: SpacetimeDB should support reading from a new header, X-Client-Version, which contains the client’s supported SDK version. Important: this version should match the SDK’s supported SpacetimeDB version and may not exactly match the actual SDK version. For example, SDK version 0.5.1, 0.5.1.1 or 0.5.2 might report they support SpacetimeDB version 0.5.1.

Tyler: X-Client-Version <- this is the old way of doing things with custom header names, please check the relevant RFC

@cloutiertyler cloutiertyler changed the title Clients provide version to SpacetimeDB via header Clients should provide a websocket protocol version to specify which version of the Websocket protocol they speak Sep 9, 2024
@cloutiertyler
Copy link
Contributor Author

For example, if we make a breaking change to the websocket protocol, we can still support client which connect with the old protocol version.

@cloutiertyler
Copy link
Contributor Author

This is actually already implemented with the Sec-WebSocket-Protocol header. We currently pass either v1.text.spacetimedb or v1.bin.spacetimedb as the header value. If we make a breaking change, then we can introduce a new version v2.{text/bin}.spacetimedb.

@cloutiertyler
Copy link
Contributor Author

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