https://gitmind.com/app/docs/m1ln6bto

1. Layered (n-tier) Architecture

  • Idea: Divide the system into layers (UI, Business Logic, Database…).
  • Pros: Easy to maintain, each layer has one clear responsibility.
  • Real-world apps:
    • Traditional web apps: UI (React/Angular), Backend (Java/.NET), Database (MySQL).
    • Banking systems with complex logic and security layers.

2. Microservices Architecture

  • Idea: Split the system into many small, independent services.
  • Pros: Easy to scale, upgrade individual parts without affecting the whole system.
  • Real-world apps:
    • Netflix: search, recommendation, streaming are separate services.
    • Amazon: checkout, payment, product catalog as independent services.

3. CQRS (Command Query Responsibility Segregation)

  • Idea: Separate “read” operations and “write” operations.
  • Pros: Faster reads, optimized writes, scalable independently.
  • Real-world apps:
    • E-commerce sites (lots of product reads, fewer order writes).
    • Banking systems with high transaction query demands.

4. Event-Driven Architecture

  • Idea: The system runs based on events. One service produces an event, others react to it.
  • Pros: Great for real-time systems, decoupled communication.
  • Real-world apps:
    • Uber: when a ride is requested → event → nearest driver gets notified.
    • E-commerce: when user pays → event triggers email, inventory update, notification.

5. Orchestration Architecture

  • Idea: A central “orchestrator” manages how services interact.
  • Pros: Easier to handle complex workflows.
  • Real-world apps:
    • Workflow engines (Camunda, Temporal).
    • Airline booking systems (search flight → reserve seat → payment).

6. Space-Based Architecture

  • Idea: Distribute data and processing across multiple “spaces” (nodes).
  • Pros: Handles huge loads, avoids bottlenecks.
  • Real-world apps:
    • Stock trading platforms: process millions of trades concurrently.
    • Large-scale online gaming (MMORPGs).

7. Microkernel Architecture

  • Idea: A small core system + plugins for extra features.
  • Pros: Simple core, easy extensibility.
  • Real-world apps:
    • Eclipse IDE: core IDE + many plugins.
    • OS kernels (microkernel-based Linux versions).

8. DDD (Domain-Driven Design) Architecture

  • Idea: Design around business domain logic, not just technology.
  • Pros: System reflects real-world business rules, easier for devs + business teams to understand.
  • Real-world apps:
    • Banking (domain: accounts, transactions, customers).
    • Insurance (domain: policies, claims, customers).

9. MVP / MVC / MVVM (Presentation Patterns)

  • Idea: Split UI into Model – View – Controller/Presenter/ViewModel.
  • Pros: Cleaner UI code, easier to test.
  • Real-world apps:
    • Android apps use MVP/MVVM for separation of concerns.
    • Web apps with frameworks like Angular (MVVM), ASP.NET MVC.

Everyday Analogies 📝

  • Layered = A building with floors → each floor has a dedicated function.
  • Microservices = Instead of one giant supermarket, you have many specialized shops.
  • CQRS = Separate “asking” (read) and “ordering” (write).
  • Event-Driven = Someone fires a flare, everyone reacts accordingly.
  • Orchestration = A conductor managing an orchestra.
  • Space-Based = Store goods across many warehouses → no single choke point.
  • Microkernel = A small core with extra plugins when needed.
  • DDD = Design around business rules, not just databases.
  • MVP/MVC/MVVM = A neat way to split UI code.