Support for multiple protocols

Hannes Braun
2026-02-25T20:03:55Z

I started working on the implementation of the monitor protocol yesterday and I have a few points where I'd change the protocol (more on the details when I have a working prototype). These changes would not be backwards compatible. But I think about also supporting the old SimSpark version of the monitor protocol. This brings me to the question: should we implement some mechanic to support more than a single protocol? This can also be applied to the agent protocol of course. Also, that allows us to integrate a compression of the outgoing monitor messages into the server in order to reduce the required bandwidth in exchange for a little bit of CPU time. Only if we want that of course... And if we decide that we want to support more than one protocol, I wonder how it should be realized. Do you specify the protocol as a flag at startup of the server and all connecting monitors/agents need to use this protocol then? Or do we listen on multiple ports and the port number determines the protocol? Or do we add an initialization phase to the connection procedure where you have to send a message like `(protocol )` as soon as you're connected to choose the protocol before proceeding? I don't have a definitive answer to those questions myself. What do you think?