xtdb

markaddleman 2025-06-25T19:27:20.342169Z

I'm considering xtdb for a knowledge graph use case. Queries might involve recursion to pick up all knowledge related to XYZ. I know how we can achieve this in v1 but v2's xtql looks like it doesn't have the necessary support yet. Am I missing something?

markaddleman 2025-06-26T13:29:33.743739Z

Color me desired! 🤣 But for your prioritization purposes, know that I’m very early in my journey. The larger use case is for an LLM to query the knowledge graph.

šŸ‘Œ 1
šŸ˜„ 1
jarohen 2025-06-26T06:14:44.225669Z

Hey @markaddleman - we've got the underlying relational operator implemented but haven't yet wired it into XTQL (or SQL's WITH RECURSIVE, for that matter), mainly due to nobody having mentioned a desire for it - until now, of course šŸ™‚

zeitstein 2025-06-27T11:30:11.347099Z

Another desirer over here šŸ™‚

xlfe 2025-07-01T12:15:55.153519Z

Another desirer over here. How much work is left to get https://github.com/xtdb/xtdb/issues/2087? Every search I do for XTDB graph traversal leads me back to https://discuss.xtdb.com/t/xtdbs-sweet-spot/52/9 laughcry

jarohen 2025-07-01T12:28:24.248969Z

on the SQL side, it'll be the compiler analysis to get with-recursive planning out into the correct relational operators. with-recursive is a bit of a gnarly one in the SQL spec, plenty to consider to be spec-compliant (which we do target). in XTQL we've additionally got the syntax design to do. tbh, though, the blocker is prioritisation rather than time, necessarily - we don't currently have active clients nor design partners with these kinds of use cases, so (much as I'd like to work on it, both for a feeling of completeness as well as it being an interesting problem) I'd find it hard to justify the time at the moment 😐 I will point the prios committee at this thread, though šŸ™‚ and if anyone wants to write up a bit more about their context and use cases, what it'd unlock for you, and send them over to <mailto:hello@xtdb.com|hello@xtdb.com>, that'd definitely help!

šŸ‘ 1
Shikhar Bhushan 2025-06-25T01:55:51.602949Z

awesome work @chuck.cassel! i https://blog.schmizz.net/disaggregated-wal when S2 gets used as a "disaggregated write-ahead log"

Shikhar Bhushan 2025-06-25T01:58:38.583059Z

XTDB seems like a really interesting project, looking forward to learning more about it. Do you folks do anything to ensure there is a single-writer to the log, currently, or is that not required for the design? (S2 offers some mechanisms for https://s2.dev/docs/rest/records/append#concurrency-control which can be useful for this.)

refset 2025-07-08T15:51:21.310889Z

Hey @shikhar just catching up with Slack again after some paternity leave šŸ™‚ noticed we'd missed answering your question here - the answer is that XT copes without concurrency control (due to the deterministic replication + single partition usage), although being able to push some of this work to the level of the log probably has good performance benefits for the future

refset 2025-07-08T15:53:14.243459Z

Unrelated, but while I have your attention, I read about Northguard earlier (h/t https://clojurians.slack.com/archives/C05N2M7R6DB/p1751880422581049) - have you seen any insider info on how that API looks? I guess until it's released as OSS it's not a threat for you, but it would be interesting to comparre

Shikhar Bhushan 2025-07-09T11:00:51.172379Z

is there somewhere I can read about deterministic replication?

Shikhar Bhushan 2025-07-09T11:02:42.550239Z

no insider info on NG šŸ™‚ but it looks non-trivial to operate, it's meant for LinkedIn. we are all about being a serverless API. so not really comparable. maybe if someone offers it in that fashion...

šŸ‘ 1
refset 2025-07-09T12:16:29.766049Z

It's a pretty simple event sourced design (but the events are purely internal) - https://docs.xtdb.com/intro/data-model.html#_a_log_of_transactions Very unlike most SQL systems, which prioritize OLTP concurrency over correctness

Shikhar Bhushan 2025-07-09T13:04:09.089699Z

> serially and asynchronously, i.e. if you wait a few milliseconds for the processing of a newly submitted transaction to finish, you can generally then read the data from that transaction in your next query (a.k.a. "read your writes"). Ah it is eventually consistent

Shikhar Bhushan 2025-07-09T13:08:15.279119Z

One way to get strong consistency with S2 in this model – which seems like multiple writers allowed and rely on the log for ordering – is when servicing a read, https://s2.dev/docs/rest/records/check-tail (Kafka: endOffsets) and wait till caught up

šŸ‘ 1
refset 2025-07-09T13:28:51.001239Z

Writes are serializable, but reads are "a la carte" consistency thanks to the immutability + as-of querying. Rich Hickey's Deconstructing The Database is a good watch if you're curious about these things and the background of how he designed Datomic

Shikhar Bhushan 2025-07-09T14:23:31.346289Z

Thanks, will check it out

refset 2025-07-09T17:35:36.842489Z

Oh also, the consistency model for Datomic was also reviewed very favourably by Jepsen fwiw (XT really just carries these same principles to a wider audience) https://jepsen.io/analyses/datomic-pro-1.0.7075