It has been suggested on several occasions that // is ugly. Unix-derived
tools usually expect that // means /.

So, what if we use / ?:

Archive manifests and metadata manifests are required to be consistent.
Meaning no two files have the same name, and no directory has the same
name as any file. This is checked when we fetch them the first time.

We break a URL up into a client-key (a decodable CHK or SSK) and a
series of meta-strings:

SSK at .../News/images/war/protest.png

Client-key is SSK at .../News
Meta-strings: images, war, protest.png

Then:

The first time:

Fetch the client-key.
The fetched data says "fetch this splitfile, it is a ZIP manifest".
We fetch the splitfile.
We unpack the ZIP into cache.
We read the unpacked metadata file (".metadata").
We search for a cached manifest or file called "images".
We search for a cached manifest or file called "images/war".
We search for a cached manifest or file called "images/war/protest.png".
We find it, and return it to the user.


Much later:

Fetch the client-key from cache.
The fetched data says "fetch this splitfile, it is a ZIP manifest".
We look it up in the archive cache, and find the metadata is cached.
We read the metadata.
We search for a cached manifest or file called "images".
We search for a cached manifest or file called "images/war".
We search for a cached manifest or file called "images/war/protest.png".
It isn't in the cache.
We fetch the splitfile.
We do the search again, find the file, and return it to the user.
-- 
Matthew J Toseland - toad at amphibian.dyndns.org
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20051026/5dc283d1/attachment.pgp>

Reply via email to