How to force the routing of a message to stop (in Pastry)

37 views
Skip to first unread message

Same Diffr

unread,
Dec 22, 2013, 7:11:00 AM12/22/13
to peerfac...@googlegroups.com
I am extending the PastryMessageHandler.java:

If a certain message (newly implemented by me) is detected at a node, the node has to stop the forwarding/routing of that message.

How would be the best way to prevent the further routing of a message?

I can't find appropriate code in the  PastryMessageHandler.java, that would perform such a task.


Best regards

Matthias Feldotto

unread,
Dec 27, 2013, 5:37:03 AM12/27/13
to peerfac...@googlegroups.com
Hi,

the appropriate code can be find at two different places depending on the method you use:
  • DHT: the routing was started by nodeLookup() or valueLookup(): The forwarding is managed by the PastryMessageHandler. In lines 233ff you find the code for this.
  • KBR: the routing was started by route(): The forwarding is managed by the common KBR components. They take use of implemented methods like route() or local_lookup(), but the real forwarding code is in the KBRMsgHandler class at lines 161ff.
Depending on your concrete use case, you should modify or extend one of the described components. I hope I could help you.

Same Diffr

unread,
Jan 3, 2014, 5:02:34 AM1/3/14
to peerfac...@googlegroups.com
You said "Depending on your concrete use case, you should modify or extend one of the described components".

How can I find out, if my application is using DHT or KBR? Can this be set with the help of the config file of my simulation or within my code?

Thank you for your help, Matthias!

Matthias Feldotto

unread,
Jan 10, 2014, 9:37:57 AM1/10/14
to peerfac...@googlegroups.com
It depends on the entering routing method which you use. If your application calls nodeLookup() or valueLookup() the overlay will use the DHT implementation. If your application calls route() or local_lookup(), it will use the KBR implementation. For an overview of the complete interfaces, please look at the DHTNode or KBRNode interface in the API package.
Reply all
Reply to author
Forward
0 new messages