Closed tian2992 closed 9 years ago
Working on it on d71c415bb9ecca6cbf62404e8b5a8638cba4634c
More progress on 4c8460eb35b42720e8ca6318d402e013ac6937a5 Still pending adaptation to AYAB plugin.
Added async callbacks dict in order to handle User Machine communcation in an abstract way. Solving the Inversion of Control problem.
Note that this leaves the responsibility to handle session and UI control to another layer, namely knitweb backend.
Seems async (and blocking) callbacks are used too in the UI and some parts of PDD emulator, so can be adapted for both plugins.
I'd like to do a Web API draft before freezing this API. Server will need to be compatible with push notifications, websockets or some notification in order to block until user operation is completed.
We have settled on async callbacks using Web Sockets which will be handled on Knitlib-webserver.
Will add some tests and close.
Callbacks are the main communication method for bidirectional plugin support.
Defining a clear way for plugins to communicate errors or status to user facing UIs (load yarn, error has occurred, etc)