-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature detection #89
Comments
Related: #49 And I completely agree. |
This came up at our fortnightly meeting today - we spent some time discussing how braid should behave if a client does not support a specified merge type. My preferred approach here is an optional header in subscribe requests:
If a client does not support a document's patch type, the server should replace patches in the stream with complete document snapshots. If a client does not support a document's merge type, the server should explicitly add merges into the stream. (Normally the merged document state is implicit, but the server could send explicit merge states for clients which need them. Eg given this situation:
If a client supports the merge type, the subscription stream would contain:
Version BC does not need to be sent because the client can compute its state based on patches B and C. However, if a client does not understand the merge type, the stream may be rewritten to:
This s a bit of a departure from the existing model because currently sent versions contain exactly one value, and merge states are implicit. Thoughts? |
I've realized that we need feature detection to work across caches/proxies as well. As was brought up in issue #74, if you issue a This needs to be true both for the origin server, and for any proxy in the middle. Otherwise, the proxy might interpret the PUT range as replacing the whole resource, and start serving that range to its clients instead of the entire resource, even if the origin server understands Conclusion: We need to make sure that feature detection works for all proxies in the path between the client and origin server, as well as the origin server itself. |
Seph notes in issue #67 (comment) that we'll want feature detection for both requests and responses:
|
There's a few cases where clients will need to behave differently based on the features of the server:
We should add a way for the client to discover the behaviour of a server. We could either add a
accept-patches
/accept-ranges
headers (and ?? not sure for versions). Or we could add some fields to theOPTIONS
response for a braid object.Thoughts?
The text was updated successfully, but these errors were encountered: