I am thinking about switching from sql based db to Couch mainly because it has built-in sync features. I have read the docs, but never found any detailed info how is sync done. In my current sync model, device switches to new content when all new data is successfully downloaded. It works like isolated transaction - remains invisible until all data (JSON) and resources (images, movies) are downloaded and then replaces current set.
Switching to Couch, I would like to have data with embedded resources to ease transfer process.
My concerns are:
- Is the couchbase infrastructure good for distributing content to multiple devices? How about binary attachments embedded into documents?
- Device should get only part of server data (subset). I believe it is possible using filters with Sync Gateway?
- Can I have “transaction” on whole data set, and then activate it in similar way I am doing now, or it has to be synced item-by-item?
- How to detect that data has been synced? Is it possible to send some signal to the app? Or maybe there is some flag that app has to read?