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: context free infra #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: context free infra #30

wants to merge 1 commit into from

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented May 29, 2024

Outlining idea of reducing complexity caused by vast context currently used by a service.

@travis
Copy link
Member

travis commented May 30, 2024

Am I correct in thinking that this proposes essentially wrapping dynamo/s3/etc in UCAN invocation APIs?

I'm curious if we could accomplish what you want by just creating normal TypeScript interfaces rather than UCAN Invocations and taking a little more care to hide the dependencies of the TypeScript interfaces from calling code... I can see advantages to having a nice set of UCAN invocation interfaces, but not entirely sure it's worth the complexity of trying to get UCAN Invocations in the middle of APIs that tend to do a lot of streaming (something that I haven't seen UCAN Invocations do well)...

I like the high level idea and I think the core problem is something we should work on, just a little nervous about UCAN Invocations as the right way to define this abstraction!

Copy link
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

I highly agree with Travis. Maybe a more concrete example would be easier to understand, but so far I would actually feel more complexity and design work for a fairly simple thing.

Also worth noting that this is not a w3infra thing, but the upload-api server context, you can see exactly same context needing to be created on the tests there.

Also as @travis pointed out, I would see an opportunity to simplify things at the Typescript definitions level, or perhaps rethink how we construct the context. But having a UCAN protocol just to communicate with these resources seems a lot of overhead for me, both in terms of more code to maintain and more IO operations to do

3. Queues (SQS, Kenisis)
4. Email

We could greatly simplify our infrastructure if we simply exposed APIs given access to the listed primitives in terms of privileged ucan capabilities, that is capabilities that only server authorized entity can invoke. It is worth calling out that all of these primitives provide scoping mechanims object stores have buckets, indexes have tables, queues have groups or named streams.
Copy link
Contributor

Choose a reason for hiding this comment

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

In practise permissions are defined at the AWS IAM level, so while we can have a second layer of auth it does not solve auth all together.

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.

3 participants