I am not sure I completely understand the issue. Just passing a pointer
won't work. The compiled protobuf code won't try to infer the size of the
object. Also it will go over the wire, so you can't reference memory on the
other node.
In one way or another, you need to serialize the object to a byte array.
How you interpret that on the other end is different thing; here you should
be able to reconstruct the object and have the implementations handy on the
receiver side.

// Sender
Obj a;
task.set_data(a.serialize())

// Receiver
Obj b;
b.deserialize(task.data())
b.foobar(); // Call your method - the implementation need to be known by
the receiver.

Did I misunderstand your question?

Niklas


On 30 July 2014 03:43, Sai Sagar <[email protected]> wrote:

> Hi all,
>
> I want to pass a pointer to an object in Task Information like we do in
> task.set_data("some string").
> In executor, I want to call a method of the object with some parameters
> sent along with pointer to object in task information. Can some one please
> guide me on this?
>
>
> Best Regards,
>
> J. Sai Sagar
> Software Engineer,
> Innovation Labs
> Impetus - Bangalore
>
>

Reply via email to