Generate the serialisation logic in the messaging layer with tooling instead of the custom case-by-case logic #18
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
Currently, all of the serialisation logic for the control message primitives are all built on top of hand-crafted code:
monomux/src/control/Message.cpp
Lines 224 to 340 in 6707ba0
While arguably this is the only part of the project that's actually tested, the logic behind the communication system follows a clear pattern, and there are not many data types that are generally transmitted (things are either strings, numbers, tuples, or an array of these...).
This means that the communication layer, the full serialisation logic, and perhaps even the automated tests for it (!) could be generated automatically from a sufficiently concise DSL. We should steer clear of heavyweight communication protocol libraries (such as Apache Thrift) or DSL parsers that depend on compiler-grade tooling (such as ODB implemented as a custom GCC frontend action) as such tools might make our compilation process too complex.
While this could be implemented as a fully backwards-compatible change, it might be worthwhile to do this together with (or as a precondition of) #17 and several other planned communication layer changes (e.g., #14). We might realise during making this that a different format is more suitable for comfortable automatically generated serialisation, and it would be great only to break ABI once if we can afford it.
The text was updated successfully, but these errors were encountered: