Will investigate further. Many thanks for your kind help!
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).
It will take me a while to get to it though
that sounds good!
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
function calls/closures etc do add overhead
Exactly. I don't want to slow down the synchronous code
Though I hate the idea of duplication 😢
I think for pathom3 some profiling was done to compare promesa vs raw sync vs other solutions
promesa came quite close to raw sync in most cases
maybe just having a single promesa based path is not so crazy if these numbers add up
and waiting for loom is not an option I guess since that wouldn't work for cljs
@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
(using asami at work for JSON spelunking. working great so far! 🎊 )
This has turned out to be a really useful application of Asami that I never expected
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 🙂
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.