SQLite synchronisation RRS feed

  • General discussion

  • I'm writing an app that uses SQLite to store the data. I'd like to implement functionality to synchronise database changes between two computers running the app, or between a Windows 8 computer and a Windows Phone running the phone version of the app.

    The first thought was to use the Sync Framework but this requires a server as the database backend, and the user would then synchronise their local copy with a copy stored "in the cloud". So two potential challenges here:

    1. Cost. In theory, I could make this an in-app purchase on a renewable basis but I'd need to figure out a reasonable cost would cover the use of, say, Azure Mobile Services.

    2. Each user would have one or more databases in their app. How would I sync against multiple databases on Azure? For example, I'd need to figure out a way to avoid database name clashes.

    My second, and frankly preferred thought, was to treat one of the app instances as the "master". The user would enable the sync feature to turn on a listening feature in the app, then the second Win8 computer or the WinPhone would communicate with that first device (the user would have to enter the IP address or maybe I could do something with NFC) and synchronise the data. The main challenge here would be tracking data changes across an unknown number of sync partners. This challenge occurs because I can't use the Sync Framework. I know that the sync toolkit will track local changes but I'm somewhat assuming that most of the heavy lifting of dealing with multiple sync partners is actually done at the server end, so I don't have that code (unlike the Sync Toolkit which has been open-sourced).

    Thoughts or comments? Any better suggestions on how to tackle this? Any open-source libraries that could perhaps be used to do the whole job of change tracking?


    Sunday, June 30, 2013 5:33 PM