[foaf-dev] Fwd: A Round of TinkerPop Stack Releases

Dan Brickley danbri at danbri.org
Mon May 9 10:41:36 CEST 2011


For those keeping an eye on TinkerPop (and Gremlin and related tools),
ie. http://www.tinkerpop.com/ they've just released a 1.0.

To get a flavour of what it does, check out
http://www.slideshare.net/slidarko/the-gremlin-in-the-graph
or http://markorodriguez.com/services/development/recommendation-system/

The Gremlin language is interesting, especially when mixed with the
Sesame Linked Data Sail component which reads RDF from the Web as you
explore it. It's a bit like an RDF path language, except you can drop
down to code (Java/Groovy) at each traversal point...

Here's something to try:

sh gremlin.sh

         \,,,/
         (o o)
-----oOOo-(_)-oOOo-----
gremlin> load stephenfry.txt

where that file contains:

g = new LinkedDataSailGraph(new MemoryStoreSailGraph())
com.tinkerpop.gremlin.loaders.SailGraphLoader.load()
v = g.v('http://dbpedia.org/resource/Stephen_Fry')
g.addNamespace('dbpedia','http://dbpedia.org/resource/')
g.addNamespace('dbpedia-owl', 'http://dbpedia.org/ontology/')
labels = [g.uri('dbpedia-owl:presenter'),
g.uri('dbpedia-owl:creator'), g.uri('dbpedia-owl:influences'),
g.uri('dbpedia-owl:starring'),g.uri('dbpedia-owl:writer'),
g.uri('owl:sameAs') ]
rand = new Random()
m = [:]
v.bothE{labels.contains(it.label) & rand.nextBoolean()
}.outV.groupCount(m).loop(4){it.loops < 4}
m.subMap((m.keySet() as List)[0..10])

// ...or you might try
gremlin> v.inE('dbpedia-owl:starring').outV.outE('dbpedia-owl:starring').inV.groupCount(m).loop(5){
it.loops < 3 }
gremlin> m2 = m.sort{ a,b -> b.value <=> a.value }
gremlin> m2.subMap((m2.keySet() as List)[0..50])

...to poke around the graph. Results to this last one:

==>v[http://dbpedia.org/resource/Stephen_Fry]=8152
==>v[http://dbpedia.org/resource/Hugh_Laurie]=3641
==>v[http://dbpedia.org/resource/Rowan_Atkinson]=2481
==>v[http://dbpedia.org/resource/Tony_Robinson]=2168
==>v[http://dbpedia.org/resource/Miranda_Richardson]=1793
==>v[http://dbpedia.org/resource/Tim_McInnerny]=1398
==>v[http://dbpedia.org/resource/Robbie_Coltrane]=1301
==>v[http://dbpedia.org/resource/Emma_Thompson]=1294
==>v[http://dbpedia.org/resource/Tony_Slattery]=911
==>v[http://dbpedia.org/resource/Colin_Firth]=834
==>v[http://dbpedia.org/resource/John_Lithgow]=729

...what I like about this style of graph access is that it is somehow
less fragile/brittle/precise than SPARQL, and so can deal a bit better
with the chaotic nature of sources like Wikipedia and the Web at
large. Obviously SPARQL has a role too, seems quite complementary to
me.

Dan

---------- Forwarded message ----------
From: Marko Rodriguez <okrammarko at gmail.com>
Date: 9 May 2011 01:41
Subject: A Round of TinkerPop Stack Releases
To: gremlin-users at googlegroups.com


Hello everyone,
This marks a big day for TinkerPop. We are releasing Gremlin 1.0 (its
been 1.5 years in the making) and Rexster 0.3 (a solid, powerful graph
server). Along with these milestones, comes a round of other releases.
Blueprints 0.7 (Patrick):
https://github.com/tinkerpop/blueprints/wiki/Release-Notes
Pipes 0.5 (Drain): https://github.com/tinkerpop/pipes/wiki/Release-Notes
Frames 0.2 (Huff and Puff):
https://github.com/tinkerpop/frames/wiki/Release-Notes
Gremlin 1.0 (Gremlin): https://github.com/tinkerpop/gremlin/wiki/Release-Notes
Rexster 0.3 (Dog Eat Dog):
https://github.com/tinkerpop/rexster/wiki/Release-Notes
All these releases are in the TinkerPop Maven2 repository and uploaded
to and tagged in GitHub.
Thank you to all the TinkerPop contributors, the users, and
please---enjoy the software.
Marko.
http://markorodriguez.com
http://tinkerpop.com


More information about the foaf-dev mailing list