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

proposal: add services-core and react-services packages to encapsulate upload/access service configuration #156

Open
travis opened this issue Dec 10, 2022 · 4 comments

Comments

@travis
Copy link
Member

travis commented Dec 10, 2022

I started trying to write a ServicesContext that can optionally be configured to point w3ui components at staging, production or another branch. I realized this probably needs to be done in its own set of packages (one core, and one for each framework we support).

I'll probably tweak some typing in this process (ie, split the two slightly different things currently called ServiceConfig into UploadServiceConfig and AccessServiceConfig)

@alanshaw just want to make sure you don't have something in process around this - happy to expand a bit more on what I'm thinking if that'd be helpful

@jchris
Copy link
Contributor

jchris commented Dec 12, 2022

Is it possible to hoist this into the w3up-client layer?

@travis
Copy link
Member Author

travis commented Dec 12, 2022

half of it yep! per discussion this morning with @gobengo @alanshaw @hugomrdias @Gozala it sounds like the package that actually encapsulates the service details should be outside this repository entirely so that other services and libraries can all depend on it as well.

we will still need to implement framework specific configuration components (ie, Providers in React, something else in other frameworks) and those should probably still be in their own package, worth leaving this issue open for that

@gobengo
Copy link
Contributor

gobengo commented Jan 4, 2023

IMO we may not really need this.
esp after storacha/w3up#325 (comment)
Insofar as the 'services' package would contain ucanto connection endpoints and ucan aud principal IDs that will respond to w3protocol caps, I think after that issue no one will even need those anymore.

They'll just need to know whether they are trying to send invocations to did:web:web3.storage or did:web:staging.web3.storage, and they can resolve those URIs using http, maybe follow a link or two, to get to a ucanto http endpoint (and the service principal is the did:web they already have).

@travis
Copy link
Member Author

travis commented Jan 4, 2023

oh that will definitely make this simpler - I thiiiink we'll still want a package that provides affordances for easily changing which service the w3ui components are using (ie, lets you override which DID the {Upload|UploadsList|Keyring}Provider tries to send invocations to) but I think it will be pretty basic and possibly not even needed once the proposal you linked is implemented.

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

No branches or pull requests

3 participants