#370 closed defect (fixed)
add webapi for quota-usage measurement
Reported by: | warner | Owned by: | warner |
---|---|---|---|
Priority: | major | Milestone: | 1.1.0 |
Component: | code-frontend-web | Version: | 0.9.0 |
Keywords: | Cc: | ||
Launchpad Bug: |
Description
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:
but maybe it ought to be a POST instead, to discourage robots from triggering a bazillion directory fetches.
Change History (3)
comment:1 Changed at 2008-03-27T18:36:28Z by warner
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed at 2008-04-14T17:49:50Z by zooko
The changeset in trac where this was done is now known as 9b3a32d0b38d5d9e.
comment:3 Changed at 2008-05-05T21:08:36Z by zooko
- Milestone changed from 1.0.1 to 1.1.0
Milestone 1.0.1 deleted
Done, in 2c96a32633d50e64, using GET /uri/$URI?t=deep-size