On second thought, this idea is great for clients to decide whether they are recent enough to parse a response. But if they're not, they are basically broken right then.
In theory, we can avoid that. We know in advance when we're going to make major protocol changes, and we typically give people a heads-up of 1 or 2 months before deploying those. Should we add another optional field "next_major_version" that contains an ISO date ("2014-10-01") and indicates when the next major protocol is going to happen?
Trac: Resolution: implemented toN/A Status: closed to reopened
To tell the client about upcoming changes is an interesting approach!
I've not seen it used anywhere, but I like the idea.
Most clients usually won't work after a major version change and
adding the version field will enable them to inform their users
about the failure reason. That's way better than some unexplainable failure.
The information about the upcoming change enables the client
to inform its users about upcoming problems. So, there could be a warning
and suggestion to update the client software.
The ISO date format is fine.
Maybe name the field next_major_version_scheduled in order to make the
meaning clearer?
Indeed, those three words look out of place there. I also changed the protocol version in the code to 1.1 and cleaned up the ChangeLog a bit. That should resolve this ticket. Closing again. Thanks!
Trac: Status: needs_review to closed Resolution: N/Ato implemented
18:05 chinguch1: karsten: why not version onionoo using the URL18:06 chinguch1: karsten: onionoo.tpo/v1/summary18:08 chinguch1: karsten: you can default the latest one with no version ex-onionoo.tpo/summary can be v2 and onionoo.tpo/v1/summary for clients that havent updated18:09 chinguch1: or do the versioning with HTTP Accept18:09 chinguch1: instead of doing this within the response object18:09 chinguch1: which breaks everything
cypherpunks/chinguch1, what you suggest would require serving multiple versions at once, which was never done before and which is currently not planned. I'm not saying that it's a bad idea, but it can be difficult to implement, depending on the protocol change.
Note that we're only making it more explicit now that a protocol change might break clients. We already had to make backward-incompatible changes in the past. We announced those changes months in advance and gave developers the opportunity to adapt their code. So far, I didn't hear about problems with this policy.
And technically, clients will not automatically break by a major protocol version bump. It's just that it's their fault if they break, not the server's fault.