Skip to content

Comment on The building blocks of offline supportparent

Comments

I wrote a Swift library to experiment with this architecture using SQLite.

https://github.com/gerdemb/SQLiteChangesetSync

The library works at the database-level and stores databases modifications as binary change sets in a separate table that models a graph similar to a git repository. Capturing modifications is as simple as wrapping the transaction with a handler provided by the library. The graph of database modifications is stored locally on each device, but can easily by synced with an online repository.

The library detects conflicts, and provides a handler to the application for conflict resolution.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.