Heya, just wanted to let you know that datafire
is now available as 0.1.1
at https://github.com/filipesilva/datafire.
It lets you persist Datascript databases in Firebase's Firestore. Supports offline usage and multi-user synchronization. You can use Firestore Security Rules to limit access.
If you're persisting Datascript and this fits your usecase let me know, and also let me know if you've been looking for something like this but with more features. Very interested in how this setup can be pushed further.
Interesting, I did something similar but with sqlite. However I used the listen! Directly inside the library instead of on user code. That way the user could still keep using Datascript/transact! Instead of the library one
PS: it would probably be good to publish this on #announcements to reach more people 😉
Question: is there a way to restore the local Datascript from firestore? Or is the local one always assumed to be the master? I'm thinking of a it who opens the same app on another computer/phone
heya!
I did put it on accouncements, or news and articles
one of them
well both of them, but since cross posting between them is not allowed, the other one got taken down
I kept the transact on this lib because the loop needed to be firestore as the canonical source
stuff might happen before it hits firestore, for instance
the local datascript database is always restored from the remote
if two people open it in different devices, they will both see the dame database
they will also see each others writes
all of that works offline too, if you enable firestore's persistence
oh nice 🙂 thanks for the info
let me know if you use it, and if it does what you need, and also if it doesn't 😄
for the time being I probably wont use it since I dont have the need right now. However some months ago I was searching for something like that but couldnt find anything; which is why at the end I went with a local sqlite storage 😅 Maybe it helps you get some inspiration: https://github.com/hiposfer/hive/blob/master/src/hive/services/sqlite.cljs