Offline Capabilities? #107
Replies: 17 comments 22 replies
-
Hi @AgarwalPragy , absolutely - this is a definite intention for SurrealDB. And that's the whole reason why SurrealDB is designed to run embedded in the browser, as well as in a server environment... We're not fully set on the implementation details of this at the moment. We've looked at Operational Transformation, and CRDTs, and we would ideally like to find a middle ground between them (in terms of offline support / speed / being able to operate as a full database), which is an area of research which is seeing more interest at the moment! |
Beta Was this translation helpful? Give feedback.
-
Offline-first and multi-user data online sync would make me dump my [p|c]ouchDB stack and jump on surrealDB immediately. |
Beta Was this translation helpful? Give feedback.
-
With tight integration with Cloudflare, the database on the edge will/can act as distributed endpoint for lower latency |
Beta Was this translation helpful? Give feedback.
-
Any update @tobiemh ? |
Beta Was this translation helpful? Give feedback.
-
I was looking something like that. |
Beta Was this translation helpful? Give feedback.
-
@tobiemh is this on back-burner? |
Beta Was this translation helpful? Give feedback.
-
I arrived here after discovering SurrealDB. I am also looking for an "offline-first" data sync solution that syncs between server and local. SurrealDB looks amazing but I can't find anything on synchronisation between embedded and server. |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? @tobiemh |
Beta Was this translation helpful? Give feedback.
-
Implementing fallback (offline) support would be a valuable feature for SurrealDB. For example, if the main db responds too slowly when writing log entries, sensor data, or any kind of data that doesn't have to be synced in realtime then embedded / local database could store these entries and once the main database is back online or functioning properly, the local db could be synced with the main one. This would enhance reliability and ensure continuous operation. |
Beta Was this translation helpful? Give feedback.
-
As far as I can tell it can be quite easily done with live queries.. As I have thought of it, while there is no such replication native support, one can share schema for server and db and simply subscribe to live queries for all tables that put all the data to local replica respecting user's permissions. However the tricky part would be diffs syncs... For this obviously Change Feeds will be suitable, but again - then you need to import this manually and idk how permissions are handled with CF. In any case looks doable, but with some manual work |
Beta Was this translation helpful? Give feedback.
-
Offline capability along with a synch mechanism would be a gamechanger. I tried to achieve this using tikv by running a pd/tikv cluster on multiple nodes, each containing a surreal db instance as well. One of them was "simulating" an onprem machine that at some time could go offline, local db updates can be done and after it gets connected again it snychs with the rest of the cluster. Turns out tikv doesnt work that way and whenever my pd instance got disconnected from the rest of the cluster it failed, and with it the surreal db instance. Bummer. :-/ But would have been to easy I guess. Any idea of how to achieve this (without being to hacky) using tikv? |
Beta Was this translation helpful? Give feedback.
-
We just saw the release of 2.0 are there anything on the horizon for offline support? Specifically for my usecase it would be
|
Beta Was this translation helpful? Give feedback.
-
I think powersyn will be the bes https://www.powersync.com/
|
Beta Was this translation helpful? Give feedback.
-
i love surrealdb, but at now, if they don't have what you want, just comback big man (Postgres for stable and sure evethings work!). Don't use SQLite, use Postgres instead. |
Beta Was this translation helpful? Give feedback.
-
I've recently been experimenting with surrealdb in an offline-first web app and have found it to be quite slow at doing queries. I ended up using rxdb, which is vastly more performant as well as offers many extremely useful plugins such as leader election for multiple tabs, a flexible sync/replication engine, and more. |
Beta Was this translation helpful? Give feedback.
-
any status on offline sync |
Beta Was this translation helpful? Give feedback.
-
found this: https://github.com/plasmatech8/surrealdb-sandbox |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Offline first apps deliver a better experience when the user goes offline. They also offer a snappier experience in general thanks to the client-side cache.
Are there any plans for supporting offline-first capabilities to surreal db, especially the features highlighted in these essays
Beta Was this translation helpful? Give feedback.
All reactions