giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman K (JIRA)" <>
Subject [jira] [Commented] (GIRAPH-141) mulitgraph support in giraph
Date Tue, 08 May 2012 09:08:24 GMT


Roman K commented on GIRAPH-141:

On one hand, the problem with two separate constructions for two graph types (like 2 separate
vertex implementations ) is that it would lead to some code-duplications, though not too many
but there will be.
On the other hand, if you chose to implement the simple graph as the private case of multigraph,
it would have some memory overhead (i.e. edge value for simple graph per vertex is 4 bytes
vs 20 bytes, which turns into additional 2MB in heap for 1M vertices) and some slight performance
impact (which, in my opinion, can be neglected) and the simplicity of the API could be somewhat
In my opinion, creation of two separate APIs is less preferable because it would complicate
things for people who want, for some reason, migrate their simple graph to multigraph.
> mulitgraph support in giraph
> ----------------------------
>                 Key: GIRAPH-141
>                 URL:
>             Project: Giraph
>          Issue Type: Improvement
>          Components: graph
>            Reporter: André Kelpe
> The current vertex API only supports simple graphs, meaning that there can only ever
be one edge between two vertices. Many graphs like the road network are in fact multigraphs,
where many edges can connect two vertices at the same time.
> Support for this could be added by introducing an Iterator<EdgeWritable> getEdgeValue()
or a similar construct. Maybe introducing a slim object like a Connector between the edge
and the vertex is also a good idea, so that you could do something like:
> {code} 
> for (final Connector<EdgeWritable, VertexWritable> conn: getEdgeValues(){
>      final EdgeWritable edge = conn.getEdge();
>      final VertexWritable otherVertex = conn.getOther();
>      doInterestingStuff(otherVertex);
>      doMoreInterestingStuff(edge);
> }
> {code} 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message