[EROS-Arch] number key endianness

Karp, Alan alan_karp@hp.com
Thu, 15 Mar 2001 09:06:10 -0800


> -----Original Message-----
> From: Bill Frantz [mailto:frantz@pwpconsult.com]
> Sent: Wednesday, March 14, 2001 6:04 PM
> To: Jonathan S. Shapiro; Karp, Alan
> Cc: 'clandau@macslab.com'; eros-arch@eros-os.org
> Subject: Re: [EROS-Arch] number key endianness
> 
> 
> At 3:27 PM -0800 3/1/01, Jonathan S. Shapiro wrote:
> >"Karp, Alan" wrote:
> >>
> >> The first message sent by the Initiator was 4 bytes that 
> encoded its byte
> >> order, integer length, and character encoding.  (I only 
> needed 8 bits, but I
> >> left room for growth.)  The first reply from the Listener 
> was its 4 bytes.
> >> The rule was "Initiator makes right".
> >
> >This makes sense for a connectionful protocol, but capability
> >invocations are frequently one shot, so a startup protocol 
> adds too much
> >overhead. I think we will have to design that service specifies byte
> >order and client makes right. Note that we aren't going over networks
> >with this stuff -- it's only a consideration on machines that emulate
> >multiple architectures.
> 
> I have worked on a system which negotiated the endianness of 
> the protocol.
> Unfortunately, it did not automatically generate the 
> conversions (through
> an IDL or some other mechanism).  Failure to convert all the 
> integers was a
> frequent bug (which appeared in some released code!!)
> 

This was one of the arguments made in favor of adopting network byte order
for the e-speak protocol.  As e-speak moved from a distributed operating
system focus to a b2b infrastructure, the performance hit of unnecessary
byte reversal became less of an issue, and the current product does not
negotiate endianness.  If you're trying to squeeze out every microsecond of
latency, byte reversal is an issue.  If you're dealing with business
services, nobody cares as long as the latency is under 5 seconds.

> "A more complex system is less secure on all fronts." - Bruce Schneier

Premature optimization is the root of all evil. - Don Knuth

> 
> A wise computer industry veteran is rumored to have said, 
> "Everyone who
> understands the endian issue has a strong opinion about 
> whether big-endian
> or little-endian is better; and wishes the other side had won."
> 
> Cheers - Bill
> 
> 
> --------------------------------------------------------------
> -----------
> Bill Frantz       | Microsoft Outlook, the     | Periwinkle 
> -- Consulting
> (408)356-8506     | hacker's path to your      | 16345 Englewood Ave.
> frantz@netcom.com | hard disk.                 | Los Gatos, 
> CA 95032, USA
> 
> 
> _______________________________________________
> eros-arch mailing list
> eros-arch@mail.eros-os.org
> http://www.eros-os.org/mailman/listinfo/eros-arch
> 

_________________________
Alan Karp
Principal Scientist
Decision Technology Department
Hewlett-Packard Laboratories MS 1U-2
1501 Page Mill Road
Palo Alto, CA 94304
(650) 857-3967, fax (650) 857-6278
https://ecardfile.com/id/Alan_Karp
http://www.hpl.hp.com/personal/Alan_Karp/