-
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
After we remove 'keep-alive', should the "Subscribe" header change? #101
Comments
There's an option we might want to specify that we haven't captured anywhere else in the spec yet, and this might be a good place for it. And that is a server flag specifying whether operations are linearized. (Eg through transform in an OT system). Lets say the server received these updates:
The server can send the updates as-is:
This makes sense in a CRDT / sync9. Or it can use OT to linearize it to this, and send the linearized version:
The linearized form is how most OT systems (like sharedb / sharejs / google docs) work. It saves a lot of complexity for the client:
Anyway, thats all to say, I propose we change the header to be either:
Or something like that, so the server can tell the client if it can ignore versions and blindly apply all the changes it sees, or if its expected to make & maintain a DAG of all the operations its seen to be able to interpret incoming updates. |
The idea of having this mode switch is being discussed in #92 |
Should Subscribe be an HTTP request method instead of a header of the GET method? e.g.:
Pros:
Cons:
|
We talked to some people at IETF about this and they said politically it’s almost impossible to add new http methods. If it’s going to make the spec harder to ratify, I’m happy to just overload GET. |
Empty headers are allowed in HTTP, although I agree they are ugly: Curl has a bug report about this: I do also see the potential merit of creating a separate method, even though I think there are other reasons to keep this with GET that will become more apparent over time as we develop programming APIs on Braid. Overall, I currently lean towards keeping it with GET. However, I want us to make the best decision, and so let me give a little more ammo for the other side. I believe I was present in the IETF conversation Seph is referring to, but FWIW my memory was people saying that it is much harder to create a new method than a new header— not that it is "almost impossible" to add new HTTP methods. So if we do conclude that a new method would be best, I think it would be worthwhile to propose it to the HTTPWG and let them shoot it down, rather than close the possibility before giving it a shot. But I think we'll need to explore programming APIs on Braid, and flesh out the different types of subscriptions (e.g. automatically-expiring subscriptions, etc.) before we can make a good final decision here. |
You could define a new method and then one could use almost standard |
Good point. Also, the
If we want |
Closing this issue; discussion of subscription parameters is moving to #123. |
After PR #93 is merged, we'll have changed the "Subscribe" header from 3 variants:
to a single variant:
I like this simplifying change quite a bit; however, this carries several issues forward and introduces some new ones.
curl
expect headers to have a colon and value.For example, neither
curl -H Subscribe
norcurl -H Subscribe:
will successfully pass "Subscribe" as a request header, but "Subscribe:keep-alive" is passed as a header:The text was updated successfully, but these errors were encountered: