Prepare tansiv-client to support more connection options than just UNIX sockets
Tansiv-client and the coordinator currently communicate through a UNIX socket only. To scale the number of VMs, it will be necessary to support at least IP sockets (most probably TCP), although for VMs co-located with the coordinator UNIX sockets definitely remain more efficient.
Tansiv-client should support several types of connections. Here are ideas about how to implement it:
- assume that all connections types will be based on sockets and support different types of sockets;
- encode the socket address and type in an
enum
; - record the socket type in
Connector
; - provide type-specific functions to create and destroy sockets but keep other functions generic (over sockets);
- should the socket itself be wrapped inside an
enum
? - use
dyn
traits? - base the generic functions on traits
Read
andWrite
only? - keep tests as generic as possible regarding the socket type (socket-related tests are currently tied to the UNIX socket module but most of them could be easily made generic).