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.
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 🙇
I just read this and it says what I meant to say. I tweaked the sentence a little, in case that might help.
- 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.
Not shown in the post are the other 3:
- object,predicate,subject
- predicate,subject,object
- subject,object,predicate
Those would also work. They’re a complement to the other set
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.
Yes
But when you get to 4 values, you have 4 groups that are equivalent, and each group is 6 in size
:thumbsup:
I didn’t mean to drag you back online though! Sorry about that 🙂
Fortunately, a few of the indexes are almost never used, since each value has a different use. So Asami doesn’t use all 6
Just 4
And the 4th one isn’t a tree index, which helps
But I’ll get to that (I haven’t written it yet, though the code has been built)
@quoll This is very cool! Thanks for taking the time to write it up. 🙂
You’re welcome 🙂
More writing to be done, and I still need to get the first release of storage out
But I thought that this would put me in a good place to leave it for a short while