asami

Asami, the graph database https://github.com/threatgrid/asami
quoll 2021-04-06T14:27:05.196200Z

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

2021-04-06T14:31:14.196700Z

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.

2021-04-06T14:33:04.196900Z

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

2021-04-06T14:35:17.197400Z

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

quoll 2021-04-06T15:04:55.198600Z

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

1
quoll 2021-04-06T15:05:08.199Z

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

mkvlr 2021-04-06T15:08:38.202300Z

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

indy 2021-04-06T15:08:54.202700Z

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.

mkvlr 2021-04-06T15:11:39.204700Z

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

indy 2021-04-06T15:12:20.205600Z

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

indy 2021-04-06T15:15:25.207Z

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

quoll 2021-04-06T17:58:44.207300Z

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

❤️ 3
quoll 2021-04-06T17:59:35.207500Z

OK… I can do that

quoll 2021-04-06T17:59:51.207700Z

(the datoms that actually do things)