Thanks to Juan Lucas Dominguez Rubio which propose a new way feature-oriented synchro based on OpenMIS engine. It used an FODB driver inside gvSIG Mobile.
When several clients have write access to the same table in a database, it is necessary to deal with concurrency issues in one way or the other.
Synchronizing is especially convenient when we expect a small number of conflicts among clients (optimistic approach).
As we are doing row-oriented synchronization, a conflict means concurrent access to the same row in the same table.
The well-known disadvantage of locking consists in the cost of waiting for locks held by other clients.
The Open Mobile IS approach is as follows:
- Optimistic approach (no locks). Database updates are performed as they come, asking help from the conflict resolver when needed.
- Each synchronization request consists in a series of atomic updates of single rows.
- More than one synchronization request can be processed simultaneously, so the first atomic update of request A can be followed by the first atomic update of request B, then the second atomic update of request A, etc.
- This means that at the end of a synchronization request, both sides do not necessarily hold the same information, but both sides are consistent. That unlikely divergence will eventually disappear in another synchronization process.