Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Which database stack to use for distributed offline db scheduled sync
1 point by Aheinemann on Oct 12, 2014 | hide | past | favorite | 1 comment
Setup: Master Database with local offline copies on mobile device which will be synchronized eventually when network connectivity is reestablished.

Access to Application is via HTML/Javascript (UI in browser on notebook, tablet, mobile phone ), mobile Database on Windows Notebook serving locally connected devices, accumulating writes and eventually synchronizing with master Database in the Cloud (via VPN, Master Database inaccessible from the internet).

Which Database Stack / Template Engine would support this kind of setup (Windows OS) best ?

Problems: Sync of conflicting writes by different offline Databases to master regarding the same record

would like to avoid complex software stack (WAMP / LAMP) because PHP-Files & database would be locally accessible at the offline-nodes. Would Prefer a windows service (or combination of services) which would include web-server, database and sync to master database without application logic accessible (and possibly altered) at offline node.

Have been looking at simple c# Webserver demos (seems doable) (on request: send html+forms, post+get, send resources (image, css, js, cookies), processing forms in c#, using SQLLite for local storage.

Database schema would have each database copy identified by Unique ID such that the master database can track which local database last updated a record and when, also keeps history of all updates per record for compliance.

A local database can only overwrite a record at the master db if the old value updated at the offline database was still current with the master (e.g. nobody else had written that record since the last sync). Otherwise there would be a conflict which i have no idea how to resolve (last write wins ?, could loose money or limb)

I am looking forward to any hints...




Have you looked at CouchDB and its mobile accomplice PouchDB? -> http://pouchdb.com/

That seems like a good place to start.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: