Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: SQLiteChangesetSync – Git-Like Sync for SQLite Databases (github.com/gerdemb)
5 points by gerdemb on Dec 15, 2023 | hide | past | favorite | 2 comments
Hello HN! I’m happy to introduce SQLiteChangesetSync, a Swift package I’m sharing for the first time. It’s designed for offline-first synchronization of SQLite databases across devices. The package uses the SQLite Session Extension for capturing and committing changes in the local database. When the client is online, these changesets can then be pushed to a shared repository, which could be any server or database (example CloudKit implementation included). Other clients can fetch these changesets to keep their local databases consistent.

SQLiteChangesetSync supports branch merging when databases diverge and provides the ability for applications to handle merge conflicts. I've also included a pre-built iOS app in the package, allowing you to run two instances on different simulators to experiment with the syncing process. I’m eager to hear feedback on both the concept and implementation of database synchronization. Your insights are highly valued!

https://github.com/gerdemb/SQLiteChangesetSync

Note: As this project is experimental and self-tested, some challenges are expected. Looking forward to your feedback!




That's awesome! I have plans to do the same thing but for android.

How long did it take you to implement this proof of concept?


Thanks for your comment. Let me know if you end up implementing this on Android. I think this concept could be adaptable to other platforms or languages. I just happened to be working in Swift and so I started there.

It took about a week to prove the idea was viable and then another week or two to get the code into a state where I felt it would be useful to share.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: