Dependency encapsulation #4962
Unanswered
robmccrady
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I really really like Aspire for the improved developer experience, but I have a question about encapsulating specific service dependencies.
Let’s say I’m composing a system of subsystems. Each could exist as a standalone service, but I’m using Aspire to take advantage of the centralized observability and deployment capabilities.
I have a service that uses a Database, another service that wraps access to Azure OpenAI, and my UI application. I’ve designed an API BFF that is to be referenced by the UI, that in turn routes requests to those DB and AI services as needed for the requested Task.
If I define the OpenAI connector and the DBContext in the AppHost and provide those resources to their Access Services, I know I get the Aspire goodies, but I need to keep those resource details private to the Access services.
I don’t want anyone to be able to just include those capabilities on other services arbitrarily. Is there a way to encapsulate resources behind a Prescribed Access component?
Beta Was this translation helpful? Give feedback.
All reactions