What I want is clean break between the part of the code that parses the
serialization and the part that handles the messages. Having the message
classes parse hex strings for numbers itself does not achieve this - it puts an
important part of serialization inside objects that do not have anything to do
with the transport itself.

Now, one way to move this out is simply to to allow the different sorts of
reads from the fieldset - like I did it. It has the negative artifact that with
the current protocol you can read the numeric fields as strings if you try, but
one could view this sort of like a bad  or badly typed pointer in many
languages - it gives you garbled data (it also makes the whole thing more
complicated, but I won't complain about that). The problem occurs when you try
to read and handle fields that you do not know at all. The you simply have to
default to reading them as strings (for our transport), which means that the
transports choice of encoding leakes into the rest of the code.

A gateway between two transports that want to encode values differently is the
most simple example of where it blows up. 

The testbed is not the core of the issue, but of course it would be very nice
if it's transport did not have to deal with encoding values as hex. I don't
agree with LDC that the testbed need necessarily use the same transport as the
nodes do - Freenet is complicated enough that I would much rather make it
possible to use a transport that is as simple as possible (minus crypto for
example) for the testbed, so that it is easier to identify the nature of errors
and effects.

On Thu, 11 May 2000, Lee Daniel Crocker wrote:
> > We need some way to make the two protocols interoperable.
> > Oskar wants to make the text protocol typed, in the sense of my previous
> > use of the word.
> 
> I'm not yet sure what Oskar wants to to, or why, and he hasn't
> really spelled it out clearly, so I can't yet evaluate whether or
> not it's valuable enough to mess things up.
> 
> --
> Lee Daniel Crocker <lee at piclab.com> <http://www.piclab.com/lee/>
> "All inventions or works of authorship original to me, herein and past,
> are placed irrevocably in the public domain, and may be used or modified
> for any purpose, without permission, attribution, or notification."--LDC
> 
> 
> _______________________________________________
> Freenet-dev mailing list
> Freenet-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
-- 

Oskar Sandberg

md98-osa at nada.kth.se

#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to