Sync Library Project for iPadDevCamp

(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).

4 thoughts on “Sync Library Project for iPadDevCamp

  1. Pingback: Tweets that mention Sync Library Project for iPadDevCamp « John Brewer's Blog -- Topsy.com

  2. how about incorporating sync via Dropbox? I understand they have an API.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>