4 ms·
This looks really great. Have you thought about adding Operational Transform or CRDT primitives to your offering? Realtime subscriptions are nice - but they're
by jitl 4y ago
This looks really great. Have you thought about adding Operational Transform or CRDT primitives to your offering? Realtime subscriptions are nice - but they're even better with realtime collaboration. Because you're using SQLite directly, it's easy(er) for you to build in efficient CRDT mutations to your database rows because SQLite's BLOB column supports incremental IO: https://www.sqlite.org/c3ref/blob_open.html https://www.sqlite.org/c3ref/blob_open.html
This could allow you to save a CRDT update operation without needing to read the entire CRDT blob into memory, parse it, and then save it all back to disk.
- randomwebdev 4y agoCurrently any additional data transformation is left to the developers to extend via event hooks or custom client side handling. I've worked with CRDT in the past (yjs), but it may not be very useful in PocketBase considering that the application was designed to run on a single server and db writes are practically queued (you can have only one sqlite writer at a time). I'll investigate it further and may consider it for future release.
- jitl 4y agoI think if you integrate Yjs or a OT library first-party, you'll have a really exceptional framework - open source firebase alternative top-to-bottom, ready for "local-first" collaborate own-your-own-data apps. Sounds like my dream stack for small-scale projects or friend/family apps.