Replies: 2 comments
-
This runs in the browser, but tbh it's not great. You'll be running SQLite compiled to Wasm, inside the wazero Wasm interpreter, inside Go compiled to Wasm, inside the browsers Wasm VM. It's nice that it runs as it proves portability of the project, which in my experience helps find problems early, so I actually do try to build it regularly in that and other weird configurations. But it will be slow and far from ideal. Also, see: #15 |
Beta Was this translation helpful? Give feedback.
-
Yes I understand what you mean about browser usage not being the goal and also the perf implications. I have personally found it worthwhile because I can move all computation to the browser when I need isomorphic setup. I will put up a full demo in a repo soon if anyone is curious. —- I have been working on database change feeds on subscription queries . I have been using corrosion as I mentioned. I am playing with https://github.com/ebuckley/cr-sqlite-go this is golang. It’s probably that it layers out a path for an extension into go-sqlite3. Its using the SQLite extension from https://github.com/vlcn-io/js |
Beta Was this translation helpful? Give feedback.
-
I have been playing with this package for a while and noticed that we can run this in a browser or a server.
So I was thinking how cool it might be to have basic CRDT extension. like what they do with Corrosion. This would allow multi master servers with CRDT doing the sync, and catchup.
It would also allow Browsers to do offline editing and then when they go back online they will sync with any of the Servers they find.
https://github.com/superfly/corrosion does this using rust and sqlite.
The HTTP API is very simple:
https://superfly.github.io/corrosion/api/index.html
For example the change feed on a SQL Subscription looks a bit like:
Tables are marked as CRDT ones.
https://superfly.github.io/corrosion/crdts.html
This has some similarities to how Marmot works, which also tracks Tables, however Marmot using NATS and its RAFT to do the sync. https://github.com/maxpert/marmot
https://maxpert.github.io/marmot/internals
https://github.com/maxpert/marmot/blob/master/db/table_change_log_script.tmpl
Marmot cant do runtime DB schema updates. I believe that Corrosion can...
Corrosion only uses CRDT and QUIC to all other DBS. I think it uses Consul to discover the other DB's.
.
Beta Was this translation helpful? Give feedback.
All reactions