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

docs(): durable providers feature #2362

Merged
merged 3 commits into from
Jun 22, 2022
Merged

Conversation

kamilmysliwiec
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Docs
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@kamilmysliwiec kamilmysliwiec requested a review from jmcdo29 June 21, 2022 09:24
@kamilmysliwiec
Copy link
Member Author

kamilmysliwiec commented Jun 21, 2022

@jmcdo29 if you can check grammar etc that would be super helpful 🙌
If you had some time to review these PRs:

Copy link
Contributor

@Tony133 Tony133 left a comment

Choose a reason for hiding this comment

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

I think it is well written 👍 . I have only added two small fixes

content/fundamentals/provider-scopes.md Show resolved Hide resolved

Having a common provider that most providers depend on (think of a database connection, or a logger service), automatically converts all those providers to request-scoped providers as well. This can pose a challenge for **multi-tenant applications**, especially for those that have a central request-scoped "data source" provider that grabs headers/token from the request object and based on its values, retrieves the corresponding database connection/schema (specific to the tenant).

For instance, let's say you have an application alternately used by 10 different customers. Each customer has its **own dedicated data source**, and you want to make sure customer A will never be able to reach customer's B database. For this, you could declare a request-scoped "data source" provider that - based on the request object - determines what's the "current customer" and retrieves its corresponding database. With this approach, you can turn your application into a multi-tenant application in just a few minutes. The major downside is - since most likely a large chunk of your application' components rely on the "data source" provider, they will implicitly become "request-scoped", and therefore certainly impacting your app performance.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
For instance, let's say you have an application alternately used by 10 different customers. Each customer has its **own dedicated data source**, and you want to make sure customer A will never be able to reach customer's B database. For this, you could declare a request-scoped "data source" provider that - based on the request object - determines what's the "current customer" and retrieves its corresponding database. With this approach, you can turn your application into a multi-tenant application in just a few minutes. The major downside is - since most likely a large chunk of your application' components rely on the "data source" provider, they will implicitly become "request-scoped", and therefore certainly impacting your app performance.
For instance, let's say you have an application alternately used by 10 different customers. Each customer has its **own dedicated data source**, and you want to make sure customer A will never be able to reach customer's B database. For this, you could declare a request-scoped "data source" provider that - based on the request object - determines what's the "current customer" and retrieves its corresponding database. With this approach, you can turn your application into a multi-tenant application in just a few minutes. The major downside is - since most likely a large chunk of your application components rely on the "data source" provider, they will implicitly become "request-scoped", and therefore certainly impacting your app performance.

Copy link
Member

@jmcdo29 jmcdo29 left a comment

Choose a reason for hiding this comment

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

This is a sweet new feature! Great to see something like this! Grammar in it looks good too

@kamilmysliwiec kamilmysliwiec merged commit 19004e2 into 9.0.0 Jun 22, 2022
@delete-merged-branch delete-merged-branch bot deleted the docs/durable-providers branch June 22, 2022 09:29
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