-
Notifications
You must be signed in to change notification settings - Fork 92
Use Case: Versioning of Protocol
As we upgrade the features of Paco and move towards a cleaner interface, we need to provide limited backward compatibility to un-updated apps in the field. At the very least, we need to do the following:
- detect the pacoProtocol version of the client app and send back an outdated protocol message
- prompt the user to upgrade if the version is too old
Ideally, we could give the user the response in the last version of the protocol. However, we don't want to waste our resources on infinite backwards compatibility since there really is no reason for users not to upgrade (that may change in the unforeseen future.)
All clients now pass an HTTP header, pacoProtocol
specifying the version of the Paco protocol they speak on each request. The server processes this and handles it accordingly.
With the big upcoming change in the Experiment definition, we will be breaking the schema and will require every client to upgrade to the new experiment definition schema.
Clients should recognize an error from the server containing a message that they are out of date, with the string value "OUTDATED_PROTOCOL"
. This will either show up as the value of the "error"
key in the json response object, or, it may be the value in an http bad request error response. TBD.
The client should handle this error in whatever way is most appropriate, for example, by taking the user to upgrade their client.
If it is a minor upgrade, the server should still return results if it can. For example, if it is straightforward to make the addition or change and convert it to the previous schema.