comp.lang.ada
 help / color / mirror / Atom feed
* Looking for experience with Ada/RPCs
@ 1993-04-07 22:08 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com!
  0 siblings, 0 replies; 4+ messages in thread
From: agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com! @ 1993-04-07 22:08 UTC (permalink / raw)


I am looking for anyone who has used RPCs within an Ada program.
What were the experiences (good and bad)?  What gyrations were required?
How much "C" code was required to perform the interface?  What
commercial products exist to support the use of RPCs (both as server and
client)?

Responses can be either e-mailed or posted.  Thanks for the help.
-- 
Ron Bjornseth                 bjornset@pogo.den.mmc.com
///////////////////////////////////////////////////////////////

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Looking for experience with Ada/RPCs
@ 1993-04-08  2:05 David Emery
  0 siblings, 0 replies; 4+ messages in thread
From: David Emery @ 1993-04-08  2:05 UTC (permalink / raw)


We recently implemented a client-server application in Ada using the
Sun/ONC RPC mechanism, along with other Open Systems components.  We
needed 5 lines of C to work around a compiler bug; otherwise the
entire application (26k semicolons) was written in Ada, including Ada
bindings to ONC RPC and XVT.  The entire application was developed in
8 weeks by 5 software engineers plus a human factors person working
half-time. 

No "gyrations" were required at all.  There are some standard issues
in doing interfaces to C (see my Tri-Ada 90 paper for a discussion of
Ada to C interface techniques), which were required to pass data to
the RPC and XDR C Libraries.  For instance, we used xdr_wrapstring()
to pass Ada strings by copying the string into a local, appending null
to the end, and passing the address of the first element of this
string and the length of the string to the C routine.  For arrays, our
interface provides a COUNT routine and a routine that returns the
actual array.  We use TCP connection protocol (rather than UDP
connectionless protocol) to pass the arrays.  On the client side, the
client calls COUNT, declares/allocates an array object of length
COUNT, and then calls the RPC routine that returns the complete array.

The biggest shortcoming was that we were unable to use any of the
commercial RPC generators as they interpret and produce C.  Today we
talked to a company with an RPC generator tool that might be "fooled"
in such a way that we could generate much (but not all) of the client
and server stubs and XDR routines.   (The generated code would be C,
but the data would be Ada.  Part of the hand-coding would be calls to
the C stubs generated by the tool.)

We wrote a lot of code (about 20% more than we would have if we used C
and an RPC generator), but Ada was a major contributor in keeping
things consistent.  We understand that coding more than 20 RPCs is
considered to be 'hard', yet we had one person generate about 25 RPCs,
using all 'hand-generated' code in about 6 weeks.  And, this was a
person with no prior background in RPC programming.  After we worked
out a few bugs in our protocol, it got boring.  One of the things we
worked out was how to trap exceptions on the server side, transmit
them across the RPC, and then reraise them on the client side.  

We plan to get public release on a technical report describing our
application, including our techniques for coding RPC's.  We have also
submitted a "experience" session (or half-day tutorial) for Tri-Ada 93
where we will go over the entire application in detail, including the
client-server architecture of our system, and why we chose to split
the application as we did, our use of the XVT product and the Ada
Binding we developed to XVT, our binding and coding techniques for ONC
RPC, and our use of Embedded SQL from Ada.  We are starting a port of
the client to a 386 PC running DOS, which should be finished by
Tri-Ada (in time to discuss the portability of our software, including
the RPC interface.)

				dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Looking for experience with Ada/RPCs
@ 1993-04-09 13:51 Gregory Aharonian
  0 siblings, 0 replies; 4+ messages in thread
From: Gregory Aharonian @ 1993-04-09 13:51 UTC (permalink / raw)


We plan to get public release on a technical report describing our
>application, including our techniques for coding RPC's.  We have also
>submitted a "experience" session (or half-day tutorial) for Tri-Ada 93
>where we will go over the entire application in detail, including the
>client-server architecture of our system, and why we chose to split
>the application as we did, our use of the XVT product and the Ada
>Binding we developed to XVT, our binding and coding techniques for ONC
>RPC, and our use of Embedded SQL from Ada.  We are starting a port of
>the client to a 386 PC running DOS, which should be finished by
>Tri-Ada (in time to discuss the portability of our software, including
>the RPC interface.)

    Since MITRE is publicly funded, as probably this effort was, and since
it doesn't sound like a classified project (or if it is, strip out the
classified constants and data), how about posting the code to comp.lang.ada?
For all of the great, publicly funded Ada projects across the country,
much non-classified, why don't you guys ever post these codes, or at least
make them anonymous-ftp downloadable.  Is "Reuse" just a phrase to get
more money out of the DoD to pay for overhead?????

Greg Aharonian
Source Translation & Optimization
-- 
**************************************************************************
Greg Aharonian
Source Translation & Optimiztion
P.O. Box 404, Belmont, MA 02178

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Looking for experience with Ada/RPCs
@ 1993-04-10 16:19 David Emery
  0 siblings, 0 replies; 4+ messages in thread
From: David Emery @ 1993-04-10 16:19 UTC (permalink / raw)


Considering the business Greg is in, he should know that most
gocvernment contracts have contract provisions requiring government
approval before source code, documentation, papers, etc, are released
to the general public.  The reasons for these requirements include
security and export control and also acquisition/procurement
restrictions.  I really don't want to get fired or sent to jail in
order to help Greg's software components redistribution business :-)

As I said, once we receive permission, we will be posting source code,
etc.  I would point out that the source code on another MITRE project,
the Ada Decimal Arithmetic and Representation is available on
ajpo.sei.cmu.edu. 

				dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1993-04-10 16:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-04-10 16:19 Looking for experience with Ada/RPCs David Emery
  -- strict thread matches above, loose matches on Subject: below --
1993-04-09 13:51 Gregory Aharonian
1993-04-08  2:05 David Emery
1993-04-07 22:08 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com!

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