comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin D. Condic" <mcondic-nospam@acm.com>
Subject: Re: Representation Clauses And Freezing
Date: 2000/07/22
Date: 2000-07-22T21:29:49+00:00	[thread overview]
Message-ID: <397A1247.F1DE7505@acm.com> (raw)
In-Reply-To: ujme5.27$Al5.45903@news.pacbell.net

tmoran@bix.com wrote:
> You can really do a lot with Streams.  You can of course define a
> 'Write to one child of Root_Stream_Type that puts the bytes of the
> data object into a Stream_Element_Array.  But a different child of
<snip>

I've played with streams and the 'Read/'Write stuff and I like it a lot.
I believe my posted examples on my webpage utilize this - or I have one
around here somewhere.... (where did I put it??? :-)

For stuff on a PC or workstation using TCP/IP as the transport, I'd
agree that this is the way to go. Either using the defaults or rolling
your own, you could pretty much handle the representation issues in that
manner. The problem is if you have this sort of thing on a hard real
time system with possibly limited memory and not much spare CPU. You
really need to minimize the data motion and whatever overhead is
associated with the 'Read and 'Write. When I've tinkered with this, it
seems to degenerate into some kind of procedure call for each field of
the record. That can translate into significant time. Also, you are
moving the data out of the record and into a temporary stream, then out
of the stream and into some hardware buffer (maybe) and that translates
into more overhead. Using an overlay of a Stream_Element_Array, you can
avoid this.

Please don't get me wrong - I wouldn't avoid Ada.Streams in most
applications because the overhead for data motion, etc., would likely be
unimportant. It's a clever way of getting there and would work quite
well. I just want to build a subsystem that doesn't depend on this as a
necessity so that it could be usable in tough situations.

MDC
-- 
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

"Nothing in the world is more dangerous than sincere ignorance and
conscientious stupidity."

    -- Martin Luther King, Jr
======================================================================




  reply	other threads:[~2000-07-22  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-17  0:00 Representation Clauses And Freezing Marin D. Condic
2000-07-17  0:00 ` Stephen Leake
2000-07-20  0:00   ` Marin D. Condic
2000-07-20  0:00     ` Stephen Leake
2000-07-21  0:00       ` Marin D. Condic
2000-07-21  0:00         ` Simon Wright
2000-07-22  0:00           ` Marin D. Condic
2000-07-22  0:00             ` tmoran
2000-07-22  0:00               ` Marin D. Condic [this message]
2000-07-24  0:00               ` Ted Dennison
2000-07-21  0:00         ` Stephen Leake
2000-07-21  0:00           ` Marin D. Condic
2000-07-21  0:00     ` tmoran
2000-07-18  0:00 ` Tucker Taft
2000-07-18  0:00 ` Nicolas Brunot
replies disabled

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