I’ve been giving some thought to this function @kslvsunil (as well as many other things, like the performance that @huxley is not happy with). It made me wonder about these transaction reports. It’s trivial (as you say) to call a listener when a transaction occurs on a graph. But I’m also wondering about transactions that change the graph vs those that don’t. For instance, if you insert a statement that already exists, then nothing changes. Similarly for removing statements that don’t exist. That’s detectable, though it’s currently unreported. I always assumed that the report should hold the datoms that were attempted regardless as to whether they affected the database
oh @quoll, I am very happy with performance, but not the performance of the transaction 😛 However, I understand where it comes from and I understand what I get in return.
and so for example comparing to datascript which everyone is using everywhere, asami is 2x slower at writing data and 10x faster at reading data
and what I just wanted to point out to @kslvsunil is that maybe he doesn't need a full database on the front end because maybe he has too little data to take advantage of what it offers
Still… my reflections made me realize that I can make it faster to write without sacrificing reading 🙂
Not twice as fast (I think), but a little faster
I like the model in datomic where only novelty is reported vs what’s attempted.
My knowledge is very much limited here but from an API point of view I’d want the listener to be invoked even if the graph doesn’t change. It’s up to the listener function, which takes the report as the argument, to examine the report and decide what to do.
why? If the data doesn’t change, what could change downstream? In datomic, a transaction without novelty only changes the basis-t
That is very true, but datalog is too tempting. I’m going to stick to a hash-map and use meander if I want something declarative. At the end, it’s the view that should be governing the shape of the data at least for the client
Mmm that’s right, now that I’m thinking about it properly :thinking_face:
@noprompt and I have had a few discussions about how Asami and Meander offer similar functionality in some ways 🙂
OK… I can do that
(the datoms that actually do things)