root/tags/1.05/doc/notes.txt

Revision 79, 1.6 kB (checked in by bradfitz, 3 years ago)

clean up tree

Line 
1Chunk has:
2
3  -- raw digest (always)
4
5  -- file    (many)
6  -- offset  (many)
7  -- length  (many)
8
9  -- enc digest (many)
10
11Chunk description in .bracup file:
12  Chunks:  offset;raw_length;stored_length;typed_digest
13
14Proposal to change:
15  Chunks:  offset;raw_length;stored_length;typed_digest(stored);typed_digest(raw);flags
16
17Where flags is comma separate list of \w+.  e.g.  "gz" for gzip compression
18
19----
20
21PositionedChunk  (subclass of RawChunk)
22 - has a:
23     file
24     offset
25     RawChunk
26 - used by:
27     $file->foreach_chunk(sub { my $poschunk = shift; });
28     restoring stuff?
29 - can:
30     write back to disk?
31
32RawChunk
33 - has a:
34     length
35     digest
36     contents
37 - used by:
38     positionedchunk.
39
40ChunkHandle
41 - has a:
42     digest of stored chunk
43 - used by:
44     return value from asking target if it has a raw chunk,
45     or after it stores a raw chunk.
46
47StoredChunk
48
49
50
51
52
53
54------
55
56Document:  purpose of chunks named by their final digest is twofold:
57   1) can verify integrity of storage medium.  is it corrupt?
58   2) hides proof of ownership of contents (when encrypted)
59side-effect:
60   -- when we do compression, we'll be consistent and store it as its
61      compressed digest, even if not encrypted as well.
62
63Maybe we don't need per-chunk meta files:
64   -- can get it all from .brackup (meta)files on the server.
65      (TODO: abstract out parser for multiple users)
66
67---
68
69smart chunk-sizing on certain files w/ metadata and data separate:
70like mp3 files and their id3.  have a smart chunker that's the data
71part vs. the id3 part, so updating id3 later doesn't reupload the
72entire data part.  :-)
73
Note: See TracBrowser for help on using the browser.