Intra-process communication possible with services, ideally zero-copy?

asked 2020-03-16 10:00:47 -0500

FabianMene gravatar image

updated 2020-03-16 10:06:42 -0500

The tutorial at shows how to implement zero-copy intra-process communication between nodes via topics.

I would like to employ the same towards services, but am unsure whether that is currently even possible.

First of all, zero-copy message passing seems to only occur when passing the message as unique_ptr. Changing the subscription callback signature from the tutorial to take a shared_ptr introduces a copying step. However, I have not been able to implement a service callback accepting unique_ptr: void callback(MyService::Request::UniquePtr req, MyService::Response::UniquePtr res) fails to compile.

Furthermore, the aforementioned tutorial does state that "[w]e've not done any of this with Services, Parameters, or Actions, but we will." I see this somewhat supported in the lack of latency-improvement when turning on IPC, but it has been my hope that this information is outdated by now.

So: Is it possible to use intra-process communication with services (ideally zero-copy), and if so, how?

edit retag flag offensive close merge delete



I'm pretty sure this is currently not supported.

But I'm not 100% sure, so just a comment.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-16 10:34:58 -0500 )edit