PSS®X Backing Services¶
The Backing Services factor emphasizes the importance of treating backing services as attached resources.
This means your application should be designed to connect to these services as if they were local components, regardless of whether they run in the same environment or are provided as third-party services.
Why It Matters¶
In modern application architecture, it's common to use external services for essential functionalities like data storage, messaging, and caching. By treating these services as attached resources, you decouple your application from the specifics of the service implementation. This enhances flexibility, scalability, and maintainability.
PSS®X team do not recommend bundling any backing services into the application. Basically the application just needs to know the conection address to the backing services.
How to Implemented¶
Use application configuration and environment variables to abstract the details of backing services. The idea is to make it easy to switch between different service providers or configurations without modifying your code.
Default application configuration for services¶
The PSS®X backing services configuration follows a hierarchical model that organizes settings into logical groupings. This structure is consistent across all supported backing service types, creating a uniform approach to service management. At the root level, each service configuration is nested under a unique service identifier key (your-backing-service
in the example), which allows multiple instances of the same service type to be configured independently.
The four main sections of the configuration are:
-
Configuration section: Contains fundamental connection details including the connection string that specifies the service endpoint.
-
Authentication section: Manages security credentials and authentication methods required to access the service.
-
Ssl section: Controls encryption settings for secure communication with the service.
-
Connection section: Handles operational parameters like timeouts and retry logic that affect reliability.
This standardized approach means that once you understand the configuration pattern for one backing service, you can easily configure additional services regardless of their type. The consistency reduces cognitive load for development teams and simplifies automation scripts for deployment pipelines
{
"your-backing-service": {
"Enabled": true,
"Configuration": {
"ConnectionString": "https://localhost:9200",
....
},
"Authentication": {
"Type": "Basic",
"Username": "your-username",
"Password": "your-password"
....
},
"Ssl": {
"Enabled": true,
"CertificateFingerprint": "your-certificate-fingerprint",
"SkipCertificateValidation": false
....
},
"Connection": {
"TimeoutSeconds": 30,
"MaxRetries": 3,
"EnableDebugMode": false,
"Headers": {
"User-Agent": "your-application-agent/1.0"
}
....
}
}
}