Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: provider + consumer + subscription #746

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Apr 11, 2023

No description provided.

1. Insert into `subscription` table record where
- `provider` is `with`
- `customer` is `nb.customer`
- `order` is `nb.order`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const { cid: order } = CBOR.write({ customer, consumer })
const key = `${order}@${providerDID}`

db.put(key, { provider, customer, order })


2. Insert into `consumer` table records where
- `subscription` is `${nb.order}@${with}`
- `consumer` is `*`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const { with: provider, nb: { consumer, order } } = invocation.capability

db.consumer.put(`${order}@${provider}`, { consumer, order, provider })

travis added a commit to storacha-network/w3infra that referenced this pull request May 23, 2023
…mer tables (#200)

Implement the subscription and consumer tables specified by @Gozala in
storacha-network/w3up#746 and use them to implement
a new version of ProvisionStorage

This builds on a PR review from @Gozala that lays out some of the
queries we will need to support with these new tables:


#194 (review)

This is configured to merge into the main "D1 to Dynamo" development
branch - I'm in favor of going to production with this implementation of
`ProvisionStorage` rather than the one in that branch now.
travis added a commit to storacha-network/w3infra that referenced this pull request Jun 2, 2023
rework the indexes of the subscription and consumer tables per his guidance in storacha-network/w3up#746 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant