Ask Your Question
2

Messages between Nodes and Nodelets

asked 2017-06-12 09:47:02 -0600

hni19 gravatar image

I am curious as to the way messages are sent if it is being published from a Node, and being subscribed to from a Nodelet. From the wiki page, Nodelet offers "zero copy pointer passing between publish and subscribe calls within the same node." To me, this implies that, for Nodelets operating under the same manager, rather than copying the message being sent, a pointer to the message is sent, lightening the load.

What I am wondering is if a Nodelet is subscribed to a topic, which is published from a seperate Node, was goes on behind the scenes in terms of copying of the data. What I am guessing is that the nodelet manager copies the data through TCP, then sends a pointer to the nodelet?

edit retag flag offensive close merge delete

Comments

+1, I am also a little unclear on this.

Rhys_McK gravatar imageRhys_McK ( 2018-12-04 23:16:56 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-12-05 06:16:18 -0600

gvdhoorn gravatar image

What I am wondering is if a Nodelet is subscribed to a topic, which is published from a seperate Node, was goes on behind the scenes in terms of copying of the data. What I am guessing is that the nodelet manager copies the data through TCP, then sends a pointer to the nodelet?

Yes, that is just about what is happening.

In cases where one of the participants is not hosted by the same nodelet manager (so doesn't share the same address space) the regular infrastructure for (de)serialising messages is used to get the data across.

In essence you'll not benefit from the zero-copy behaviour of nodelets at all in that case.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

4 followers

Stats

Asked: 2017-06-12 09:47:02 -0600

Seen: 309 times

Last updated: Dec 05 '18