Version the communication protocol and prevent connection when client and server had breaking comms changes #17
Labels
Kind: Enhancement 🔮
New feature or request
Target: Communication protocol 💬⚠️
A part of the core library which deals with client-server messaging
Target: Core 💥
Core architectural support library
A lot of currently pending issues (#2, #5, #12, #14) will require changes to the communication protocol which would be backwards-incompatible. This would be the perfect moment to introduce, into the comms, a stable way of the server and the client discussing the versions of the protocol used. There should be a soft warning in case the server and the client are not the same binaries (string comparing
Version::
whatever), and a hard error preventing communication if the API had breaking changes.The API version should be versioned in a single global location in the code. A single unsigned number is enough... and we will hopefully keep updating it each time the communication layer changes.
An alternative solution would be creating a hash, at compile-time, from the most important and critical parts of the communication library. However, that would be too brittle and sensitive to refactoring changes in the source code itself that are irrelevant to the actual API at hand.
The text was updated successfully, but these errors were encountered: