[Unison-hackers] Version compatibility

Tõivo Leedjärv toivol at gmail.com
Wed May 12 16:40:52 EDT 2021


On Thu, May 6, 2021 at 9:19 PM Tõivo Leedjärv <toivol at gmail.com> wrote:
>
>     RPC wire protocol itself (with the tiny exception of message ID) and
>     its payload are by default encoded in the same wire format. It is
>     possible to supply other marshaling functions, which the streaming
>     protocol does, for example. This way, any data encoding done at
>     application layer can be used directly as on-the-wire format for the
>     payload, or it can be encoded further in the default wire format.

It turns out that also the Prefs module is doing its own data encoding
before handing it over to RPC. It still uses OCaml's Marshal, so it is
the same format regardless.

Just mentioning this for completeness. It is already covered in Stéphane's work.

> - **RPC protocol**
>   - I don't think any major changes are needed at this layer. To enable
>     easy extensibility, I propose to remove Unison version check at remote
>     connection opening, replace it with an actual protocol version and add
>     a simple version negotiation method. Here, I do not propose to version
>     the API itself, just the RPC mechanism and wire protocol.
>   - I have a working prototype and will soon create a PR for review.

There is now a PR at https://github.com/bcpierce00/unison/pull/507

> - **Application/API**
>   - Clearly some kind of versioning is needed here. Instead of using an
>     actual version number, I propose a solution based on negotiation of
>     capabilities (or, well, features).
>     See the details of this proposal below.
[...]
>   - I plan to do a PoC for feature negotation proposal soon.

There is now a PR at https://github.com/bcpierce00/unison/pull/509


More information about the Unison-hackers mailing list