This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-27
Channels
- # announcements (2)
- # asami (25)
- # babashka (124)
- # beginners (46)
- # calva (55)
- # cljdoc (70)
- # clojure (68)
- # clojure-australia (2)
- # clojure-dev (63)
- # clojure-europe (38)
- # clojure-nl (1)
- # clojure-spec (1)
- # clojure-uk (8)
- # clojurescript (56)
- # community-development (4)
- # conjure (1)
- # copenhagen-clojurians (1)
- # core-async (1)
- # cursive (3)
- # datahike (5)
- # datomic (183)
- # depstar (2)
- # figwheel-main (10)
- # fulcro (20)
- # honeysql (2)
- # hyperfiddle (1)
- # integrant (68)
- # jobs (6)
- # jobs-discuss (5)
- # juxt (1)
- # malli (13)
- # off-topic (8)
- # pathom (2)
- # rdf (10)
- # reagent (11)
- # remote-jobs (1)
- # rum (1)
- # shadow-cljs (69)
- # spacemacs (1)
- # sql (5)
- # tools-build (51)
- # tools-deps (6)
- # xtdb (24)
It’s not built in. I actually do something like that when I’m emulating transactions on Datomic.
• On start-transaction
, start a with-db
• Every call to transact
also gets sent to a log. Because it’s using a with-db
then the results of the transact operations are visible, even though they’re not being kept (but the log is keeping it for me)
• On commit
, replay the entire log as a single transact
against the original connection.
Is there any plan to support a storage backend such as FoundationDB in the future? Seems like it could be a good fit
but I guess that might require some deep changes in the way IO is handled (since iirc now it's all "blocking")
and potentially another storage impl based on something different than AVL (to leverage some out-of-the-box capabilities of Fdb), but that's another subject
Yes, it's all blocking now. I’m planning on doing a node-like approach where both sync and async APIs are available. The code should be similar, since I can use the Promesa library to maintain a lot of the code structure (even if it compiles down to something completely different).
datahike does something like this, but mixin sync/async via macros can become hairy, stuff like error handling in particular doesn't translate always well
but I guess there aren't many solutions to this if you want to keep decent sync performance
I think for pathom3 some profiling was done to compare promesa vs raw sync vs other solutions
@quoll i can't figure out how to edit the wiki, but i noticed a small typo in the example for https://github.com/threatgrid/asami/wiki/3.-Loading-Data#json, (d/transact conn {:tx-data data}))
has an extra trailing paren
hm, is there an example floating around of querying within a single JSON object? i think i have the wrong mental model for dealing with e.g. object key values
such as getting all the names of the children given https://github.com/threatgrid/asami/wiki/3.-Loading-Data#json
and the "root" object is JSON object, not an array
Nevermind, found docs 🙂