Fog Creek Software
Discussion Board

offline then sync, strategy?

I  am trying to make an app used for data collection in the field. Where "the field" means the great outdoors, in an area probably with GSM cell phone coverage, but "maybe not."

All the data eventually gets synced up to a main database somewhere.

The platform for the data collection device is hopefully going to be Pocket PC, but could be a laptop.

It would be ideal to just do realtime updates to the database over the network, but I think that in many situations (esp. in the mountains ) there will be no network service, pissing people off.

I have an idea of how to collect the data local, then sync it to a database, but was wondering if there is a book or web site somewhere that describes a best practice for doing offline data collection, then sync. any pointers would be appreciated.


Tuesday, January 14, 2003


You might want to have a look at SQL Server CE at

Tuesday, January 14, 2003

Very eVb-centric, but many nice articles not specific to that language (SQL Server CE, Replication, ADOCE, etc.).  The best PocketPC site I've found so far.

Jeff MacDonald
Tuesday, January 14, 2003

I did a (technically successful) project which parallels this using java-enabled mobile phones.

Generally the data model that the user is viewing-manipulating reflects their business, whereas the model on the big server reflects everyone's business.

We kept a copy of model on the client.  Every time the client did something, we would send the command to the server, which would reply with the a completely new copy of the model (you could be more efficient, just send a diff).  The client then synced the two models before replacing the internal model with the received one.  Any changes (or lack of change if a command was issued but the server refused) was flagged to the user.

This was an async process.  As commands were issued, the parts of the model they affect were marked as 'pending'.  This allowed the user interface to flag this, but to carry on working as expected.

Internally, the network layer could cache commands until the network was available, and deal with timeouts etc gracefully.  This meant that, in the mountains or in tunnels or whatnot, the user could queue many edits and continue browsing their model, even if the network was unavailable.  Much better than a strict request-response serialisation being enforced all the way up to the user-interface-level.

Wednesday, January 15, 2003

Sybase got this right around 1997 with SQL anywhere, replication and powerdynamo and has in the meantime grown the whole mobile environment to have major marketshare. Evaluation downloads available.

SQL anywhere (Old watcom SQL) is so light yet scales to GB of data.

Wednesday, January 15, 2003

Thanks for the link Jeff!

The first article I saw (Pocket Access with CFM) saved the day for me. Someone just asked about this in a meeting this very morning. And I just happen to have printed it out so I could read it at lunch.... :)

Wednesday, January 15, 2003

Look at Sybase (iAnywhere division):
This seems to be targeted at your situation. Remotes collect any data changes on the local db and will contact the server with those changes and to receive any updates.

(Disclaimer. I am a Sybase employee, This is why I am familiar with the product line.)

Wednesday, January 15, 2003

*  Recent Topics

*  Fog Creek Home