Commit Graph

151 Commits

Author SHA1 Message Date
Brian Warner
2ef70ab814 mutable.py: split replace() into update() and overwrite(). Addresses #328. 2008-03-12 18:00:43 -07:00
Brian Warner
c21d30c320 client: publish a 'stub client' announcement to the introducer, to provide version/nickname information for each client 2008-03-11 19:20:10 -07:00
Brian Warner
10d3ea5045 increase remote-interface size limits to 16EiB by not casually using 'int' as a constraint 2008-03-11 10:50:31 -07:00
Brian Warner
ca1a1762e2 web: status: add 'started' timestamps to all operations 2008-03-04 18:50:44 -07:00
Brian Warner
68fbd89e66 webish: add primitive publish/retrieve status pages 2008-03-04 01:07:44 -07:00
Brian Warner
18eb00d136 webish: download-results: add per-server response times 2008-03-03 20:53:45 -07:00
Brian Warner
886ef22335 webish: download-results: add server_problems 2008-03-03 20:30:35 -07:00
Brian Warner
def910c391 webish download results: add servermap, decrypt time 2008-03-03 20:09:32 -07:00
Brian Warner
2b49605c51 webish: add 'download results', with some basic timing information 2008-03-03 19:19:21 -07:00
Brian Warner
c8e24f0904 webish: make upload timings visible on the recent uploads/downloads status page 2008-03-03 14:48:52 -07:00
Brian Warner
1a7651ce82 retain 10 most recent upload/download status objects, show them in /status . Prep for showing individual status objects 2008-02-29 22:19:03 -07:00
Zooko O'Whielacronx
99f006c584 wapi: add POST /uri/$DIRECTORY?t=set_children
Unfinished bits: doc in webapi.txt, test handling of badly formed JSON, return reasonable HTTP response, examination of the effect of this patch on code coverage -- but I'm committing it anyway because MikeB can use it and I'm being called to dinner...
2008-02-29 18:40:27 -07:00
Brian Warner
301dd3d489 webish status: distinguish active uploads/downloads from recent ones 2008-02-26 15:35:28 -07:00
Brian Warner
7927495cbe unicode handling: declare dirnodes to contain unicode child names, update webish to match 2008-02-14 15:45:56 -07:00
Brian Warner
e6af3b845c make current upload/download status objects available from the client 2008-02-12 15:39:45 -07:00
Brian Warner
94097affc3 add download-status objects, to track download progress 2008-02-12 15:38:39 -07:00
Brian Warner
d0ce8694c1 add upload-status objects, to track upload progress 2008-02-12 15:36:05 -07:00
Brian Warner
622c477e31 dirnode: add ctime/mtime to metadata, update metadata-modifying APIs. Needs more testing and sanity checking. 2008-02-08 18:43:47 -07:00
Brian Warner
81c5ceae16 upload: rework passing of default encoding parameters: move more responsibility into BaseUploadable 2008-02-06 18:39:03 -07:00
Brian Warner
6cd32c2f5c interfaces: remove spurious line that counted against the figleaf coverage 2008-02-06 16:41:26 -07:00
Brian Warner
124fb5ecdf add upload-results timing info for helper uploads. This changes the Helper protocol, and introduces a compatibility break 2008-02-06 01:52:25 -07:00
Brian Warner
66f33ee504 upload: return an UploadResults instance (with .uri) instead of just a URI 2008-02-05 21:01:38 -07:00
Brian Warner
d146ef7e09 webish: add extra introducer data (version, timestamps) to Welcome page 2008-02-05 17:32:27 -07:00
Brian Warner
daecca6589 big introducer refactoring: separate publish+subscribe. Addresses #271. 2008-02-05 13:05:13 -07:00
Brian Warner
a01f9ce9cc introducer: allow nodes to refrain from publishing themselves, by passing furl=None. This would be useful for clients who do not run storage servers. 2008-02-01 19:48:38 -07:00
robk-tahoe
e5487bbe21 stats: added IStatsProducer interface, fixed stats provider startup
this adds an interface, IStatsProducer, defining the get_stats() method
which the stats provider calls upon and registered producer, and made the
register_producer() method check that interface is implemented.

also refine the startup logic, so that the stats provider doesn't try and
connect out to the stats gatherer until after the node declares the tub
'ready'.  this is to address an issue whereby providers would attach to
the gatherer without providing a valid furl, and hence the gatherer would
be unable to determine the tubid of the connected client, leading to lost
samples.
2008-01-31 21:10:15 -07:00
robk-tahoe
7b9f3207d0 stats: add a simple stats gathering system
We have a desire to collect runtime statistics from multiple nodes primarily
for server monitoring purposes.   This implements a simple implementation of
such a system, as a skeleton to build more sophistication upon.

Each client now looks for a 'stats_gatherer.furl' config file.  If it has
been configured to use a stats gatherer, then it instantiates internally
a StatsProvider.  This is a central place for code which wishes to offer
stats up for monitoring to report them to, either by calling 
stats_provider.count('stat.name', value) to increment a counter, or by
registering a class as a stats producer with sp.register_producer(obj).

The StatsProvider connects to the StatsGatherer server and provides its
provider upon startup.  The StatsGatherer is then responsible for polling
the attached providers periodically to retrieve the data provided.
The provider queries each registered producer when the gatherer queries
the provider.  Both the internal 'counters' and the queried 'stats' are
then reported to the gatherer.

This provides a simple gatherer app, (c.f. make stats-gatherer-run)
which prints its furl and listens for incoming connections.  Once a
minute, the gatherer polls all connected providers, and writes the
retrieved data into a pickle file.

Also included is a munin plugin which knows how to read the gatherer's
stats.pickle and output data munin can interpret.  this plugin, 
tahoe-stats.py can be symlinked as multiple different names within
munin's 'plugins' directory, and inspects argv to determine which
data to display, doing a lookup in a table within that file.
It looks in the environment for 'statsfile' to determine the path to
the gatherer's stats.pickle.  An example plugins-conf.d file is
provided.
2008-01-30 20:11:07 -07:00
Brian Warner
22071c00e0 upload: oops, fix breakage after removing upload_file/upload_data/etc 2008-01-30 19:41:43 -07:00
Brian Warner
492cb92dc8 speedcheck: track SSK creation time separately 2008-01-29 20:44:32 -07:00
Brian Warner
46fe024612 offloaded uploader: don't use a huge amount of memory when skipping over previously-uploaded data 2008-01-24 17:25:33 -07:00
Brian Warner
e9307d3fda offloaded: close the local filehandle after encoding is done, otherwise windows fails 2008-01-17 01:52:33 -07:00
Brian Warner
51321944f0 megapatch: overhaul encoding_parameters handling: now it comes from the Uploadable, or the Client. Removed options= too. Also move helper towards resumability. 2008-01-16 03:03:35 -07:00
Brian Warner
a6ca98ac53 upload: add Encoder.abort(), to abandon the upload in progress. Add some debug hooks to enable unit tests. 2008-01-14 21:22:55 -07:00
Brian Warner
7ac2b94aba remove wait_for_numpeers and the when_enough_peers call in mutable.Publish 2008-01-14 14:55:59 -07:00
Brian Warner
964edadf44 offloaded: add a system test, make it pass. files are now being uploaded through the helper. 2008-01-11 05:42:55 -07:00
Brian Warner
6ac01fde4c offloaded: more test coverage on client side, change interfaces a bit 2008-01-11 04:53:37 -07:00
Brian Warner
e825406fc2 offloaded: move interfaces to interfaces.py, start implementing backend 2008-01-09 21:25:47 -07:00
Brian Warner
ea24864544 offloaded: more code, fix pyflakes problems, change IEncryptedUploader a bit 2008-01-09 17:58:47 -07:00
Brian Warner
9a8f68c41f dirnode: add set_uris() and set_nodes() (plural), to set multiple children at once. Use it to set up a new webapi test for issue #237. 2007-12-18 23:30:02 -07:00
Zooko O'Whielacronx
a5a54ac5ca remove the DirnodeURI foolscap schema and mv those regexes into uri.py
We currently do not pass dirnode uris over foolscap.
2007-12-18 17:44:24 -07:00
Zooko O'Whielacronx
9848d2043d make more precise regexp for WriteableSSKFileURI and DirnodeURI and use it in unit tests
Also allow an optional leading "http://127.0.0.1:8123/uri/".
Also fix a few unit tests to generate bogus Dirnode URIs of the modern form instead of the former form.
2007-12-18 13:15:08 -07:00
Brian Warner
f6b2072af1 check-speed: test SSK upload/download speed too. SDMF imposes a limit on the file sizes, no 10MB or 100MB test 2007-12-14 02:05:31 -07:00
Brian Warner
0dc84963f1 the wait_for_numpeers= argument to client.upload() is optional: make both the code and the Interface reflect this 2007-12-06 18:36:58 -07:00
Brian Warner
f190382d5e refactor web tests, and interfaces.IFileNode 2007-12-04 23:01:37 -07:00
Brian Warner
0f5ef5184d test_dirnode.py: obtain full coverage of dirnode.py 2007-12-04 14:32:04 -07:00
Zooko O'Whielacronx
59d6c3c822 decentralized directories: integration and testing
* use new decentralized directories everywhere instead of old centralized directories
 * provide UI to them through the web server
 * provide UI to them through the CLI
 * update unit tests to simulate decentralized mutable directories in order to test other components that rely on them
 * remove the notion of a "vdrive server" and a client thereof
 * remove the notion of a "public vdrive", which was a directory that was centrally published/subscribed automatically by the tahoe node (you can accomplish this manually by making a directory and posting the URL to it on your web site, for example)
 * add a notion of "wait_for_numpeers" when you need to publish data to peers, which is how many peers should be attached before you start.  The default is 1.
 * add __repr__ for filesystem nodes (note: these reprs contain a few bits of the secret key!)
 * fix a few bugs where we used to equate "mutable" with "not read-only".  Nowadays all directories are mutable, but some might be read-only (to you).
 * fix a few bugs where code wasn't aware of the new general-purpose metadata dict the comes with each filesystem edge
 * sundry fixes to unit tests to adjust to the new directories, e.g. don't assume that every share on disk belongs to a chk file.
2007-12-03 14:52:42 -07:00
Zooko O'Whielacronx
ae727a550a IMutableFileNode is a subtype of IFileNode
I'm not 100% sure that this is correct, but it looks reasonable, it passes unit
tests (although note that unit tests are currently not covering the new mutable
files very well), and it makes the "view JSON" link on a directory work instead
of raising an assertion error.
2007-11-10 16:37:18 -07:00
Brian Warner
be94960680 mutable: test roundtrip, make it work 2007-11-07 14:19:01 -07:00
Brian Warner
7e43c7b5f9 mutable: fix use of storage API 2007-11-06 18:53:34 -07:00
Brian Warner
c4f7412f1c stabilize on 20-byte nodeids everywhere, printed with foolscap's base32 2007-11-06 18:49:59 -07:00