The mirroring that is required for your purpose must be a synchronous mirroring.
This kind of replication strategy is generally achieved via mechanism implying ACID transactions. It always implies a certain latency when doing an operation on any of the machine.
Typically, this would work somewhat like this (simplified):
- Machine A performs an operation that requires update of the map.
- Machine A sets a lock on its map
- Machine A ask B to set a lock on its map
- Machine A updates its map
- Machine A informs B of the required update
- Machine B updates its map
- Machine B informs A that it finished and releases the lock
- Machine A releases the lock.
This approach is decentralized. No master. But this way of proceeding is very very heavy if there are many writes on both machines: your map will quickly become a bottleneck. And it is utterly complex: you have to address everything that can go wrong, for example, on of the node that would crash while he locked the table.
Another approach could be to make one machine the master for this table and replicate the changes to the other. Doing so replaces the locking mechanism, and increases the fault tolerance against every machine but the master. In terms of performance, you'll have the same drawbacks that the initial approach.
You can overcome these replication issues by adopting a partitioning strategy (every machine is responsible for some part of the data, to be defined if horizontal or vertical partitioning).
Another approach, even more scalable is to have asynchronous synchronisation: every database is independent, and from time to time they syncrhonize. This can work together very efficiently if used in combination with horizontal partitionning.