Mercerenies / gdlisp

Lisp on the Godot platform
GNU General Public License v3.0
141 stars 1 forks source link

Macro Server Data Exchange Format #9

Closed Mercerenies closed 3 years ago

Mercerenies commented 3 years ago

Currently, the macro server and the compiler process exchange information via an incredibly ad-hoc format. The command is a nonempty sequence of strings where each string is preceded by its length, and the response is sent the same way. The length of the sequence is agreed upon by convention and is not sent as part of the data, which is both messy and error-prone.

I propose we switch the whole thing to JSON. A command is a single JSON string, still preceded by its own length, and a response is the same. We can send any number of arguments and additional information in a nice well-defined way via JSON.

Mercerenies commented 3 years ago

2ec6a5e and 3c7c92d (for, respectively, commands and responses) close this issue. All communication with the server takes place via JSON objects now.