cljsrn

2FO 2022-11-10T16:08:32.396629Z

Howdy, Is it possible do use datalog databases as the persistence layer with cljsrn? e.g xtdb, datomic etc

2FO 2022-11-12T14:44:22.694919Z

Thanks for the heads up, looks I'd be better off going with something more run of the mill for the db.

2FO 2022-11-11T16:58:43.553849Z

If possible, I was hoping to use it as an external db.

Oliver George 2022-11-11T23:14:09.100079Z

Small heads up based on my experience a couple of years ago. Initialising a datascript db involves indexing which was quite resource intensive for my cljsrn app. Impacted UX. Depends on what data you need to load of course. I had a lot of reference data.

joshmiller 2022-11-11T02:52:46.065039Z

Do you mean locally? If so, I think your best option is Datascript, although I think you’ll have to write your own code to save its state to disk on changes.

walterl 2022-11-18T18:06:39.358689Z

Logseq saves a Datascript db in an IndexedDB database; not sure what provides that in their CapacitorJS-based mobile app, or if it's available to RN, though.

👍 1
Oliver George 2022-11-18T22:52:15.621149Z

Interesting. A persisting datascript would be sweet. I can imagine serlising to IndexedDB but can't intuitively see how you can run datascript queries against it. I think IndexDB only handles simple types so the comparison stuff is limited (serialisable?). The async API is a challenge too. (old memories, could be wrong).

walterl 2022-11-18T22:58:48.795539Z

From the little code I've read it seemed like the data is mostly kept in RAM, and only periodically persisted in IndexedDB. Could be wrong.