Hello, again, everyone.
I have a hypothetical situation where a number of desktop clients (lets say 100s) all on a local network want to display and modify a shared set of data (lets say its small, like 1MB total). Basic requirements:
- Clients update to changes to the state in near real-time
- Any client can modify the state, causing all others to update
- Conflicts arising from multiple incompatible updates to the same data at the same time are resolved in such a way that the user can understand (and, if necessary, amend) them
- Clients can easily join and leave the group at run time
- Low enough traffic to not flood the network
- Clients can't rely on external services being present on the machine - they need to be able to launch them if they need them
I think this must be a pretty common scenario, so I wondered what people's thoughts were on possible solutions to it?
Having one master and several slaves is probably one; when an update is made on a client, a command message is sent to the server, who then relays it on to all the clients. How would people implement that? Some kind of pub/sub setup using AMPQ? Roll your own? Something else?
Master/slave seems a bit passé these days, though. Are there any distributed solutions? I briefly wondered if a distributed database like Riak or Cassandra could work, but joining / leaving the group seems like a faff, and they don't seem to have full replication in mind (as they're set up to deal with huge data sets). Something like a gossip protocol feels like a good way to pass around the updates, though.
This seems like it should be a well-solved problem, and there should be a tool (or set of tools than can be plugged together) to achieve all the grunt work, but I'm not sure what it is.
Anyone have any thoughts?