You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Sujan Udayanga <su...@yahoo.com> on 2014/05/21 22:50:34 UTC

n-ary relationship on Giraph


Hi,
Does Giraph supports n-ary relationships? I need to store some properties of triplet vertex -> edge -> vertex and be able to query with those 
properties.
 
Sujan Perera

Re: n-ary relationship on Giraph

Posted by Sujan Udayanga <su...@yahoo.com>.
thanks, this information helps.

 
Sujan Perera

On Thursday, May 22, 2014 5:00 AM, Claudio Martella <cl...@gmail.com> wrote:
 


Well, you don't know of how many supesteps his computation is. What he's asking is very typical in the semantic web community and he's basically hinting at indexes on the labels of the edges. Imagine he wants to involve in a superstep of the computation (of potentially of multiple steps) all the vertices that have a particular edge. He either scans all the vertices and lets them decide who has these edges, or you create an "supernode" that connects to all the vertices that have such outgoing edge (at loading? previously with mapreduce?). In a homogenous dataset like Facebook's where every vertex has more or less the same set of edge labels ("friends", "comment", "likes", etc.) this indices would be overkill and unnecessary, but with heterogenous datasets with respect to schema, like DBpedia, this question may still be relevant.

To answer Sujan's answer, no we don't have indices on edges. You may want to create specific vertices to do that (but be aware of their degree!), or store some of these indices in a WorkerContext (or even aggregators). It really depends on the size of these indices.

Hope this helps,
Claudio



On Thu, May 22, 2014 at 2:57 AM, Pavan Kumar A <pa...@outlook.com> wrote:

The state of triplet A >C>B can be stored in the edge value for C (the edge from A -> B)
>I would like to remind you that Giraph is a batch processing framework, and not a graph database.
>You can do  complex graph processing on the input graph, such questions can be answered very trivially. But performance need not be 
>great. You must write java code and run a map-reduce job.
>
>
>For this case your compute function consists of just 1 superstep
>which filters edges for a vertex based on the criterion and then you can write the output back to one of the supported storage formats.
>
>
>
>
>________________________________
>Date: Wed, 21 May 2014 16:32:44 -0700
>From: sujanucsc@yahoo.com
>Subject: Re: n-ary relationship on Giraph
>
>To: user@giraph.apache.org
>
>
>Lets say I have node A and B, linked with edge C.
>Now I have properties which belongs to this A -> C -> B triplet. For example I have property 'date created'. 'date created' property belongs to A-> C-> B.
>Can I represent this in Giraph. Also does giraph has querying mechanism? So that I can retrieve triplets which are created before particular date?
>
> 
>Sujan Perera
>
>On Wednesday, May 21, 2014 3:51 PM, Pavan Kumar A <pa...@outlook.com> wrote:
> 
>
>
>
>Can you please provide more context.
>
>
>vertex -> edge (edge value can store any properties required of that edge) -> vertex (vertex value can store any property required for the vertex)
>
>
>________________________________
>Date: Wed, 21 May 2014 13:50:34 -0700
>From: sujanucsc@yahoo.com
>Subject: n-ary relationship on Giraph
>To: user@giraph.apache.org
>
>
>
>
>Hi,
>
>Does Giraph supports n-ary relationships? I need to store some properties of triplet vertex -> edge -> vertex and be able to query with those 
properties.
> 
>Sujan Perera
>
>
>


-- 

   Claudio Martella

Re: n-ary relationship on Giraph

Posted by Claudio Martella <cl...@gmail.com>.
Well, you don't know of how many supesteps his computation is. What he's
asking is very typical in the semantic web community and he's basically
hinting at indexes on the labels of the edges. Imagine he wants to involve
in a superstep of the computation (of potentially of multiple steps) all
the vertices that have a particular edge. He either scans all the vertices
and lets them decide who has these edges, or you create an "supernode" that
connects to all the vertices that have such outgoing edge (at loading?
previously with mapreduce?). In a homogenous dataset like Facebook's where
every vertex has more or less the same set of edge labels ("friends",
"comment", "likes", etc.) this indices would be overkill and unnecessary,
but with heterogenous datasets with respect to schema, like DBpedia, this
question may still be relevant.

To answer Sujan's answer, no we don't have indices on edges. You may want
to create specific vertices to do that (but be aware of their degree!), or
store some of these indices in a WorkerContext (or even aggregators). It
really depends on the size of these indices.

Hope this helps,
Claudio


On Thu, May 22, 2014 at 2:57 AM, Pavan Kumar A <pa...@outlook.com> wrote:

> The state of triplet A >C>B can be stored in the edge value for C (the
> edge from A -> B)
> I would like to remind you that Giraph is a batch processing framework,
> and not a graph database.
> You can do  complex graph processing on the input graph, such questions
> can be answered very trivially. But performance need not be
> great. You must write java code and run a map-reduce job.
>
> For this case your compute function consists of just 1 superstep
> which filters edges for a vertex based on the criterion and then you can
> write the output back to one of the supported storage formats.
>
> ------------------------------
> Date: Wed, 21 May 2014 16:32:44 -0700
> From: sujanucsc@yahoo.com
> Subject: Re: n-ary relationship on Giraph
>
> To: user@giraph.apache.org
>
> Lets say I have node A and B, linked with edge C.
> Now I have properties which belongs to this A -> C -> B triplet. For
> example I have property 'date created'. 'date created' property belongs to
> A-> C-> B.
> Can I represent this in Giraph. Also does giraph has querying mechanism?
> So that I can retrieve triplets which are created before particular date?
>
> Sujan Perera
>   On Wednesday, May 21, 2014 3:51 PM, Pavan Kumar A <pa...@outlook.com>
> wrote:
>
>
>
> Can you please provide more context.
>
> vertex -> edge (edge value can store any properties required of that edge)
> -> vertex (vertex value can store any property required for the vertex)
> ------------------------------
> Date: Wed, 21 May 2014 13:50:34 -0700
> From: sujanucsc@yahoo.com
> Subject: n-ary relationship on Giraph
> To: user@giraph.apache.org
>
>
> Hi,
>
> Does Giraph supports n-ary relationships? I need to store some properties
> of triplet vertex -> edge -> vertex and be able to query with those
> properties.
>
> Sujan Perera
>
>
>


-- 
   Claudio Martella

RE: n-ary relationship on Giraph

Posted by Pavan Kumar A <pa...@outlook.com>.
The state of triplet A >C>B can be stored in the edge value for C (the edge from A -> B)I would like to remind you that Giraph is a batch processing framework, and not a graph database.You can do  complex graph processing on the input graph, such questions can be answered very trivially. But performance need not be great. You must write java code and run a map-reduce job.
For this case your compute function consists of just 1 superstepwhich filters edges for a vertex based on the criterion and then you can write the output back to one of the supported storage formats.

Date: Wed, 21 May 2014 16:32:44 -0700
From: sujanucsc@yahoo.com
Subject: Re: n-ary relationship on Giraph
To: user@giraph.apache.org

Lets say I have node A and B, linked with edge C.Now I have properties which belongs to this A -> C -> B triplet. For example I have property 'date created'. 'date created' property belongs to A-> C-> B.Can I represent this in Giraph. Also does giraph has querying mechanism? So that I can retrieve triplets which are created before particular
 date?
 Sujan Perera
     On Wednesday, May 21, 2014 3:51 PM, Pavan Kumar A <pa...@outlook.com> wrote:
    

 Can you please provide more context.vertex -> edge (edge value can store any properties required of that edge) -> vertex (vertex value can store any property required for the vertex)Date: Wed, 21 May 2014 13:50:34 -0700From: sujanucsc@yahoo.comSubject: n-ary relationship on GiraphTo: user@giraph.apache.orgHi,Does
 Giraph supports n-ary relationships? I need to store some properties of
 triplet vertex -> edge -> vertex and be able to query with those 
properties. Sujan Perera 		 	   		  

       		 	   		  

Re: n-ary relationship on Giraph

Posted by Sujan Udayanga <su...@yahoo.com>.
Lets say I have node A and B, linked with edge C.
Now I have properties which belongs to this A -> C -> B triplet. For example I have property 'date created'. 'date created' property belongs to A-> C-> B.
Can I represent this in Giraph. Also does giraph has querying mechanism? So that I can retrieve triplets which are created before particular date?

 
Sujan Perera

On Wednesday, May 21, 2014 3:51 PM, Pavan Kumar A <pa...@outlook.com> wrote:
 



Can you please provide more context.

vertex -> edge (edge value can store any properties required of that edge) -> vertex (vertex value can store any property required for the vertex)


________________________________
Date: Wed, 21 May 2014 13:50:34 -0700
From: sujanucsc@yahoo.com
Subject: n-ary relationship on Giraph
To: user@giraph.apache.org




Hi,
Does Giraph supports n-ary relationships? I need to store some properties of triplet vertex -> edge -> vertex and be able to query with those 
properties.
 
Sujan Perera

RE: n-ary relationship on Giraph

Posted by Pavan Kumar A <pa...@outlook.com>.
Can you please provide more context.
vertex -> edge (edge value can store any properties required of that edge) -> vertex (vertex value can store any property required for the vertex)
Date: Wed, 21 May 2014 13:50:34 -0700
From: sujanucsc@yahoo.com
Subject: n-ary relationship on Giraph
To: user@giraph.apache.org

Hi,Does
 Giraph supports n-ary relationships? I need to store some properties of
 triplet vertex -> edge -> vertex and be able to query with those 
properties. Sujan Perera