From -2391869678007600859
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,fa4c9935954c426
X-Google-Attributes: gid109fba,public
X-Google-Thread: 113dfb,fa4c9935954c426
X-Google-Attributes: gid113dfb,public
X-Google-Thread: f78e5,fa4c9935954c426
X-Google-Attributes: gidf78e5,public
X-Google-Thread: 111308,fa4c9935954c426
X-Google-Attributes: gid111308,public
X-Google-ArrivalTime: 1995-02-28 22:35:37 PST
Path: bga.com!news.sprintlink.net!howland.reston.ans.net!EU.net!uknet!warwick!news.ncl.ac.uk!nmcl
From: Mark Little <M.C.Little@ncl.ac.uk>
Newsgroups: comp.client-server,comp.lang.c++,comp.std.c++,comp.os.ms-windows.programmer.win32
Subject: Re: Marshalling C++ Objects
Date: 28 Feb 1995 14:01:38 GMT
Organization: Computing Laboratory, U of Newcastle upon Tyne, UK NE17RU
Lines: 51
Distribution: world
Message-ID: <3ivac2$b4p@whitbeck.ncl.ac.uk>
References: <3igf2v$kcd@epsilon.qmw.ac.uk> <3irb98$qj5@picasso.cssc-syd.tansu.com.au>
NNTP-Posting-Host: glororan.ncl.ac.uk
Xref: bga.com comp.client-server:6629 comp.lang.c++:52340 comp.std.c++:7035 comp.os.ms-windows.programmer.win32:9548


In article <3irb98$qj5@picasso.cssc-syd.tansu.com.au>, Greg Wilkins <gregw@ind.tansu.com.au> writes:
>tariqh@dcs.qmw.ac.uk (Tariq Hamid) wrote:
>>
>> How do you marshal/unmarshal C++ objects. It appears to be a difficult problem
>> as the inheritance hierarchy has to be considered.
>> 
>
>There are several techniques for doing it in C++ code (with or
>without the assistance of horrid macros).  But all a a bit manual
>and prone to some degree of error.


In Arjuna, which is a set of tools for building fault-tolerant distributed
applications in C++, we have a stub generation tool which automates a great deal
of this. It works on the standard C++ class definition, and generates marshalling/unmarshalling
code for fairly complex objects (lists of arbitrary complexity, other classes, etc),
and does this transparently. The only difference between using a local and remove object is
a single line change in the application (basically to include the stub header instead
of the real object).

Although manual intervention is possible and necessary in some cases, we've
found this to be a useful starting point, as have many people who've used the
system.

If anyone's interested in looking at this, the source for Arjuna can be obtained
via anonymous ftp from arjuna.ncl.ac.uk in /pub/Arjuna/Source. This is the whole
fault-tolerant system, which the stub generator is only a part of. It's still
possible to use it in isolation though.

If you're only interested in distributed C++, then drop me a line.


>
>Hopefully the standard for this will be IDL (CORBA), or some 
>extension to it for OODBs (ODMG-93).
>

Certainly for portability and cross-language support, this will be
necessary.

Mark.

-------------------------------------------------------------------------
SENDER  : Mark Little, PHONE : +44 91 222 8066, FAX : +44 91 222 8232
	  Arjuna Project, Distributed Systems Research.
POST    : Department of Computing Science, University of Newcastle upon Tyne,
	  UK, NE1 7RU
ARPA    : M.C.Little@newcastle.ac.uk
JANET   : M.C.Little@uk.ac.newcastle



