Fork me on GitHub
#xtdb
<
2022-06-19
>
zeitstein09:06:31

I'm looking to make the following process as pure as possible (ease of testing) : 1. Transact new data 2. Run q and entity to derive new data to transact 3. Transact that data Running a speculative transaction at step 1 seems like the right approach. Any trade offs I should be aware of?

zeitstein17:06:15

As might be expected, open-tx-log doesn't work with the speculative db. Still, in this workflow tx log and tx fns seem unnecessary.

👍 1
jarohen06:06:31

we know of a few other people that do that - one thing to watch out for (may not affect you) is consistency, if you've got multiple transactions doing that concurrently

1
refset09:06:59

^ agreed, consistency could definitely be an issue, and could possibly be mitigated to some extent (depending on the exact nature of the queries) using :xtdb.api/match operations Also, just sharing this in case you haven't seen it before https://github.com/frankiesardo/minikusari ...which, somewhat remarkably, is fast enough to play Flappy Bird https://frankiesardo.github.io/minikusari/#!/minikusari.tutorial3 🙂

zeitstein11:06:57

Thanks for pointing out the consistency issue. Can you recommend any resources to read about this (thinking generally, not just about speculative transactions)? At the very least, speculation might be the way to go while in development. I definitely need to read up more about rules engines!

refset12:06:40

This video recording isn't great, but the slides have some good and relevant detail (largely applicable to XT also): https://gusbicalho.com.br/post/2019/09/01/consistent-updates-in-datomic-clojure/south-2019/

zeitstein15:06:45

Thanks, very useful!

🙏 2
richiardiandrea16:06:35

@U899JBRPF Does minikusari work on top of XTDB as well? That would be very cool for one of our use cases cause we use clara at the moment

refset17:06:31

Not out-of-the-box, but something roughly the same could definitely be made to work. I have no experience with clara or other production rules engines though, so can't really judge all the limitations (I'm sure there are many!) Also note that compared to a system like RDFox (multi-core, in-memory reasoning engine with a patented algorithm...), using XT for this might be quite slow 🙂 https://www.oxfordsemantic.tech/blog/datalog-basics-and-rdfox

richiardiandrea17:06:01

oh that looks even better indeed!

😄 1