Open mKeRix opened 3 years ago
I would be amazingly happy if it used Consul for cluster and state management - its quite light-weight ,resilient and easy to work with - and incredible well tested/implemented. It's a fairly light-weight daemon too for small clusters :)
While the current cluster implementation works, it's not without its issues and isn't well maintained. Instead, it might make sense to switch to a more standardized protocol for communication between the instances, like zyre (based on ZeroMQ). This would also allow other people to write software that integrated with room-assistant natively, e.g. an ESPHome integration that could feed Bluetooth data to a room-assistant cluster.
zyre.js is a NodeJS implementation of that protocol - it's missing the leader election APIs, but that could be added via a PR.