arcor2
arcor2 copied to clipboard
Refactor WS clients
Currently, there is one implementation of WS server (used by ARServer and Execution) but there are more implementations of WS clients:
-
arcor2_arserver
has asyncio client for Execution. -
arcor2_arserver_data
has a client for ARServer, that is used in ARServer tests so far. -
arcor2_execution_rest_proxy
has a client for Execution.
Ideal state:
- There is a
ws
module inarcor2
that contains a general implementation of a server (already exists) and a client.- The question is whether the general client should be sync or async.
- It should be possible to run async code from sync one (even within Flask).
- Another option would be to make it sync and prepare an async wrapper.
-
arcor2_arserver_data
contains a client for ARServer.- To be used in tests, or in some alternative user interfaces.
-
arcor2_execution_data
contains the client for Execution.- To be used by ARServer and Execution Rest Proxy.