It would need to implement index free adjacency to be a graph db. Meaning an edge can be traversed from one node to the next directly in memory without referring to an index.
Discussion
i don't really need a full blown graph db for wot though. just a few indices (followers of A, who A follows) for all A. plus a few other things
Follows are a weak trust signal, but it's better than nothing.
right, there would be more to the algo obviously. but just those two indices would already be really useful for lots of things. the full algo would be personalized pagerank + custom metrics (zaps, reactions, etc)
Have you thought about how to make those metrics available to other nostr clients? I’m thinking specifically of nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z‘s Trusted Assertions NIP.
not really no
Are you maintaining a separate relational db so you can look up Alice’s followers without cycling through every kind 3 note in your db?
no that would be retarded. i would process kind 3s as they come in and update the who follows who index
SurrealDB uses GraphRAG, which I’m not familiar with.
Suppose I wanted a list of all pubkeys 3 hops from Alice by follows. That would be a nightmare to implement in a relational database. In neo4j in my hands, it’s very performant.
Even something more simple, like give me a list of all of Alice’s followers, takes a long time if all you have is a bunch of events in strfry. But with neo4j you have it in a snap.
I’ll be pleasantly surprised if GraphRAG can handle either of those queries performantly.