4 ms·
Simon Willison has written about using SQLite for a "Baked in data" architecture which is a super interesting method for some situations: https://simonwillison.
by samwillis 5y ago
Simon Willison has written about using SQLite for a "Baked in data" architecture which is a super interesting method for some situations: https://simonwillison.net/2021/Jul/28/baked-data/ https://simonwillison.net/2021/Jul/28/baked-data/
As he notes https://www.mozilla.org/ https://www.mozilla.org/ uses this pattern:
> They started using SQLite back in 2018 in a system they call Bedrock ... Their site content lives in a ~22MB SQLite database file, which is built and uploaded to S3 and then downloaded on a regular basis to each of their application servers.
I'm particularly interested in the "Sessions" extension (https://www.sqlite.org/sessionintro.html https://www.sqlite.org/sessionintro.html) and would love to hear if anyone has successfully used it for an eventually consistent architecture built on top of SQLite?
- uuyi 5y agoI designed something that used a local SQLite database on the client and a remote postgresql instance as the master. It used read and write queues at each end for sync and was eventually consistent. Unfortunately it was far too advanced for the org and no one else understood it so it was canned in favour of a connected solution under the guise of ubiquitous internet access being available. This is proving to be a poor technical decision so my solution may have some legs yet.
- qorrect 5y agoHey I actually do the same in a mobile app. I dump everything into a local database, when they are connected to the internet it syncs, lets it work offline.
- vatotemking 5y agoIm working on something similar. Mine is a RFID scanner kiosk that uses a local db when offline. How do you manage sync conflicts?
- qorrect 5y agoIn my workflow, I PULL when they initial get online and MERGE non conflicting changes and ACCEPT the changes with the latest timestamp if there is a conflict. It's not perfect and people still complain, to do it cleanly I would need to prompt the user which change to take but I haven't figured out a clean way to do that yet.
- LAC-Tech 5y agoWhat industry was this - if you don't mind me asking? Always interested in situations where internet may not be assured
- andix 5y agoIf your database is just 22MB, probably even MS Access 2000 will perform adequately.