|
Boost : |
From: Stjepan Rajko (stipe_at_[hidden])
Date: 2007-05-01 21:25:34
On 5/1/07, Sohail Somani <s.somani_at_[hidden]> wrote:
> > -----Original Message-----
> > From: boost-bounces_at_[hidden]
> > [mailto:boost-bounces_at_[hidden]] On Behalf Of Stjepan Rajko
>
> > Yes, each object passed / returned must be serializable via
> > Boost.Serialization. No polymorphic interface is required from the
> > objects.
>
> A call to rpc(f,a1,a2), does it generate some_child<R(T1,T2)> : public
> some_base which is then serialized and subsequently deserialized and
> called by some_base *?
Sorry, I sent you the wrong link... oops. The actual link is:
dancinghacker.com/code/marshal/
Apologies.
A call rpc(f,a1,a2), to use that notation, is itself modeled roughly
as call<R(T1,T2)> this_particular_call(f,a1,a2) which inherits
call_base (which does provide a polymorphic interface). f (function
identifier), a1 and a2 are all serialized within the call class, and
after a a call rpc_client(this_particular_call) and sent over the
network. The syntax can be made to look like it's just a local
function call, but the guts of it look like what I described.
On the other side, a registry_server receives the packet, unserializes
the function id, and calls a marshaled<R(T1,T2)> wrapper of the actual
function. The marshaled class takes care of unserializing the
parameters and calling the actual function, then the results get
marshaled back etc.
Stjepan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk