Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denismurphy/common-architectural-patterns
Common Architectural Patterns
https://github.com/denismurphy/common-architectural-patterns
api-gateway bounded-context-architecture eda event-driven-architecture hexagonal-architecture horizontal-slicing-architecture resource-oriented-architecture roa service-oriented-architecture soa task-based-architectures vertical-slice-architecture vertical-slicing-architecture
Last synced: 3 days ago
JSON representation
Common Architectural Patterns
- Host: GitHub
- URL: https://github.com/denismurphy/common-architectural-patterns
- Owner: denismurphy
- License: mit
- Created: 2023-01-31T21:31:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-09T09:01:21.000Z (2 months ago)
- Last Synced: 2024-09-09T10:48:50.411Z (2 months ago)
- Topics: api-gateway, bounded-context-architecture, eda, event-driven-architecture, hexagonal-architecture, horizontal-slicing-architecture, resource-oriented-architecture, roa, service-oriented-architecture, soa, task-based-architectures, vertical-slice-architecture, vertical-slicing-architecture
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🏗️ Common Architectural Patterns
There are various architectural patterns that can be used to design and implement software systems, each with its own strengths and weaknesses.
In this guide, we'll explore some of the common architectural patterns:
## 🔗 Service-Oriented Architecture (SOA)
SOA emphasizes loose coupling and high cohesion through service abstraction. Key considerations include:
- Service granularity optimization
- Implementation of Enterprise Service Bus (ESB) for complex orchestrations
- Handling of distributed transactions and eventual consistency
- Strategies for service discovery and versioning## 🎭 Event-Driven Architecture (EDA)
EDA excels in scenarios requiring real-time processing and complex event correlation. Advanced topics include:
- Implementation of Complex Event Processing (CEP) engines
- Strategies for event sourcing and event store design
- Handling of event-driven sagas for distributed transactions
- Techniques for maintaining event schema evolution## 🚪 API Gateway Pattern
Beyond basic request routing, modern API Gateways incorporate:
- Advanced traffic management (throttling, circuit breaking)
- API composition for backend-for-frontend (BFF) patterns
- OAuth2 and OpenID Connect integration for robust security
- GraphQL federation for distributed graph resolution## 📦 Resource-Oriented Architecture (ROA)
ROA, often implemented via RESTful services, requires careful consideration of:
- Hypermedia As The Engine Of Application State (HATEOAS) implementation
- Optimal resource granularity and relationship modeling
- Caching strategies and ETags for improved performance
- Handling of bulk operations and batch processing## 🔪 Vertical Slicing Architecture
This pattern, popular in Domain-Driven Design (DDD), involves:
- Strategies for identifying and defining bounded contexts
- Techniques for handling cross-cutting concerns
- Implementation of anti-corruption layers between slices
- Approaches to data consistency across vertical slices## 🥪 Horizontal Slicing Architecture
While less common in microservices, this pattern is still relevant for certain domains:
- Strategies for data partitioning and sharding
- Handling of cross-layer dependencies and communication
- Techniques for maintaining data consistency across layers
- Approaches to scaling individual layers independently## ✅ Task-Based Microservices Architecture
This pattern aligns closely with Command Query Responsibility Segregation (CQRS):
- Implementing event sourcing for task history and auditing
- Strategies for task orchestration and choreography
- Handling of task idempotency and exactly-once processing
- Approaches to task prioritization and scheduling## 🧩 Bounded Context Architecture
A cornerstone of strategic DDD, this pattern involves:
- Techniques for context mapping and inter-context communication
- Implementation of shared kernels and anti-corruption layers
- Strategies for handling ubiquitous language across contexts
- Approaches to evolving bounded contexts over time## 🔷 Hexagonal Architecture
Also known as Ports and Adapters, this pattern focuses on:
- Strategies for defining and implementing ports and adapters
- Techniques for dependency inversion and inversion of control
- Approaches to testing core domain logic in isolation
- Handling of cross-cutting concerns in a hexagonal structure## 🎓 Conclusion
The selection and implementation of architectural patterns require deep understanding of system requirements, scalability needs, and long-term maintainability goals. Modern systems often employ a hybrid approach, combining elements from multiple patterns to address complex requirements. Continuous evaluation and refactoring of the chosen architecture are crucial for long-term success.