Based on some reading and going through the code, looks like Dgraph uses posting lists/adjacency lists. It appears this vocabulary comes from Facebook?
We’re interested in doing some research to see if Dgraph would benefit from sparse adjacency matrices, like RedisGraph. Has anyone tried this out, even has a proof-of-concept? Is this even worth trying?
I don’t know too much about the storage concepts behind matrices, but here’s my take, so correct me if I’m wrong.
Redis Graph has the design benefit of completely being served out of memory. Dgraph being a DB cannot make that assumption. From my understanding, adjacency matrices would need to be completely stored in memory to be served. Also, updates to that, would require regeneration of the entire matrix.
One more thing: Dgraph also supports facets, which get incorporated into the posting lists. Matrices don’t allow for that.
I think you’re right: RedisGraph stores everything in-memory.
However, I think there’s some still opportunity for research. I found a variety of papers/code, in R and C++, for efficient computation of matrices on external storage: