Fork me on GitHub
#datalog
<
2021-08-10
>
ikitommi08:08:50

what are the options for (reagent-)reactive datascript on the frontend? posh (https://github.com/denistakeda/posh) seems unmaintained.

ikitommi09:08:53

hadn’t heard, will check it out, thanks!

lilactown16:08:29

tbh there aren't a lot of amazing solutions.

lilactown16:08:55

I think homebase is just a wrapper around datascript and reagent and exported for JS applications

lilactown16:08:02

I say "amazing" as in, most of these use datascript and IME the performance of datascript is not good enough for most UI apps I've worked on. posh tries to address this by doing some complicated diffing internally to avoid triggering every query on change, but it doesn't end up being as robust as one would want and still can end up doing a lot of expensive calculations on every db transaction

lilactown16:08:21

if you do find something that works for you I'd be very curious to learn more

ikitommi17:08:53

homebase doesn't support pull queries, so it was out of the question. The project already uses (re-)posh, so will start by fixing posh, it cureently fails on tracking reverse relations.

ikitommi17:08:51

looking at the posh internals, it looks smart, the impl could be optimized a lot. If I understand it correctly, all the queries will register their own matchers, having 100 queries will cause 100x matching, which doesn't scale.

ikitommi17:08:42

matchers could be grouped by their common parts, kinda like trie, would make it scale better.

ikitommi17:08:53

... and with some smart incremental effect diffing, one wouldn't have to re-run the queries when a match is found, just patch the result with the new datoms.

ikitommi17:08:52

but, will update here if I manage to cook up come improvements.

3