Local/Remote Data

Deane Venske dean at eduss.com
Mon Oct 13 14:46:07 CDT 2003


Hi Ian,

> Yes. When the user chooses to "synchronize", the online data would be 
> updated to show any changes she has made and changes made by other 
> users would be downloaded to her machine.

First problem you're going to have is when changes have been made to the 
same data. Who's data is the most recent etc. We're busy writing 
software that has local and remote data sources. The fun part about ours 
is that we have 3 way communication :
    School <-> Server <-> Home
Everytime you come up with a solution, throw scenarios at it and see 
what you can think of. We've been working with this model for so long 
and still seem to get hiccups. It's one thing having a definite source 
of the most recent data and just getting information from it, but 
syncing is difficult.
I would use timestamping over incrementing. This still doesn't save you 
when 1 person syncs before another and they've both changed the same 
data. In that case 1 of the people are going to lose their changes. Time 
stamping becomes slightly unreliable when you have people (I've had it 
happen to me) change their system clock.
Ultimately your only safe bet is to have the data live. Always coming to 
and from the server. This can still result in someone's data being 
overwritten (John and mary edit the same customer at the same time) but 
you can put read/write locks in your code so that the server knows when 
someone has accessed a record and wont allow that record to be edited 
until the user has finished with it.

Bottom line is that data syncing can be a nightmare.

Deane Venske




More information about the Valentina mailing list