Question

Is there any way to send messages to incoming edges in giraph? Or, Is there any way to send messages through any particular edge(type or label etc.,) instead of sending messages to all outgoing edges?

Was it helpful?

Solution

So to first clarify - Edges don't limit you on how you are allowed to send messages. You can send messages in giraph to any node, as long as you know its ID. Edges are there to create a structure of the graph and give the nodes a set of neighbours so you can start up the communication.

You also cannot search for Edges or Nodes. I'm not sure if you can access an edge, from a node which isn't the source, but you for sure cannot simply search for an edge with a label (unless you implement such an algorithm yourself). You also cannot search for nodes (unless you again implemented the algorithm), but need to know the id of the node.

So if you want to send messages to all incoming nodes which have edges pointing at you and you don't know their IDs, you'll first need to send a message to all nodes at which you have an edge pointing and in the next superstep all nodes should reply to the sources of those messages. To be able to do this, you'll also need to modify your Message Data-Type to hold additionally to the information, the ID of the node sending the message.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top