News for hackers. Stuff that matters.
Re:Simple - An Obtvse clone written in Python by espeed on Wednesday March 28, 2012 @09:19PM (#3769197)
These are the base elements:

  * Nodes/Vertices: Person, Topic, Entry
  * Relationships/Edges: Tagged, Authored

  person -- authored --> entry
  entry -- tagged --> topic
Here's the base model: https://github.com/espeed/lightbulb/blob/master/lightbulb/mo...

The comment system is a separate, generic component.

Marko, the guy who created Gremlin (https://github.com/tinkerpop/gremlin/wiki), just released a Gremlin Tree step (https://github.com/tinkerpop/gremlin/wiki/Tree-Pattern), which makes it really easy to build a threaded comment tree in one quick shot.

If you have a large blog or content system, you can use likes and views to make content recommendations using a basic Gremlin collaborative filtering query:

  // calculate basic collaborative filtering for vertex with user_id
  def rank_items(user_id) {
      m = [:]
      g.v(user_id).out('likes').in('likes').out('likes').groupCount(m)
      m.sort{a,b -> a.value <=> b.value}
      return m.values()
  }
If you use Facebook, Twitter, or GitHub to authenticate users you can easily incorporate friends and followers into the recommendations.
Re:Simple - An Obtvse clone written in Python by kisielk on Thursday March 29, 2012 @02:41PM (#3772457)
Thanks for taking the time to explain, I'll definitely be doing some reading over the code.