write-sync-pattern
Mobile icon

Optimized Read/Write Sync Pattern

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded on 26 October 2023 by 
0.0
 (0 ratings)
write-sync-pattern

Optimized Read/Write Sync Pattern

Details
An optimized alternative to the OutSystems Read/Write Sync Patterns. Simple and easy to implement, data optimized (only delta is synced), no need to remap primary keys when syncing with server, no need to remap foreign keys when syncing with server, uses client-side guid generation, timezone friendly.
Read more

Simple and easy to implement
It works in a similar way to the Outsystems ‘Read-Only Optimized Sync Pattern’, but implemented in such a way that the sync is bidirectional (read/write).

Data optimized
This read-write sync pattern only downloads the delta from the server (all the read-write patterns on the outsystems documentation download all the server data on each sync)

No need to remap primary keys when syncing with server
Normally, in order to avoid clashes, records created client side will need to have their primary key reassigned when syncing to the server. Because we are using a Guid this is not an issue, and the keys can be the same on local and server entities.

No need to remap foreign keys when syncing with server
Because no primary keys are changed when syncing, also the foreign keys don’t need to be remapped.

Uses client-side guid generation
In order to use the same keys on local and server records we need to ensure that the keys are unique, even when generated on an offline mobile device. This is achieved by the use of a unique guid, created on the fly on the mobile device.

Timezone friendly
Even though the sync is using timestamps it will work perfectly across multiple timezones. This is intrinsic to the way Reactive and Mobile outsystems apps handle and store timezones, and no extra code or adjustments need to be done.


Release notes (1.0.0)
License (1.0.0)
Reviews (0)
Team