Fork me on GitHub
#asami
<
2021-02-08
>
quoll23:02:17

I’m going offline for a week. Before I left I wanted to provide some descriptions of the structure of Asami, and some historical context of the architectural choices. I’m not done yet, but you can find links to the posts on the https://github.com/threatgrid/asami/wiki/History-of-Asami.

👍 1
rickmoynihan17:02:15

This looks great… thanks! I think I noticed a small typo in the first post that confused me: https://dev.to/quoll/asami-7ll > It turns out that these 3 orderings allow someone to find all matching statements for any given group of subject, predicate, and object. Interestingly, the remaining 3 possible orderings also permit this. Shouldn’t that be “these 6 orderings”? 3 would imply there are no remaining 3. again many thanks 🙇

quoll23:02:09

I just read this and it says what I meant to say. I tweaked the sentence a little, in case that might help.

quoll23:02:10

- Subject, Predicate, Object - Predicate, Object, Subject - Object, Subject Predicate There are 6 possible orderings (calculated as 3! or 3 factorial). It turns out that the 3 orderings shown here allow someone to find all matching statements for any given group of subject, predicate, and object. Interestingly, the remaining 3 possible orderings also permit this. The two groups of orderings are distinct, in that any group that tried to contain ordering from more than one group would need more than 3 indices to be able to fulfill every possible query.

quoll00:02:05

Not shown in the post are the other 3: - object,predicate,subject - predicate,subject,object - subject,object,predicate

quoll00:02:12

Those would also work. They’re a complement to the other set

rickmoynihan00:02:35

ok that reads better thanks. I think I understood what you were saying, as I read a paper on this subject a few years back. Essentially you don’t need full coverage of all index permutations, as the two groups are ultimately equivalent.

quoll00:02:53

But when you get to 4 values, you have 4 groups that are equivalent, and each group is 6 in size

rickmoynihan00:02:25

I didn’t mean to drag you back online though! Sorry about that 🙂

quoll00:02:33

Fortunately, a few of the indexes are almost never used, since each value has a different use. So Asami doesn’t use all 6

quoll00:02:09

And the 4th one isn’t a tree index, which helps

quoll00:02:55

But I’ll get to that (I haven’t written it yet, though the code has been built)

Steven Deobald23:02:36

@quoll This is very cool! Thanks for taking the time to write it up. 🙂

quoll23:02:51

You’re welcome 🙂

quoll23:02:03

More writing to be done, and I still need to get the first release of storage out

quoll23:02:37

But I thought that this would put me in a good place to leave it for a short while