4
A brief map to where the code lives in this distribution:
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/* .
10
Within src/allmydata/ :
12
interfaces.py: declaration of zope.interface-style Interfaces for most
13
components, also defines Foolscap RemoteInterfaces for
14
all remotely-accessible components
16
node.py: the base Node, which handles connection establishment and
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.
24
introducer.py: node introduction handlers, client and server
26
storageserver.py: provides storage services to other nodes
28
codec.py: low-level erasure coding, wraps the zfec library
30
encode.py: handles turning data into shares and blocks, computes hash trees
32
upload.py: upload server selection, reading data from upload sources
34
download.py: download server selection, share retrieval, decoding
36
dirnode2.py: implements the distributed directory nodes.
38
webish.py, web/*.xhtml: provides the web frontend, using a Nevow server
40
uri.py: URI packing/parsing routines
42
hashtree.py: Merkle hash tree classes
44
debugshell.py, manhole.py: SSH-connected python shell, for debug purposes
46
util/*.py: misc utility classes
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.
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.