[Blueprints] PartitionGraph Wrapper Utility

183 views
Skip to first unread message

Marko Rodriguez

unread,
Feb 1, 2012, 1:56:32 PM2/1/12
to gremli...@googlegroups.com
Hello,

There is a new wrapper utility in blueprints-core called PartitionGraph. This graph wrapper allows you to represent multiple graph partitions within a single graph data structure. This can be seen as the property graph equivalent to "named graphs" in the Web Of Data/Linked Data world.


Enjoy!,
Marko.

Darrick Wiebe

unread,
Feb 1, 2012, 2:16:42 PM2/1/12
to gremli...@googlegroups.com

Beautiful!

Joshua Shinavier

unread,
Feb 1, 2012, 4:45:11 PM2/1/12
to gremli...@googlegroups.com
On Wed, Feb 1, 2012 at 2:16 PM, Darrick Wiebe
<dar...@innatesoftware.com> wrote:
> Beautiful!

Yep. Nice addition to the TinkerPop toolbox.

Josh

Alex Averbuch

unread,
Feb 2, 2012, 2:36:17 AM2/2/12
to gremli...@googlegroups.com
Hey Marko,
What's the motivation for allowing an Edge to reside on a partition other than the Partition of both its "in" and "out" vertices?

Marko Rodriguez

unread,
Feb 2, 2012, 2:40:15 AM2/2/12
to gremli...@googlegroups.com
Hey,

> What's the motivation for allowing an Edge to reside on a partition other than the Partition of both its "in" and "out" vertices?

An edge across partitions can be seen as a merge point for the two partitions.

A user can write/read to partition "a".
Another user can write/read to partition "b".
A final user can read from "a", "b", and "c" and write to "c". As such, this final user is able to make a new partition that is the merge of the first two users' work.

Cool?,
Marko.

http://markorodriguez.com

Pierre De Wilde

unread,
Feb 2, 2012, 2:49:23 AM2/2/12
to gremli...@googlegroups.com
Hey Marko,

Cool, indeed. 

If partitions are implemented via a special property (eg _partition), can we use 

.sideEffect{it.setProperty('_partition', 'x')}

to set/change the partition on existing vertices/edges?

Thanks,
Pierre

Marko Rodriguez

unread,
Feb 2, 2012, 2:56:16 AM2/2/12
to gremli...@googlegroups.com
> If partitions are implemented via a special property (eg _partition), can we use
> .sideEffect{it.setProperty('_partition', 'x')}
> to set/change the partition on existing vertices/edges?

Yea. However, if you are doing it via the PartitionGraph wrapper, then you can do:

.sideEffect{it.setPartition('x')}

Marko.

http://markorodriguez.com

Alex Averbuch

unread,
Feb 2, 2012, 3:24:10 AM2/2/12
to gremli...@googlegroups.com
An edge across partitions can be seen as a merge point for the two partitions.

A user can write/read to partition "a".
Another user can write/read to partition "b".
A final user can read from "a", "b", and "c" and write to "c". As such, this final user is able to make a new partition that is the merge of the first two users' work.

Aha, got it. Cool.

You want to support the creation of "mash up" (I don't know Semantic Web terms) graphs?

I was thinking of PartitionGraph from the opposite point of view: the breaking up of one big graph, that had outgrown the resources of its original home. In that case, from the performance aspect, allowing lone Edge instances seemed suspect.

Your model is more general though; nothing prevents performance-oriented implementations of PartitionGraph from enforcing additional restrictions, e.g. Edge must be collocated with its in Vertex.

I like it.

Given that the "owner" of one Partition may want to limit, for example, write access to their data, do you see authorization support (e.g. AuthorizationGraph interface) as something Blueprints could support?

Alexandre Blanquart

unread,
Feb 2, 2012, 4:10:01 AM2/2/12
to gremli...@googlegroups.com
Hi,

Good news. Considering to load RDF quadruple using SailGraph#loadRDF and naming the named graph with the "baseGraph" parameter, what is the best way to use this new implementation of graph ? in order to traverse a particular named graph or a set of named graphs.

Alex

Alfredo Serafini

unread,
Feb 4, 2012, 7:56:36 AM2/4/12
to gremli...@googlegroups.com
yes, it's really cool! :-)
it's useful in domain-centric approach!
and it's interesting the idea about the named graph for semantic web app...

vlg

unread,
Feb 2, 2012, 5:11:22 AM2/2/12
to Gremlin-users
Hi there,

Very good idea ! How can one retrieve all existing paritions of a
graph ?

One step further would be to create clusterable graph, where vertices
could belong to multiple clusters (i.e. in some way partitions that
can overlap), and where clusters could also belong to other clusters.
But this would require more than a wrapper I guess..

Vince

Adolfo Rodriguez

unread,
Feb 9, 2012, 3:52:44 PM2/9/12
to Gremlin-users
Hi, I wanted to give A run to this PartitionGraph concept, as a
solution to the necessities that I suggested here:
http://groups.google.com/group/gremlin-users/browse_thread/thread/ae68eff0c889a62c

I searched for the code in blueprints-core (http://tinkerpop.com/
maven2/com/tinkerpop/blueprints/blueprints/1.1/api/) but cannot find
this PartitionGraph class in the API as described here:
http://groups.google.com/group/gremlin-users/browse_thread/thread/955d7a0db78d39cf

It is, however, in Github (https://github.com/tinkerpop/blueprints/
tree/master/blueprints-core/src/main/java/com/tinkerpop/blueprints/pgm/
util/wrappers/partition).

Blueprints 1.1 looks to include the structure previous to the
refactoring. Is there any schedule for the release of this feature?

Thanks,

Adolfo

Pierre De Wilde

unread,
Feb 9, 2012, 5:12:02 PM2/9/12
to gremli...@googlegroups.com
Hi,

Between official releases, up-to-date code (currently Blueprints-1.2.-SNAPSHOT) is available at


with the related up-to-date documentation:



PartitionGraph doc is therefore available at:



HTH,
Pierre
Reply all
Reply to author
Forward
0 new messages