I have a problem and that's why i am asking you experts ;-)
I have a company at 5 locations (lets say Hamburg, Munich, London and Berlin, L1 to L4 in the appended picture. All locations have exactly one server running a linux operating system. All locations are connected via VPN and a pretty potent internet conncetion, so up & down stream don't really matter.
Now the task: L1 was first and has a file set S1. Now L2 and 3 come and after some time L4 is connected as well. I now want all locations to be able to access the same file set S1 and as soon as files get modified they will be synced to all other nodes. So, if in L1 File1 is changed, it will be replicated immediately to L2, L3 and L4. The same if File 2 gets modified in L4, it will be replicated to L1, L2 and L3.
Important: I do not want a master server. If for example L2 fails (connection down, hardware failure) I want all changes to be replicated to L1, L2 and L4 and as soon L2 comes to live again it will be updated as well.
Which softare solution is best? Or is there some algo I can implement myself?
I would be glad to hear your opinions!!