Hi Niklas, Thanks for the response.
Actually I have an Instance of a framework running. The framework is in C++. I registered the framework with mesos. I am getting resource offers offered by Apache mesos. For getting resources, I sent the "this" pointer of the instance to the class which implements our mesos scheduler interface. I have launch the task taken from the "this" pointer. I am perplexed how to proceed. The instance of framework has no serialization implementation. My task is to carry the instance of framework to the executor and then call a method from the task data given in scheduler of mesos. J. Sai Sagar Associate Engineer, Innovation Labs Impetus - Bangalore On Wed, Jul 30, 2014 at 10:35 PM, Niklas Nielsen <[email protected]> wrote: > 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 >> >> > >

