comp.lang.ada
 help / color / mirror / Atom feed
From: Peter Dulimov <pedu@eraseme.systems.saab.se>
Subject: Re: adasockets and adatypes
Date: Fri, 07 Sep 2001 15:16:08 +0200
Date: 2001-09-07T15:16:08+02:00	[thread overview]
Message-ID: <3B98C898.99D7A1F6@eraseme.systems.saab.se> (raw)
In-Reply-To: umqg0a0ol4z.fsf@maestro.clustra.com


Getting a bit off the original topic here, but ...

Is there a freely available XDR to Ada translator?  I have heard of the Ada
Corba effort, but being an old-fashioned kind of person I would prefer an
OSF-DCE implementation for Ada (the part dealing with RPC that is).  I guess
linking into object files produced by compiling automatically generated C
code is acceptable, but it raises the barrier to "broad general acceptance"
just a little bit further.

Also, what about the efficiency consideration?  The compiler generally
chooses the best representation that it can to get alignment right for
complicated data types, and if you go specifying every bit's position, you
are likely to introduce more fix-up delays.  When I have done this
(specifying bit patterns for socket comms with C programs etc), I have had a
type defined for "on the wire" where the representation is specified, and
another equivalent type for internal usage where I let the compiler choose
the representation.  The conversion from one type to another is the last
thing that happens {before hitting  | after leaving} the wire.

Regards,

Peter Dulimov.

Ole-Hjalmar Kristensen wrote:

[snip]

> And don't forget that there are automated tools for doing this in C,
> the most widespread is probably SUN's XDR/rpcgen, which always has
> been freely available.  From an XDR interface specification, rpcgen
> will happily generate both server and client side subs, and indeed a
> skeleton server, if you wish. As the XDR format is a wire format,
> there are no problems with different compilers and endianness.  rpcgen
> essentially eliminated the extra manual work in writing bread and
> butter client/server applications years ago.
>
> Of course, there is nothing stopping you from calling the generated C
> stubs from Ada.
>
> --
> Kabelsalat ist gesund.
>
> Ole-Hj. Kristensen




  reply	other threads:[~2001-09-07 13:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-04 10:53 adasockets and adatypes Tony Gair
2001-09-04 11:37 ` David C. Hoos, Sr.
2001-09-04 12:17   ` Florian Weimer
2001-09-04 14:55     ` David C. Hoos
2001-09-04 15:33       ` Ted Dennison
2001-09-04 15:53         ` David C. Hoos
2001-09-04 18:53           ` Ted Dennison
2001-09-04 20:44             ` David C. Hoos
2001-09-04 21:35               ` Ted Dennison
2001-09-04 15:58         ` Marin David Condic
2001-09-05  9:13   ` Tony Gair
2001-09-04 12:02 ` Marc A. Criley
2001-09-04 13:43 ` Marin David Condic
2001-09-04 22:12   ` Simon Wright
2001-09-06  7:04     ` Ole-Hjalmar Kristensen
2001-09-07 13:16       ` Peter Dulimov [this message]
2001-09-07 14:46         ` Ted Dennison
2001-09-08  5:51         ` Simon Wright
2001-09-06 14:16     ` Marin David Condic
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox