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

Andrew Suffield asuffield at debian.org
Wed Apr 14 09:01:38 BST 2004


On Sun, Apr 11, 2004 at 02:51:30PM +0200, Andreas Karafyllis wrote:
> If am currently implementing Eiffel-bindings for Y and I noticed thet the way 
> string are serialized as message-members can be improved.
> 
> Currently (I am talking about the latest version after patch 33), a string is 
> serialized as following:
> 00 - 03: Member length without this field
> 04 - 07: Type information (0 for strings)
> 08 - XX: The string including the 0 character.

This is simply wrong. There are no terminators in wire strings. You
just sent a string that has a \0 as the last character.

> 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.

-- 
  .''`.  ** 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/3f7cb9b8/attachment-0001.bin


More information about the Y-devel mailing list









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