add webapi for quota-usage measurement #370

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

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.
warner added the
code-frontend-web
major
defect
0.9.0
labels 2008-03-27 18:06:55 +00:00
warner self-assigned this 2008-03-27 18:06:55 +00:00
Author

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

Done, in changeset:2c96a32633d50e64, using `GET /uri/$URI?t=deep-size`
warner added the
fixed
label 2008-03-27 18:36:28 +00:00

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.

Milestone 1.0.1 deleted

Milestone 1.0.1 deleted
zooko 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 Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

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