(Caution: extremely technical post ahead.)
I’m looking for a way to provide WikiPad with the ability to sync between iPhone, iPad, desktop and possibly other mobile platforms. I’d also like reuse the code in my future apps, and make it available to other developers, probably under an Apache 2.0 license.
I’m thinking a WebDAV-based solution might be best, because then users could sync to the cloud via MobileMe, or to a local desktop machine running a WebDAV server.
WikiPad’s current schema is quite simple:
CREATE TABLE page_store (name TEXT, contents TEXT);
but future apps might have more complicated, and more relational database-type schemas. It seems like what I want is a way to record all the transformations to the database since the last sync, and then upload a file containing that information. Other instances of the app could then download that file and replay the actions to synchronize their databases with the changes.
Suggested course of action:
- Get a WebDAV server up and running on a laptop.
- Upload a SQLite database file from a device to the server.
- ???
- Profit!
Peter Robinett has suggested basing the sync on a distributed version control system, such as GIT or Mercurial, since distributed version control systems are designed to deal with multiple concurrent changes to the source base. Seems technically feasible, but both GIT and Mercurial are GPL, which makes them incompatible with closed-source commercial apps (of which WikiPad is one).
Pingback: Tweets that mention Sync Library Project for iPadDevCamp « John Brewer's Blog -- Topsy.com
If you’re interested in an open source git library that can be used in commercial apps and is potentially usable (still would require work), check out:
http://github.com/geoffgarside/Git.framework
http://github.com/geoffgarside/cocoagit
how about incorporating sync via Dropbox? I understand they have an API.
This might be useful? Open source and used to sync iPad and Mac apps http://www.simpletext.ws/