This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-04
Channels
- # announcements (4)
- # aws (3)
- # babashka (58)
- # beginners (59)
- # biff (6)
- # cider (3)
- # clj-kondo (48)
- # clj-on-windows (1)
- # cljdoc (1)
- # clojure (136)
- # clojure-europe (19)
- # clojure-gamedev (7)
- # clojure-germany (2)
- # clojure-nl (7)
- # clojure-norway (1)
- # clojure-portugal (1)
- # clojure-uk (4)
- # clojurescript (41)
- # community-development (2)
- # core-async (5)
- # cursive (10)
- # data-oriented-programming (1)
- # data-science (1)
- # datahike (5)
- # datomic (60)
- # docker (2)
- # emacs (13)
- # figwheel-main (19)
- # fulcro (12)
- # graalvm (9)
- # holy-lambda (41)
- # honeysql (14)
- # introduce-yourself (3)
- # jobs (4)
- # lsp (11)
- # nrepl (1)
- # off-topic (9)
- # other-languages (2)
- # pathom (22)
- # portal (5)
- # re-frame (17)
- # remote-jobs (4)
- # reveal (14)
- # shadow-cljs (1)
- # tools-build (7)
- # tools-deps (47)
- # xtdb (8)
- # yada (2)
Testing with XTDB! https://twitter.com/juxtpro/status/1521797754795745281
If I wanted to query over multiple nodes, then the way to go would be to apply the transaction of one node to othe other (so to speak) with with-tx
is that right?
For small amounts of data that would work, but for a larger scale there are a few possibilities and tradeoffs. Ideally the same KV interleaving trick used to implement with-tx could (hypothetically) be made to work more generically as multiple query db sources, assuming all the KV index-stores are on the same machine. However querying over multiple nodes running on multiple machines would require a fairly different approach, assuming you need the queries to be fast. What's the use case? Multi-tenancy? Multiple tx-logs (~sharding) for write scaling?
The indexes are on the same machine. The idea is not about scale in that sense. I'm not even considering scale, it's just an idea I've been turning around in my head. I'm thinking to have a master node and a working node, the working node would store a ton of garbage, think very small, frequent updates from a GUI and I would only transact to master via a specific command. Not sure if that is the right way to do it, but I'm thinking of the difference between the working directory and commits in a git repository as an analogy. You want durability and possibly ad-hoc queries, but you keep the history in a state that makes sense for this kind of application. Alternatively I could just try it out without doing any of this - but it seems wasteful and kind of messy. I'm not considering something fundamental here?
Cool, well with-tx might be a good bet for ease and simplicity then, although it might not be the most efficient option. I would be interested to hear how you get on π
I had a bit of time to experiment and I'm thinking a good alternative is to just populate the working node with current documents from the main node, exclusively query and transact on the working node and then flush to main on commit.