benbjohnson / litestream

Streaming replication for SQLite.

Home Page:https://litestream.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Browser support

hugo082 opened this issue Β· comments

Hi guys πŸ‘‹

I wonder if it would be possible to use litestream directly from the browser taking advantage of Web Assembly & web containers πŸ€”

It would be very useful to deploy decentralized / low-budget applications that primarily use client-side executions. Having litestream ensure that the database is synchronized with the bucket / master file would allow these applications to share state between clients.

What do you think? I'll probably try to do it, but I'd like to have your opinion / first idea of the problems I might encounter.

hey @hugo082 πŸ‘‹

You might be able to get Litestream to compile to WASM but it's gonna be a lot of work and the file will probably be huge. Also, Litestream does physical replication so it would make it difficult or impossible to synchronize a local and remote database that got out of sync.

You probably want to look into some local-first solutions for SQLite instead. Those might be a better fit.