A few weeks ago we released Siaqodb 5.5 which allows you to sync Siaqodb with a server database like CouchDB via a WebAPI service. CouchDB has by default a very powerful built it replication system, so the implementation of the sync was quite straightforward.

Yesterday we released a new version of SiaqodbCloud service which fully supports MongoDB, so now you can sync a Siaqodb bucket with a MongoDB collection without any modification at the client side. It supports all features CouchDB supports: incremental sync, conflict detection etc. The implementation is done using Mongo’s Oplog so the replica set must be activated even there is only one MongoDB server.

The oplog is a capped collection that keeps a rolling record of all operations that modify the data stored in your databases. Being a capped collection, it has a fixed-sized and it automatically overwrites its oldest entries when it reaches its maximum size. So a special attention must be paid to its size to be able to keep a history of changes that your clients will need. To change and play with its size you can take a look on MongoDB documentation.

To handle conflicts, every MongoDB document will have an extra property/field called ‘_rev’ and it must be updated at every update of the document. SiaqodbCloud does this automatically so nothing should be done, but if you use an external system that modifies data in MongoDB, then you should update ‘_rev’ field. SiaqodbCloud service is open source so you can check more deeply how it works.

Enjoy!