name: architecture-paradigm-service-based
description: |
Triggers: service-based, architecture, based, modular, service
Coarse-grained service architecture for deployment independence without microservices complexity.
Triggers: service-based, SOA, coarse-grained services, domain services
Use when: teams need deployment independence without microservices complexity
DO NOT use when: fine-grained scaling needed - use microservices.
version: 1.3.7
category: architectural-pattern
tags: [architecture, service-based, soa, modular, shared-database]
dependencies: []
tools: [api-gateway, service-registry, schema-management]
usage_patterns:
- paradigm-implementation
- monolith-refactoring
- deployment-independence
complexity: medium
estimated_tokens: 700
The Service-Based Architecture Paradigm
When to Employ This Paradigm
- When teams require a degree of deployment independence but are not yet prepared for the complexity of managing numerous microservices.
- When shared databases or large-scale systems (like ERPs) make full service autonomy unrealistic.
- When establishing clear service contracts for partner teams or external consumers.
Adoption Steps
- Group Capabilities: Bundle related business functions into a small set of well-defined services, each with a designated owner.
- Define Service Contracts: Publish formal specifications using standards like OpenAPI or AsyncAPI, including Service Level Agreements (SLAs) and a clear versioning strategy.
- Control Database Schemas: Even when services share a database, assign explicit ownership for each schema or table. Gate all breaking changes through a formal review process.
- Establish Service Mediation: Use a service registry or an API gateway to handle routing, authentication, and observability.
- Plan for Evolution: Identify architectural "hotspots" that are likely candidates for being split into more granular services in the future.
Key Deliverables
- An Architecture Decision Record (ADR) that outlines service boundaries, data ownership rules, and coordination mechanisms.
- A suite of contract tests and consumer-driven contract tests for each service to validate stability.
- Runbooks that describe deployment procedures, rollback plans, and service dependencies.
Risks & Mitigations
- Coupling Through a Shared Database:
- Mitigation: Changes to a shared database can have cascading effects across services. Mitigate this by using database views, replication, or a formal schema deprecation schedule to manage change.
- Architectural Degradation:
- Mitigation: Without strong governance, this architecture can degrade into a "distributed monolith"—a monolith with the added complexity of network hops. Track coupling metrics closely and enforce strict ownership of services and data to prevent this.
Troubleshooting
Common Issues
Command not found
Ensure all dependencies are installed and in PATH
Permission errors
Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag
1---2name: architecture-paradigm-service-based3description: - When teams require a degree of deployment independence but are not yet prepared for the complexity of managing numerous microservices.4---5
6---
7name: architecture-paradigm-service-based
8description: |
9
10Triggers: service-based, architecture, based, modular, service
11 Coarse-grained service architecture for deployment independence without microservices complexity.
12
13 Triggers: service-based, SOA, coarse-grained services, domain services
14 Use when: teams need deployment independence without microservices complexity
15 DO NOT use when: fine-grained scaling needed - use microservices.
16version: 1.3.7
17category: architectural-pattern
18tags: [architecture, service-based, soa, modular, shared-database]
19dependencies: []
20tools: [api-gateway, service-registry, schema-management]
21usage_patterns:
22 - paradigm-implementation
23 - monolith-refactoring
24 - deployment-independence
25complexity: medium
26estimated_tokens: 700
27---
28
29# The Service-Based Architecture Paradigm
30
31## When to Employ This Paradigm
32- When teams require a degree of deployment independence but are not yet prepared for the complexity of managing numerous microservices.
33- When shared databases or large-scale systems (like ERPs) make full service autonomy unrealistic.
34- When establishing clear service contracts for partner teams or external consumers.
35
36## Adoption Steps
371. **Group Capabilities**: Bundle related business functions into a small set of well-defined services, each with a designated owner.
382. **Define Service Contracts**: Publish formal specifications using standards like OpenAPI or AsyncAPI, including Service Level Agreements (SLAs) and a clear versioning strategy.
393. **Control Database Schemas**: Even when services share a database, assign explicit ownership for each schema or table. Gate all breaking changes through a formal review process.
404. **Establish Service Mediation**: Use a service registry or an API gateway to handle routing, authentication, and observability.
415. **Plan for Evolution**: Identify architectural "hotspots" that are likely candidates for being split into more granular services in the future.
42
43## Key Deliverables
44- An Architecture Decision Record (ADR) that outlines service boundaries, data ownership rules, and coordination mechanisms.
45- A suite of contract tests and consumer-driven contract tests for each service to validate stability.
46- Runbooks that describe deployment procedures, rollback plans, and service dependencies.
47
48## Risks & Mitigations
49- **Coupling Through a Shared Database**:
50 - **Mitigation**: Changes to a shared database can have cascading effects across services. Mitigate this by using database views, replication, or a formal schema deprecation schedule to manage change.
51- **Architectural Degradation**:
52 - **Mitigation**: Without strong governance, this architecture can degrade into a "distributed monolith"—a monolith with the added complexity of network hops. Track coupling metrics closely and enforce strict ownership of services and data to prevent this.
53## Troubleshooting
54
55### Common Issues
56
57**Command not found**
58Ensure all dependencies are installed and in PATH
59
60**Permission errors**
61Check file permissions and run with appropriate privileges
62
63**Unexpected behavior**
64Enable verbose logging with `--verbose` flag