First draft for a launcher web api
This is a draft specification for a web API that extends (and possibly replaces) the existing ad-hoc TCP socket API for controlling the launcher from an external program.
In particular, the new API contains all the functionality needed for RoboBlocks integration with full support for all features used in "Brickly" (access to STDIN/STDOUT/STDERR, block highlighting). The crucial features for RoboBlocks are
- Read an write app files (used to implement load/save)
- List launcher apps (used for an app list for the load button in "advanced" mode, not used in a Brickly-like "simple" mode)
- Advanced app control via Websocket: Used to start/stop apps from RoboBlocks, get access to STDIN/STDOUT/STDERR of the app, and implement block highlighting and/or "slow motion" mode (this will use the "debug" channel).
The websockets API will be implemented partially by the launcher ("control" and "io" channels), and partially by the app itself ("debug" channel). The plan for RoboBlocks is to support the "debug" channel with an implementation based on BDB (and maybe later on extend it to a full blown remote debugging API for all launcher apps written in python).
The other specifications are there either because they are supported by the existing TCP API (the /message REST API) or because they can be used either in a rewrite of the generic TXT web interface or in a full-featured web based TXT IDE later on.