N-way multi-master replication