4 ms·
EdgeRank: The Secret Sauce That Makes Facebook's News Feed Tick
- espeed 15y agoSo in the graph-query language Gremlin (https://github.com/tinkerpop/gremlin/wiki 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 15y agoI 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 15y agoIn 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 15y agoYou've got a new Gremlin fan. Playing with it right now.
- espeed 15y agoCool! :) Here's an 8 min screencast tutorial (http://www.youtube.com/watch?v=5wpTtEBK4-E 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 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/ http://bulbflow.com/).
- clobber 15y agoSecret Sauce = Google's search algorithm. Facebook's news feed is just noise. Let's stop pretending Facebook is innovative.