~ubuntu-branches/ubuntu/karmic/tahoe-lafs/karmic

« back to all changes in this revision

Viewing changes to docs/codemap.txt

  • Committer: Bazaar Package Importer
  • Author(s): Zooko O'Whielacronx (Hacker)
  • Date: 2009-09-24 00:00:05 UTC
  • Revision ID: james.westby@ubuntu.com-20090924000005-ixe2n4yngmk49ysz
Tags: upstream-1.5.0
ImportĀ upstreamĀ versionĀ 1.5.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
CODE OVERVIEW
 
3
 
 
4
A brief map to where the code lives in this distribution:
 
5
 
 
6
 src/allmydata: the code for this project. When installed, this provides the
 
7
                'allmydata' package. This includes a few pieces copied from
 
8
                the PyCrypto package, in allmydata/Crypto/* .
 
9
 
 
10
Within src/allmydata/ :
 
11
 
 
12
 interfaces.py: declaration of zope.interface-style Interfaces for most
 
13
                components, also defines Foolscap RemoteInterfaces for
 
14
                all remotely-accessible components
 
15
 
 
16
 node.py: the base Node, which handles connection establishment and
 
17
          application startup
 
18
 
 
19
 client.py, introducer.py:
 
20
   these are two specialized subclasses of Node, for users and the central
 
21
   introducer, respectively. Each works by assembling a collection of services
 
22
   underneath a top-level Node instance.
 
23
 
 
24
 introducer.py: node introduction handlers, client and server
 
25
 
 
26
 storageserver.py: provides storage services to other nodes
 
27
 
 
28
 codec.py: low-level erasure coding, wraps the zfec library
 
29
 
 
30
 encode.py: handles turning data into shares and blocks, computes hash trees
 
31
 
 
32
 upload.py: upload server selection, reading data from upload sources
 
33
 
 
34
 download.py: download server selection, share retrieval, decoding
 
35
 
 
36
 dirnode2.py: implements the distributed directory nodes.
 
37
 
 
38
 webish.py, web/*.xhtml: provides the web frontend, using a Nevow server
 
39
 
 
40
 uri.py: URI packing/parsing routines
 
41
 
 
42
 hashtree.py: Merkle hash tree classes
 
43
 
 
44
 debugshell.py, manhole.py: SSH-connected python shell, for debug purposes
 
45
 
 
46
 util/*.py: misc utility classes
 
47
 
 
48
 test/*.py: unit tests
 
49
 
 
50
 
 
51
Both the client and the central introducer node runs as a tree of
 
52
(twisted.application.service) Service instances. The Foolscap "Tub" is one of
 
53
these. Client nodes have an Uploader service and a Downloader service that
 
54
turn data into URIs and back again.
 
55
 
 
56
The Uploader is given an "upload source" (which could be an open filehandle,
 
57
a filename on local disk, or even a string), and returns a Deferred that
 
58
fires with the URI once the upload is complete. The Downloader is given a URI
 
59
and a "download target" (an open filehandle, filename, or instructions to
 
60
provide a string), and fires a Deferred with a target-specific value when the
 
61
download is complete. The source/target API is intended to make it easy to
 
62
stream the incoming data to a media player or HTTP connection without having
 
63
to consume a lot of memory for buffering.
 
64