News for hackers. Stuff that matters.
Re:DGraph – Scalable, Distributed, Low-Latency, High-Through... by mrjn on Monday March 21, 2016 @01:28AM (#11326402)
The problem with automatically generating reverse edges is that it causes data explosions and duplications -- for e.g., if you're adding facts like X -- IS_A --> Human; then automatically generating the reverse would cause a Human -- Reverse(IS_A) --> X; which would list all the humans on the planet. Whichever machine serves this list would immediately run into memory issues, not to mention, any query using such a relationship is going to be very slow.

DGraph uses type schema to understand the relationships an entity can have. So, you can have an entity of type A, where A has relationships R1, R2, and R3. So, you can then deduce that A has relationships R1, R2, and R3. Of course, each entity can be of multiple types (for e.g. Tom Hanks is an actor and a director).

This approach is very scalable, because it avoids unnecessary scans over the distributed database to find all the relationships an entity can have. Rather, utilizing a schema to deduce such information; and then hitting the right servers to get the data.

Re:DGraph – Scalable, Distributed, Low-Latency, High-Through... by maxdemarzi on Monday March 21, 2016 @01:44AM (#11326431)
Wait, I don't understand. If I create a relationship "User 1" -[:LIKES]->"Chocolate Ice Cream". Does the "Chocolate Ice Cream" know which users liked it or not?
Re:DGraph – Scalable, Distributed, Low-Latency, High-Through... by yazaddaruvala on Monday March 21, 2016 @01:55AM (#11326462)
My takeaway is that "Chocolate Ice Cream" would not know about "User 1" unless an explicit relationship "Chocolate Ice Cream" -[:liked_by]->"User 1" is created
Re:DGraph – Scalable, Distributed, Low-Latency, High-Through... by nl on Monday March 21, 2016 @06:39AM (#11327180)
I'm guessing not.

This isn't unusual - it's somewhat analogous to the derived (inferred) relationship thing in RDF-style graph databases (eg, Sydney is-in Australia, Australia is-in Oceania, therefor Sydney is-in Oceania).

This sounds like a great idea, but in practice doesn't always work so well. You end up with an explosion of relations, some of which are completely useless.

I'm not opposed to this decision being a choice.