comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Ada x <whatever> Datagram Sockets
Date: Mon, 11 Feb 2019 13:35:07 +0000
Date: 2019-02-11T13:35:07+00:00	[thread overview]
Message-ID: <lysgwuwir8.fsf@pushface.org> (raw)
In-Reply-To: q3rcc9$1mpc$1@gioia.aioe.org

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On 2019-02-10 18:54, Simon Wright wrote:
>
>> A further benefit of using streams was that we were communicating
>> between machines of different endianness, and GNAT contains an
>> optional stream implementation that will transparently convert
>> to/from network byte order.
>
> That does not make much sense. Most protocols of the layers above
> simply ignore that and use the order (encoding, actually) they prefer
> for whatever reason. Furthermore encoding integers is the least
> problem.

Machine A (a PowerPC) will automatically send the contents of a record
in network byte order. Machine B (x86_84) will handle the protocol
without problem but requires the content of the the record to be
converted to host byte order. Best, especially if the record content is
subject to change, if that conversion can be automatic.

A consideration on that project was that the target hardware was all
PowerPC, and conversion load was to be avoided if possible, while the
x86_64 part was all about logging and analysis, and had cycles to spare.

> Anyway, there are two major and quite different cases: piped I/O
> vs. encoding/decoding. You refer to the latter and FIFO is likely the
> former.

If you're communicating within one program, use an indefinite queue. If
between two programs, I don't see there's a lot of difference really
(OK, if the programs are both on x86_64, doesn't make much sense to
convert the contents to network byte order! which is a disadvantage of
using a modified runtime, of course).

  reply	other threads:[~2019-02-11 13:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 23:10 Ada x <whatever> Datagram Sockets Rego, P.
2019-02-07  0:42 ` Jere
2019-02-07  5:28   ` Rego, P.
2019-02-07  6:00     ` Egil H H
2019-02-07  6:41       ` Rego, P.
2019-02-07  7:23         ` Egil H H
2019-02-07 11:48           ` Jere
2019-02-08 19:41           ` Rego, P.
2019-02-08 20:31             ` Dmitry A. Kazakov
2019-02-08 21:56               ` Rego, P.
2019-02-07  8:28         ` Dmitry A. Kazakov
2019-02-07 10:08           ` Simon Wright
2019-02-08  0:15           ` Randy Brukardt
2019-02-08  8:25             ` Simon Wright
2019-02-08 13:24               ` Dmitry A. Kazakov
2019-02-09  1:01               ` Randy Brukardt
2019-02-10 17:54                 ` Simon Wright
2019-02-11  8:39                   ` Dmitry A. Kazakov
2019-02-11 13:35                     ` Simon Wright [this message]
2019-02-11 14:25                       ` Dmitry A. Kazakov
2019-02-11 15:19                         ` Simon Wright
2019-02-11 16:04                           ` Dmitry A. Kazakov
2019-02-11 23:19                   ` Randy Brukardt
2019-02-12 11:35                     ` Simon Wright
2019-02-08 19:44           ` Rego, P.
2019-02-07 11:47         ` Jere
2019-02-07 18:00           ` Jeffrey R. Carter
2019-02-08 20:35             ` Rego, P.
2019-02-08 21:26               ` Jeffrey R. Carter
2019-02-08 22:02                 ` Rego, P.
2019-02-08 21:38               ` Dmitry A. Kazakov
2019-02-08 20:00           ` Rego, P.
2019-02-07 10:11     ` Simon Wright
2019-02-08 20:03       ` Rego, P.
replies disabled

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