Software Architecture Patterns for data communications and management (+ use case).
- Peer-to-Peer: Devices like smartphones or computers communicate directly with each other without going through a server. Use case: File-sharing apps where users can transfer files directly between devices.
- API Gateway: A management tool that routes requests from clients to several backend services. Use case: An e-commerce website where the gateway directs user requests to the appropriate services like product catalog, user accounts, and payment processing.
- Pub-Sub: Separates the system sending messages from the system receiving them by using a third party (a message broker). Use case: A weather application sending notifications to users about changes in weather conditions without needing to know who the users are.
- Request-Response: A client asks for information and waits for a response from the server. Use case: Browsing a webpage, where the browser requests page data from a server and displays it once received.
- Event Sourcing: Changes to the application state are stored as a sequence of events. Use case: A banking system where each transaction is recorded as an event, allowing the bank to track the history and current state of an account.
- ETL (Extract, Transform, Load): Data is gathered from multiple sources, standardized, and stored in a database. Use case: A business collects sales data from different regions, processes it to find total sales, and then stores it in a central report.
- Batching: Data or tasks are collected over time and processed together at once. Use case: Processing all transactions performed during the day at night when the system load is lower.
- Streaming Processing: Data is processed in real-time as it arrives, rather than storing it first. Use case: Credit card fraud detection where transactions are analyzed as they happen to catch fraudulent activity immediately.
- Orchestration: A coordinator arranges and manages complex processes across multiple systems. Use case: Automating a business process where an order from a website triggers actions in inventory, shipping, and billing systems.
Top 9 Architectural Patterns for Data and Communication Flow
.
.
🔹 Peer-to-Peer
The Peer-to-Peer pattern involves direct communication between two components without the need for a central coordinator.
🔹 API Gateway
An API Gateway acts as a single entry point for all client requests to the backend services of an application.
🔹 Pub-Sub
The Pub-Sub pattern decouples the producers of messages (publishers) from the consumers of messages (subscribers) through a message broker.
🔹 Request-Response
This is one of the most fundamental integration patterns, where a client sends a request to a server and waits for a response.
🔹 Event Sourcing
Event Sourcing involves storing the state changes of an application as a sequence of events.
🔹 ETL
ETL is a data integration pattern used to gather data from multiple sources, transform it into a structured format, and load it into a destination database.
🔹 Batching
Batching involves accumulating data over a period or until a certain threshold is met before processing it as a single group.
🔹 Streaming Processing
Streaming Processing allows for the continuous ingestion, processing, and analysis of data streams in real-time.
🔹 Orchestration
Orchestration involves a central coordinator (an orchestrator) managing the interactions between distributed components or services to achieve a workflow or business process.
--
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://bit.ly/3KCnWXq
#systemdesign #coding #interviewtips
.
-