Changes between Version 6 and Version 7 of AccountingDesign


Ignore:
Timestamp:
2008-07-01T00:25:59Z (16 years ago)
Author:
warner
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AccountingDesign

    v6 v7  
    169169 * other attenuations: TBD (things like until=, SI=, UEBhash=, operation=,
    170170   max-size=)
     171
     172== Lease Tables ==
     173
     174The server will maintain a "lease table", to provide efficient lookup by
     175account. This primarilly supports the "how much is Bob using?" question, and
     176will (in a future version) support the reconcilliation operation.
     177
     178To avoid revising the v1 share file format (which only offers a 4-byte
     179"ownerid" field), the server maintains a second table that maps from these
     1804-byte "pubkeyid" numbers to the full pubkey, and puts an additional column
     181in the lease table to map from pubkey to pubkeyid.
     182
     183 * {{{NODEDIR/accounting/pubkeyids}}}: 32 bytes per pubkeyid, assigned
     184   sequentially. {{{pubkey[4]}}} is the 32 bytes at offset 4*32.
     185 * {{{NODEDIR/accounting/usage/base32(PUBKEY)}}}: one file per pubkey.
     186   Contents are:
     187   * bytes 0-3: pubkeyid
     188   * bytes 4-11: total size
     189   * bytes 12-19: total number of files
     190   * (deferred until v1.3): reconcilliation list (variable length list of SIs)
     191
     192The lease table may be switched to use an intermediate prefix directory
     193later, to make lookup more efficient (some native filesystems get slow when
     194you put thousands or tens-of-thousands of files in a single directory).
     195
     196For ext3, a 300k-entry lease table is likely to use 1.2GB . For something
     197like reiserfs3 that can pack small files, it might take juse 18MB. A SQL
     198representation would probably be fairly compact too.
     199
     200=== Pet Name Table ===
     201
     202The "Usage/Aggregator" component (described below) can display a "pet name"
     203along with each key, to make the results more meaningful ("Bob using 73MB"
     204instead of "pubkey j7sta2uvcr345znqwfwlxitnii is using 73MB"). This is more
     205likely to be used by the friendnet case than the commercial grid (in which
     206this functionality will most likely exist in an external database). The "pet
     207name table" may contain other information about the public keys to which
     208storage has been delegated.
     209
     210 * {{{NODEDIR/?/petnames}}}: one line per pubkey, each line is:
     211   * {{{base32(pubkey): PETNAME\n}}}
     212 * if multiple pubkeys map to the same pet name, their usage will be added
     213   together at display time.