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
\n
byte. This prevents user from sending multi-line commands or their parameters because the embedded\n
breaks implicit command boundaries. - Output is always string from
table_print()
. Consequently: - 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 bytable_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.