chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] s11n + rpc


From: Zbigniew
Subject: [Chicken-users] s11n + rpc
Date: Fri, 11 Nov 2005 16:30:04 -0600

I was testing out the RPC egg and noticed it didn't work between a Mac
and a PC.  This stems from endian issues in the s11n egg.  Now, I
don't know if serialization was ever intended to work across
architectures, but I went ahead and made a simple patch [attached] to
the s11n egg.  With this, the RPC egg works fine between OS X on PPC
and Linux on Intel.

There is a basic problem, though, which is 64-bit support.  You can
get 64-bit machines to talk to each other, by writing some 64-bit
ntohl and htonl functions [there's no official standard for this, but
numerous examples out there].   But 32<->64 communication is
problematic because you can't tell the word length of serialized data,
and anyway I suspect converting a 64-bit C_word to a 32-bit C_word
might sometimes be lossy.

So that's why I was thinking, perhaps the data serialized by s11n was
only intended to be deserialized on the same system, and the patch I
made is not generally useful.  I'm going to provide it anyway, since I
found it useful for testing the rpc egg on my network.

[Note: I did not provide correct 64-bit ntohl / ntohl operations, they
are just redefined as no-ops on a 64-bit platform to avoid lossage.]

Attachment: s11n-endian.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]