I watched Workshop video: A deep dive into XTDB with Jeremy Taylor (2021-12-02)
And then, I was interested so I went through the fun tutorial.
Has anybody here used it for projects?
I watched Workshop video: A deep dive into XTDB with Jeremy Taylor (2021-12-02)
And then, I was interested so I went through the fun tutorial.
Has anybody here used it for projects?
Iām using it at work (have been using it since last year). Itās very nice and ācomfortableā to work with. The Datalog dialect it uses is a bit different than Datomicās, and the fact that itās document-oriented also gives a different feel. There are some rough edges sometimes, but overall, Iām pleased with it. Also, the guys at Juxt (and especially @refset ) have been super helpful and responsive.
I use it in my bootstrapped startup, and also in Biff, a web framework I made. (The startupās built on Biff). Biff is due for an update; hopefully thatāll happen⦠sometime. Very happy with XTDB.
Cool that several have used it for projects, even though it is a quite new db.
Weāve been experimenting with it in Spacy, with a Postgres for the log and document storage. Very happy with it so far. Weāre still trying to figure out the best way to structure our documents in order to avoid conflicts upon concurrent writes.
Concurrency can get ugly indeed. My naĆÆve assumption would just be that the xtdb transaction log makes it easier to deal with, and the āwinnerā of a concurrent write is just which ever happens to be last in system timeā¦
Precisely. That works like a charm if you store a history of domain events as separate documents. Naively saving the current state of your entire entity comes at a risk of losing some writes though. So far ::xt/match
has helped us enforce consistency, but weāre curious if thereās a better approach.
Have you looked at transaction functions? I use matches + retries on match failure myself, with the idea that I can always switch to transaction functions if I have any writes that start having a lot of contention.
Do you mean using a transaction function that would behave like clojure.core/compare-and-set!
and replace the document only if no concurrent writes took place? No, I havenāt considered it; thanks for the hint!
Yes, pretty much⦠Pretty much all update logic should live in transaction functions, at least thatās how Iāve been using it, and I havenāt had problems with race conditions (other than a bug in the kafka backend, which was promptly fixed by the JUXT guys pretty much as soon as I reported it).
replace the document only if no concurrent writes took place?
That sounds more like using match; for transaction functions, they get evaluated sequentially at index time, so there arenāt any concurrent writes to compete with.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.