[
https://issues.apache.org/jira/browse/GIRAPH-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402976#comment-13402976
]
Alessandro Presta commented on GIRAPH-141:
------------------------------------------
As I see it, the edge ids are only known to the respective source vertices.
When sending a request to add an edge, the requester is unaware of the internal
representation in the source vertex.
Having global edge ids instead of per-vertex would also lead to additional race
conditions to be handled at each superstep.
In other words, I think even for multigraphs we want to adhere to the principle
of a vertex-centric API where edges are second class citizens.
Perhaps it would be even clearer if we didn't even expose J as a type argument,
and just used integer edge ids.
I can start putting together an implementation that works so we highlight
potential limitations of this approach.
> multigraph support in giraph
> ----------------------------
>
> Key: GIRAPH-141
> URL: https://issues.apache.org/jira/browse/GIRAPH-141
> Project: Giraph
> Issue Type: Improvement
> Components: graph
> Reporter: André Kelpe
> Assignee: Alessandro Presta
>
> 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:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira