shelf
absurd-sql
shelf | absurd-sql | |
---|---|---|
2 | 24 | |
52 | 4,061 | |
- | - | |
0.0 | 2.5 | |
over 1 year ago | 9 months ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
shelf
-
Show HN: Bike – macOS Native Outliner
I think you could encode a “shelf” last-write-wins CRDT into your HTML using data attributes without exploding your file size. You would need to add a data-version attribute, and if you want to support hand-editing or editing by programs that don’t understand the CRDT, a CRC32 or other parity as data-parity so your loader can tell when a user might have edited a row without updating data-version.
Shelf is really simple - the JS implementation is tiny (https://github.com/dglittle/shelf) and a walkthrough of the algorithm here: https://bartoszsypytkowski.com/shelf-crdt/amp/
It wouldn’t handle character level sync - but would let you merge documents at a rows/items/blocks level.
-
Downsides of Offline First
The CRDT I was referencing was Shelf by Greg Little. He's given a few talks about it at the braid meetups. When he first showed it off, Kevin Jahns (the Yjs author) was also there and was as impressed as I was:
https://braid.org/meeting-8
The code is all here. Its tiny:
https://github.com/dglittle/shelf
absurd-sql
- Absurd-SQL: sqlite3 in ur indexeddb (hopefully a better back end soon)
- What If OpenDocument Used SQLite?
-
WASM SQL database recommendations wanted
Not really, but I'm aware of absurd-sql. Note that this requires IndexedDB and thus a browser environment.
-
Best local database that works on all platforms including web?
I don't need SQL capabilities, so I didn't look into those options (there's also absurd-sql, which ports sqlite to the browser on top of IndexedDB).
-
SQLite WASM in the Browser Backed by the Origin Private File System
Ironically I was just about to drop in absurd-sql [1] to a project, which uses indexeddb to back SQLite. This seems better.
[1] https://github.com/jlongster/absurd-sql
-
Irmin in the Browser (OCaml/MirageOS)
There is also absurd-sql that is sqlite3 in wasm using IndexDB as storage and it’s faster than IndexDB itself
[1]: https://github.com/jlongster/absurd-sql
-
Postgres WASM by Snaplet and Supabase
Offline data: running it in the browser for an offline cache, similar to sql.js or absurd-sql.
- WordPress WASM
-
Learn PWA
We are very close to having WASM SQLite with persistence in the web platform. Until now SQLite compiled to WASM was in memory and you had to write the whole database out as a binary array to save changes. There is absurd-sql (https://github.com/jlongster/absurd-sql), which builds a virtual file system on top of IndexedDB for sqlite, its incredible, but a bit of an ugly hack.
However, the new file-access apis (https://developer.mozilla.org/en-US/docs/Web/API/File_System...) that are landing in browsers will fix this. One of the things it does is enable very efficient block level read/write access to a privet sandboxed filesystem for the websites origin, perfect for persistent sqlite. There is more here: https://web.dev/file-system-access/#accessing-files-optimize...
- Learn Postgres at the Playground
What are some alternatives?
swift-collections - Commonly used data structures for Swift
lovefield - Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use.
crdt-example-app - A full implementation of CRDTs using hybrid logical clocks and a demo app that uses it
distributed-counters - Experiments with distributed counters
dolt - Dolt – Git for Data
Homebrew-cask - 🍻 A CLI workflow for the administration of macOS applications distributed as binaries
realtime - Broadcast, Presence, and Postgres Changes via WebSockets
donutdb - Store and query a sqlite db directly backed by DynamoDB.
localForage - 💾 Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.
LevelDB - LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
meteor-mysql - Reactive MySQL for Meteor