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

Feature: Service configuration #2236

Open
arvindh123 opened this issue May 14, 2024 · 1 comment
Open

Feature: Service configuration #2236

arvindh123 opened this issue May 14, 2024 · 1 comment
Assignees

Comments

@arvindh123
Copy link
Contributor

Is your feature request related to a problem? Please describe.

No

Describe the feature you are requesting, as well as the possible use case(s) for it.

Service configuration helps to configure the service as per user need.

Indicate the importance of this feature to you.

Must-have

Anything else?

No response

@arvindh123
Copy link
Contributor Author

arvindh123 commented May 21, 2024

Approach 1 :

Constraint Provider service is a new service
Entity service will check with constraint provider service before its operation

Example:

  • Entity service will check with constraint provider for limits before creation of entity
  • Messaging service will check with constraint provider for rate limits and message per second before the publish or subscribe of message.

image

In this approach , since constraint provider is a separate service, we can move them to API Gateway in future
image

Approach 2:

Constraint Provider as library , which can wrapped with service layer like logging and metrics .
Constraint Provider will be like a middleware. So when ever service request pass through constraint provider, it will check for constraint provided in configuration file.

Example:

  • Entity service constraint provider middleware will check for limits before creation of entity.
  • Messaging service will check with constraint provider for rate limits and message per second before the publish or subscribe of message.

image

Approach 3:

Constraint Provider implementation in Database as Trigger.
Whenever service starts, it should get configuration from source and create new trigger in database.

Common Spec for all approaches:

A configuration can be stored in

  • TOML file
  • Database
  • External System like Stripe

configuration should load to memory on start.
If there is any change in configuration source data, it should automatically update the configuration memory on the fly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

4 participants