control protocol redesign
Version affected: 5.2.0
Current control protocol has several deficiencies:
- Input commands are read as text, individual commands are delimited with
\nbyte. This prevents user from sending multi-line commands or their parameters because the embedded
\nbreaks implicit command boundaries.
- Output is always string from
- control protocol cannot represent e.g. Lua errors - these lead to empty output.
- sending structured data to another instance is PITA as it has to be serialized into string before it is returned to
table_print(), and this serialized string is then (again) decorated by
table_print()with string delimiters
I don't know what's best approach to address this but I think it is worth exploring existing solutions (protobuf? something else?) before inventing our own serialization format and control protocol.