Try   HackMD

@web3-storage/access-api data storage

Purpose of this Document

access-api invocation handlers

not exhaustive. these are the recent ones that interact with data stores.

access-api operations that interact with data stores

access-api data stores

Cloudflare D1 (sqlite-ish)

Other tables, not used by access/* or provider/*

  • accounts - not needed (at all afaict)
  • spaces
    • may not be needed - depends on space/info et al expectations
    • spaces registered by provider/add only return space/info { did }
      • This doesn't require spaces table
    • spaces registered by voucher/ would returns essentially this whole row.

Cloudflare R2 (s3-ish)

opportunities to use ucan-stream

  • reduce access/delegate invocations into an index that can serve access/claim

    • alternative to access/claim calling DbDelegationsStorageWithR2#find
    • write to
      • if dynamodb, should probably account for expiry sort key at same time (via @mikeal)
      • May not need dynamodb. We could group by audience and write to s3
  • reduce provider/add receipts into an index that can answer whether a given space has at least one storage provider of a certain provider did