> But there is no reason to have different tables (yes I have read your later
> posts, and you make no sense), and it hurts the efficiency of the routing
> greatly.

It doesn't have anything to do with routing at all. Routing is identical
for all key types. Storing them in different tables is merely storage and
lookup. In no way does it hurt the efficiency of routing.

I think the difference is where the code branches. Having the key type in
the key means that there is a single module/class for all key types and
the code branches inside the pReceived() method for different key types.

I think that differences in behaviour should be, as much as possible,
defined by the message type instead of the fields inside the message. So
there should be a separate module/class for each key type. This might seem
like more and redundant code, but with proper inheritance it won't be.

So, instead of upgrading your Request objects when new key types
are created, you could leave the current objects as they are and install
new handlers for the new key types. Then you can easily determine what key
types you want to allow support.



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

Reply via email to