
EdgeRank: The Secret Sauce That Makes Facebook's News Feed Tick - LiveTheDream
http://techcrunch.com/2010/04/22/facebook-edgerank/
======
espeed
So in the graph-query language Gremlin
(<https://github.com/tinkerpop/gremlin/wiki>), Facebook's secret sauce would
look something like this...

g.v(user_id).outE('friend').as('f').inV.outE('news').as('n').inV.sort{
f.affinity * n.weight * n.decay }.reverse()

~~~
woodall
I know nothing about Gremlin so if this is an obvious question, my bad, but
does it automatically calculate affinity, weight, and decay? I'm assuming it
doesn't, but would I be blown away if it did.

~~~
espeed
In this example, affinity is an edge property (stored on the "friend" edge),
weight is an edge property (stored on the "news" edge), and decay is a
calculated value based on a timestamp stored as a property on the news edge --
I fudged on decay because I don't know what their decay formula is.

From what I could glean from the article, weight is static for each content
type, and affinity is a calculated value. Facebook may update the affinity
value after each user action or run some kind of PageRank-type algorithm for
friends and update it periodically.

But in Gremlin, you can calculate PageRank in 2 lines.

~~~
woodall
You've got a new Gremlin fan. Playing with it right now.

~~~
espeed
Cool! :) Here's an 8 min screencast tutorial
(<http://www.youtube.com/watch?v=5wpTtEBK4-E>) by Marko, the creator of
Gremlin.

You can ask questions in the Gremlin Users group:
<https://groups.google.com/forum/#!forum/gremlin-users>

And if you're a Python developer, check out Bulbflow, a new persistence
framework for graph databases that uses Gremlin as its query language
(<http://bulbflow.com/>).

------
clobber
Secret Sauce = Google's search algorithm. Facebook's news feed is just noise.
Let's stop pretending Facebook is innovative.

~~~
clobber
Aww, down votes expected. _waves at Facebook employee brigade_

I'll just leave this link here for you guys to read:
<http://news.ycombinator.com/item?id=2797060>

~~~
clobber
Truth hurts, huh guys?

