Versioning

How MCoP versions are negotiated at initialize, how conversation schema versions and downgrades work, and what changes need a new version.

MCoP has two version numbers: the protocol version of the message layer, and the conversation version of the event schema. Both are negotiated once per connection, at initialize.

Protocol version

  • The client sends protocol_versions, most preferred first. Version 1 is "1".
  • The server answers with protocol_version, the first version it also speaks.
  • If there is no common version, the server answers unsupported_version and does not accept the connection.

Conversation version

  • The client sends conversation_versions, the schema versions it can read.
  • The server answers with the versions it can write, and each snapshot names its conversation_version.
  • A client MUST ignore fields it does not know. A server MUST NOT remove a field within a version.

Downgrades

When the client asks for features the server does not offer, the server does not refuse the connection. It leaves them out and lists them in downgrades. The agreed object lists what both sides will use. A client SHOULD check downgrades and adapt its behavior, for example by not showing a surface when the server does not send them.

What needs a new version

ChangeCompatible within a version?
Adding an optional fieldYes
Adding an event type that old clients can ignoreYes
Adding a command typeYes, if old clients never need to send it
Removing or renaming a fieldNo
Changing the meaning of a field or a dispositionNo
Changing the digest or the cursor formatNo

A change that is not compatible requires a new protocol version. The old version keeps working until it is retired in the Changelog.

Next steps