[Y-devel] Proposal for a minor change in the Y-protocol

Andrew Suffield asuffield at debian.org
Wed Apr 14 21:36:19 BST 2004


On Wed, Apr 14, 2004 at 07:42:03PM +0200, Andreas Karafyllis wrote:
> > > With or without the null character there is still a small problem. The
> > > next field could start in an address which is not 4-byte aligned. If the
> > > next member is for example an integer, all its field wills be stored in
> > > no 4-bytes aligend addresses. There are to reason I do not like it:
> > > 1) It is ugly :-)
> > > 2) Most modern  RISC processors do not work very happily with not-aligned
> > > values. We should try to make serialization - deserialization as fast as
> > > possible
> >
> > And this is insane. The protocol would change depending on hardware
> > architecture, and it's pointless anyway, since none of the code in Y
> > or libYc++ has alignment issues.
> I cannot follow you here. Firstly, alignment does not make the protocol hardware depedent.

What are you smoking? Alignment is as hardware-dependent as
endianness. Your suggestion is approximately equivalent to "Let's
always send host-endianness integers over the wire to avoid swabbing
on each end" (including the part about breaking cross-platform
compatibility).

> Secondly, I know that there are no alignement issues in the current implementation.
> The whole idea was that they could be considered in the future.

"Let's break the protocol on platforms without 4-byte memory alignment
to work around the possibility of code being written by morons in the
future"? That's not a very compelling argument. You have to be really
stupid to write socket code with alignment issues.

> Finally, I hope you don't mean the word "insane" seriously.

Of course I do, it's an insane idea.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  https://www.debian.org/ |
 `. `'                          |
   `-             -><-          |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://www.y-windows.org/pipermail/y-devel/attachments/20040414/f928fef0/attachment.bin


More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved