> 
> 1) A key is a MSK if: (a) its keytype is explicitly set to MSK, i.e.,
> "freenet:MSK@"; or (b) it is an implied KSK, and there is a "//", i.e,
> "freenet:pigdogjournal//bad.jpeg", but *not* "freenet:KSK@blah//blah".
> 
> 2) If there is no filename specified, i.e., "freenet:pigdogjournal//", it
> is assumed to be "index.html".
> 
> 3) The mapkey may be any Freenet keytype except MSK.

Sounds nice. Still wary about 1, but I see no other way.

> I don't think my (derivative of Brandon's) MSK proposal can be implemented
> like the other keytypes, because it is very different. It's not an
> extension of any existing keytype, and it's not a full-fledged keytype in
> itself. Furthermore, the efficiency of MSKs relies on caching a hashtable
> of filename=key pairs, and thus it is better implemented as I have, with a
> MapHandler you instantiate that manages a cache of any number of
> MapFiles. You feed it a URI, i.e., "freenet:pigdogjournal//", and it sends
> back the URI of that file in the map. If the map is not already cached, it
> requests it and caches it.

I consider it a meta-key that is in a layer on top of other keys.

> To add support for MSKs to RequestClient, the obvious place to add it is
> ClientUtil.getKey, but I would have to overload it with another version
> that takes a MapHandler as an argument, and that's ugly and inefficient,
> because the key might not even be a MSK. So I could add a isMSK method to
> ClientUtil that takes the key string and checks. I'd do it in fillBuckets
> before the ClientKey is initialized, and if it returns true, I'd
> instantiate a MapHandler and run the key string through it first.

ClientUtil.getKey is the right place, I think, but the place for the
MapHandler is in MapHandler.instance (static variable). You only need one
map handler for the whole JVM even if you have multiple things running and
you don't need to mess with all that other crazy stuff.



_______________________________________________
Freenet-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to