quietlychris / meadow

Publish/request middleware for robotics applications, with a focus on ease-of-use
Mozilla Public License 2.0
36 stars 1 forks source link

Add option for graceful dis/re-connection of Nodes from Host #23

Open quietlychris opened 2 years ago

quietlychris commented 2 years ago

Right now, if Nodes stay up, but the Host crashes, the Node will not attempt to re-connect, even if the Host becomes available again. This could be fixed through better state management; if the Node doesn't get a reply from the Host within a certain amount of time, it will reset to Idle, and begin periodically attempting to reconnect to the Host at the original address. There might be other ways of doing this as well; find some reading on how other middlewares do this sort of thing.

quietlychris commented 2 years ago

This can be done using the above through the TCP connection, but in practice should be probably be addressed using UDP. The branch udp is currently being developed in support of this, which should allow for the Msg::SET to be used across networks with poor connectivity.

quietlychris commented 9 months ago

Do we currently have state transitions for Node<Tcp, Active, T> back to Node<Tcp, Idle, T>? That could allow us a fallback, and then maybe have a fallback in terms of connection policy for the Node attempting to reach back out to the Host.