
Ask HN: Need help choosing a database for a local-remote multi master sync - bg0
Hi all,<p>I’m on a mission to find a the right database for a big project I’ve been working on for a while. As of right now, I’m on a CouchDB (Cloudant) NoSQL database in the cloud while using PouchDB on Asyncstorage using a library in React Native. It&#x27;s a bit buggy for me right now.<p>I was wondering if anyone has done something like my below use case and could give me some guidance on what I should choose. My biggest issue is wrapping my head around how to do these multi-master type syncing requirements I have. Any help or guidance would be greatly appreciated.<p>My use case is as follows:<p>Master Database — This is in the cloud. And is the complete repository where all documents are stored.<p>Local intranet(s) — We install a local database on a linux machine on worksites. They periodically have access to the internet, which is how they will grab and send data from the mater database; but for the most part, they will be offline but will be connected to a local wifi network that devices can access. It should be noted that I only grab specific documents from the cloud. Time based and maybe like 50 other documents that are based on type. And then obviously any documents that are added to the database, we push to the master manually when we have internet.<p>Device(s) — During an online set up with the master database or via the local intranet, there are about 50 documents that are necessary to run this application that we need to grab. This is where all the documents are created. Depending on worksite, we want to make live queries to the master database or live queries with the local intranet. Whenever a document is created, we want to push this to either one of those so all devices can share the same information. Whether it be device-&gt;local intranet-&gt;cloud or device-&gt;cloud, the documents that are created need to get off the device and to the master. Once they are on the local intranet, we are goodie, or once they are on the cloud.<p>I should note that we never update a document atm to avoid conflicts and to keep an audit trial.
======
ddorian43
Try [https://www.2ndquadrant.com/en/resources/postgres-
bdr-2ndqua...](https://www.2ndquadrant.com/en/resources/postgres-
bdr-2ndquadrant/)

~~~
riku_iki
It is not really multi-master sync, it is master-slave sync (they call slaves
as shadow-masters from some (marketing?) reason).

