home / skills / athola / claude-night-market / architecture-paradigm-service-based
/plugins/archetypes/skills/architecture-paradigm-service-based
This skill helps teams design scalable service-based architectures with deployment independence while avoiding microservices complexity.
npx playbooks add skill athola/claude-night-market --skill architecture-paradigm-service-basedReview the files below or copy the command above to add this skill to your agents.
---
name: architecture-paradigm-service-based
description: 'Coarse-grained service architecture for deployment independence without
microservices complexity.
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.'
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 Use
- Multi-team organizations with domain-aligned services
- Systems requiring independent deployment of components
## When NOT To Use
- Single-team projects small enough for a monolith
- Latency-sensitive systems where inter-service calls are prohibitive
## 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
1. **Group Capabilities**: Bundle related business functions into a small set of well-defined services, each with a designated owner.
2. **Define Service Contracts**: Publish formal specifications using standards like OpenAPI or AsyncAPI, including Service Level Agreements (SLAs) and a clear versioning strategy.
3. **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.
4. **Establish Service Mediation**: Use a service registry or an API gateway to handle routing, authentication, and observability.
5. **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
This skill describes a service-based architecture paradigm that groups domain-aligned capabilities into coarse-grained services to provide deployment independence without microservices complexity. It guides teams on defining service boundaries, ownership, contracts, and operational runbooks. The intent is to enable independent deployments while avoiding the overhead of many small services.
Group related business functions into a small set of well-defined services, each owned by a team. Publish formal service contracts (OpenAPI/AsyncAPI), enforce schema ownership when databases are shared, and use an API gateway or service registry for routing, authentication, and observability. Provide ADRs, contract tests, and runbooks to manage evolution and operational behavior.
When should I not use this paradigm?
Avoid it when you need fine-grained, per-endpoint scaling or ultra-low latency between components—use microservices in those cases.
How do we avoid turning this into a distributed monolith?
Enforce strict ownership, track coupling metrics, require ADRs for boundary changes, and use contract tests and a formal schema deprecation schedule.