eliasdejong
Joined 1 year ago
Joined 1 year ago
You might be interested in Datastar [1], which is like htmx but centered around Server-Sent Events. You don't have to do diffing yourself in application code because it's already handled by the framework under the hood through the "idiomorph" DOM morphing algorithm.
For those interested:
- ZERO CLIENT-SIDE OR INLINE JAVASCRIPT except Datastar & Datastar attributes
- real-time multiplayer powered by CQRS
- 45x45 characters chunks stored in LMDB
- all characters are read & written through FULL ACID TRANSACTIONS. no shortcuts. no relaxations
- chunk-based viewport culling
- LZ4 compression on chunk-basis to remove white space and repeating chars
- runs on a 5,52 euro/mo VPS in Germany, cheapest tier in public cloud
Stack: Datastar, Python/FastAPI, LMDB
> but this doesn’t really work in mobile and it messes with the selection
I haven't tested it personally, but on the OverType they claim "excellect mobile support".
> The database is stored in memory. So it must be small enough to fit in RAM, and the full journal has to be replayed from scratch when opening a file.
For larger datasets, you really want disk support. Using something like SQLite or DuckDB as an append-only store is another way to achieve this effect.
Also lack of a proper query language will be a problem for long term serious use. A simple hand-rolled program API can only get you so far, until you need more advanced querying.
> Unlike XML or JSON, joedb is a binary file format that does not require any parsing. So, joedb files are much smaller, and processing data is much faster.
Some time ago I created a JSON-compatible serialization format that is zero-copy (no parsing required): https://github.com/fastserial/lite3
It doesn't do transactions or history versioning, but it is also very fast in memory. Something like jq or JSONPath on a disk-file version of this format could be interesting.
Conceptually similar to CAP, but with storage trade-offs. The idea is you can only pick 2 out of 3.
Isn't type validation already in SQL with `CHECK` constraints? I don't see what the language is adding here exactly.