add webapi for quota-usage measurement #370

Closed
opened 2008-03-27 18:06:55 +00:00 by warner · 3 comments
warner commented 2008-03-27 18:06:55 +00:00
Owner

We could use a web interface that takes a directory read-cap and traverses it, computing the sum of the sizes of all immutable files reachable from that directory. This number is a rough measurement of the storage used. For our consumer product, this number will be presented in the "you are using X out of Y bytes" box on the user's account page.

This number is awfully rough: directories cost zero bytes, mutable files are ignored, and neither expansion nor encoding/ext3 overhead is taken into account. Also, this number is purely voluntary. The accounting/quota work in #119 is the mandatory side: measuring usage on the server side and correlating it between all servers.

The code for this will be written on top of the manifest-generating code, and will extract the filesize from the verifycaps of each immutable file in the manifest.

I'm thinking that the webapi for this will be:

GET http://uri/$URI?t=total-size

but maybe it ought to be a POST instead, to discourage robots from triggering a bazillion directory fetches.

We could use a web interface that takes a directory read-cap and traverses it, computing the sum of the sizes of all immutable files reachable from that directory. This number is a rough measurement of the storage used. For our consumer product, this number will be presented in the "you are using X out of Y bytes" box on the user's account page. This number is awfully rough: directories cost zero bytes, mutable files are ignored, and neither expansion nor encoding/ext3 overhead is taken into account. Also, this number is purely voluntary. The accounting/quota work in #119 is the mandatory side: measuring usage on the server side and correlating it between all servers. The code for this will be written on top of the manifest-generating code, and will extract the filesize from the verifycaps of each immutable file in the manifest. I'm thinking that the webapi for this will be: GET <http://uri/$URI?t=total-size> but maybe it ought to be a POST instead, to discourage robots from triggering a bazillion directory fetches.
tahoe-lafs added the
code-frontend-web
major
defect
0.9.0
labels 2008-03-27 18:06:55 +00:00
warner commented 2008-03-27 18:36:28 +00:00
Author
Owner

Done, in changeset:2c96a32633d50e64, using GET /uri/$URI?t=deep-size

Done, in changeset:2c96a32633d50e64, using `GET /uri/$URI?t=deep-size`
tahoe-lafs added the
fixed
label 2008-03-27 18:36:28 +00:00
warner closed this issue 2008-03-27 18:36:28 +00:00
zooko commented 2008-04-14 17:49:50 +00:00
Author
Owner

The changeset in trac where this was done is now known as changeset:9b3a32d0b38d5d9e.

The changeset in trac where this was done is now known as changeset:9b3a32d0b38d5d9e.
zooko commented 2008-05-05 21:08:36 +00:00
Author
Owner

Milestone 1.0.1 deleted

Milestone 1.0.1 deleted
tahoe-lafs added this to the 1.1.0 milestone 2008-05-05 21:08:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#370
No description provided.