Fork me on GitHub
#asami
<
2021-04-06
>
quoll14:04:05

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

mkvlr15:04:38

I like the model in datomic where only novelty is reported vs what’s attempted.

indy15:04:54

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.

mkvlr15:04:39

why? If the data doesn’t change, what could change downstream? In datomic, a transaction without novelty only changes the basis-t

indy15:04:25

Mmm that’s right, now that I’m thinking about it properly :thinking_face:

quoll17:04:35

OK… I can do that

quoll17:04:51

(the datoms that actually do things)

ribelo14:04:14

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.

ribelo14:04:04

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

ribelo14:04:17

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

indy15:04:20

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

quoll17:04:44

@U06MDAPTP and I have had a few discussions about how Asami and Meander offer similar functionality in some ways 🙂

❤️ 3
quoll15:04:55

Still… my reflections made me realize that I can make it faster to write without sacrificing reading 🙂

bubblebobble 1
quoll15:04:08

Not twice as fast (I think), but a little faster