Heavily inspired and uses code from https://github.com/phiresky/sql.js-httpvfs Impossible without sql.js
npm install
npm run dev
- Using https open your browser and navigate to the url given by webpack
- Check the console
- Install IPFS
- Add your sqlite file
ipfs add db.sqlite3
- Take the CID from the output and change ipfsPath in examples/index.ts
npm run dev
Check the console
- How does this work? Your browser runs a wasm binary that contains the sqlite server & client. It reads blocks of data from a .sqlite file on ipfs and performs queries in your browser.
- Performance? Table scans are very bad. The cross-worker communcation of Atomics introduces heavy performance penalties too.
- Writes? Certainly possible, but not implemented currently.
- What was the hardest part of the project? Configuring webpack
- Is this blockchain? 🚀🚀🚀 It's not, but it is technically a distributed ledger, be sure anyone you give money too can explain the difference.