absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.42k stars 665 forks source link

Feature: Service configuration #2236

Open arvindh123 opened 1 month ago

arvindh123 commented 1 month ago

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 commented 1 month ago

Approach 1 :

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

Example:

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:

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

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.