Logo Microservices Architecture

Microservices Architecture

Cộng đồng
Omar-Obando
microservices-architecture

Use when designing and implementing microservices architectures, domain-driven design, service boundaries, event-driven communication, and distributed systems patterns. Includes CQRS, sagas, service discovery, and API gateway patterns. Based on Certified Microservices Architect (CMA) certification and microservices best practices.

Tổng quan

Nhà phát hànhOmar-Obando
Kho mãqwen-orchestrator
Tên kỹ năngmicroservices-architecture
Sao
53
Bản fork
13
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được Omar-Obando công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Microservices Architecture trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/microservices-architecture
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Omar-Obando/qwen-orchestrator.git /tmp/qwen-orchestrator
mkdir -p .claude/skills
cp -r /tmp/qwen-orchestrator/skills/microservices-architecture .claude/skills/microservices-architecture
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Microservices Architecture trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Microservices Architecture ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Microservices Architecture với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Microservices Architecture Skill — Backend Developer

Overview

This skill provides comprehensive guidance for designing and implementing microservices architectures. It covers domain-driven design, service boundaries, event-driven communication, CQRS, sagas, service discovery, and distributed systems patterns following CMA certification standards.

When to Use

Use this skill when:

  • Designing microservices architecture
  • Defining service boundaries and domains
  • Implementing domain-driven design patterns
  • Creating event-driven communication systems
  • Implementing CQRS pattern
  • Designing sagas for distributed transactions
  • Setting up service discovery
  • Implementing API gateway patterns
  • Designing distributed caching strategies
  • Implementing circuit breakers
  • Setting up distributed tracing
  • Designing service mesh architectures
  • Implementing event sourcing patterns
  • Creating resilient distributed systems
  • Setting up container orchestration (Kubernetes)
  • Implementing API versioning strategies
  • Designing database per service pattern
  • Implementing sidecar patterns
  • Setting up service mesh (Istio, Linkerd)
  • Designing observability for microservices
  • Implementing distributed logging
  • Setting up distributed tracing (Jaeger, Zipkin)
  • Designing fault tolerance patterns

Do NOT use this skill when:

  • Writing application business logic (use domain-driven skill)
  • Designing database schemas (use database-design skill)
  • Writing API endpoint specifications (use api-design skill)
  • Performing security audits (use security-auditor skill)
  • Writing SQL queries (use sql-best-practices skill)
  • Designing multi-page website layouts (use design-system skill)
  • Analyzing deployment configurations (use deployment skill)
  • Writing documentation (use documentation-best-practices skill)

Microservices Principles

The 12-Factor App

┌─────────────────────────────────────────────────────────────┐
│              The 12-Factor App Principles                   │
├─────────────────────────────────────────────────────────────┤
│  1. Codebase: One codebase tracked in revision control      │
│  2. Dependencies: Explicitly declare and isolate dependencies│
│  3. Config: Store config in the environment                 │
│  4.Backing services: Treat backing services as attached     │
│     resources                                               │
│  5. Build, release, run: Strictly separate build and run    │
│     stages                                                  │
│  6. Processes: Execute the app as one or more stateless     │
│     processes                                               │
│  7. Port binding: Export services via port binding          │
│  8. Concurrency: Scale out via the process model            │
│  9. Disposability: Maximize robustness with fast startup    │
│     and graceful shutdown                                   │
│  10. Dev/prod parity: Keep development, staging, production │
│      as similar as possible                                 │
│  11. Logs: Treat logs as event streams                      │
│  12. Admin processes: Run admin/management tasks as one-off │
│      processes                                              │
└─────────────────────────────────────────────────────────────┘

Service Boundaries

┌─────────────────────────────────────────────────────────────┐
│              Service Boundary Guidelines                    │
├─────────────────────────────────────────────────────────────┤
│  1. Business capability: Service represents a business area │
│  2. Single responsibility: Service has one core function    │
│  3. Autonomous: Service can deploy independently            │
│  4. Isolated data: Service owns its data                    │
│  5. Loose coupling: Minimal dependencies between services   │
│  6. High cohesion: Related functionality together           │
│  7. Team ownership: One team owns one service               │
│  8. Technology agnostic: Service can use different tech     │
└─────────────────────────────────────────────────────────────┘

Domain-Driven Design

Bounded Context

┌─────────────────────────────────────────────────────────────┐
│              Bounded Context Example                        │
├─────────────────────────────────────────────────────────────┤
│  ┌─────────────────┐  ┌─────────────────┐  ┌──────────────┐│
│  │  Auth Context   │  │  Order Context  │  │ Inventory    ││
│  │                 │  │                 │  │ Context      ││
│  │ - Users         │  │ - Orders        │  │ - Products   ││
│  │ - Roles         │  │ - Cart          │  │ - Stock      ││
│  │ - Permissions   │  │ - Payment       │  │ - Suppliers  ││
│  └─────────────────┘  └─────────────────┘  └──────────────┘│
│         │                     │                    │        │
│         └─────────────────────┴────────────────────┘        │
│                              │                              │
│                      ┌───────▼───────┐                      │
│                      │  API Gateway  │                      │
│                      └───────────────┘                      │
└─────────────────────────────────────────────────────────────┘

Domain Events

typescript
// Domain Event
interface DomainEvent {
  id: string;
  aggregateId: string;
  timestamp: Date;
  version: number;
}

// OrderPlaced Event
interface OrderPlaced extends DomainEvent {
  type: 'OrderPlaced';
  orderId: string;
  customerId: string;
  items: OrderItem[];
  total: number;
}

// Event Handler
class OrderPlacedHandler {
  async handle(event: OrderPlaced) {
    // Send confirmation email
    await emailService.sendOrderConfirmation(event.customerId, event.orderId);

    // Update inventory
    await inventoryService.reserveStock(event.items);

    // Log for analytics
    await analyticsService.trackOrderPlaced(event);
  }
}

Communication Patterns

Synchronous Communication

┌─────────────────────────────────────────────────────────────┐
│              Synchronous Communication                      │
├─────────────────────────────────────────────────────────────┤
│  Client ──HTTP/REST──> API Gateway ──HTTP/REST──> Service   │
│                                                              │
│  Pros: Simple, easy to understand                           │
│  Cons: Tight coupling, failure propagation                  │
│  Use when: Low latency required, simple workflows           │
└─────────────────────────────────────────────────────────────┘

Asynchronous Communication

┌─────────────────────────────────────────────────────────────┐
│              Asynchronous Communication                     │
├─────────────────────────────────────────────────────────────┤
│  Publisher ──Message Queue──> Subscriber 1                  │
│                             └─> Subscriber 2                │
│                             └─> Subscriber 3                │
│                                                              │
│  Pros: Loose coupling, scalability, resilience              │
│  Cons: Complexity, eventual consistency                     │
│  Use when: Decoupling needed, high volume, complex workflows│
└─────────────────────────────────────────────────────────────┘

CQRS Pattern

┌─────────────────────────────────────────────────────────────┐
│              CQRS Pattern                                   │
├─────────────────────────────────────────────────────────────┤
│  ┌──────────────┐          ┌─────────────────┐              │
│  │   Command    │─────────>│  Write Model    │              │
│  │   Handlers   │          │  (Aggregate)    │              │
│  └──────────────┘          └─────────────────┘              │
│                                     │                        │
│                                     ▼                        │
│                             ┌──────────────┐                │
│                             │  Event Store │                │
│                             └──────────────┘                │
│                                     │                        │
│                                     ▼                        │
│  ┌──────────────┐          ┌─────────────────┐              │
│  │   Query      │─────────>│  Read Model     │              │
│  │   Handlers   │          │  (Projections)  │              │
│  └──────────────┘          └─────────────────┘              │
│                                     │                        │
│                                     ▼                        │
│                             ┌──────────────┐                │
│                             │  Read Store  │                │
│                             │  (Optimized) │                │
│                             └──────────────┘                │
└─────────────────────────────────────────────────────────────┘

Saga Pattern

Saga with Compensation

┌─────────────────────────────────────────────────────────────┐
│              Saga with Compensation                         │
├─────────────────────────────────────────────────────────────┤
│  1. Create Order ──> 2. Reserve Inventory                   │
│     │                      │                                │
│     │                      ▼                                │
│     │              3a. Inventory Reserved                   │
│     │                      │                                │
│     │                      ▼                                │
│     │              4. Process Payment                       │
│     │                      │                                │
│     │                      ▼                                │
│     │              5. Payment Processed                     │
│     │                      │                                │
│     │                      ▼                                │
│     └──────────────> 6. Order Confirmed                     │
│                                                              │
│  On Failure:                                                 │
│  - Cancel Payment (compensation)                            │
│  - Release Inventory (compensation)                         │
│  - Cancel Order (compensation)                              │
└─────────────────────────────────────────────────────────────┘

Circuit Breaker Pattern

typescript
class CircuitBreaker {
  private state: 'closed' | 'open' | 'half-open' = 'closed';
  private failureCount = 0;
  private successCount = 0;

  async execute<T>(fn: () => Promise<T>): Promise<T> {
    if (this.state === 'open') {
      throw new Error('Circuit breaker is open');
    }

    try {
      const result = await fn();
      this.onSuccess();
      return result;
    } catch (error) {
      this.onFailure();
      throw error;
    }
  }

  private onSuccess() {
    this.failureCount = 0;
    this.successCount++;

    if (this.state === 'half-open') {
      this.state = 'closed';
    }
  }

  private onFailure() {
    this.failureCount++;

    if (this.failureCount >= this.threshold) {
      this.state = 'open';
      setTimeout(() => {
        this.state = 'half-open';
      }, this.timeout);
    }
  }
}

Real-World Impact

Before this skill:

  • Monolithic architecture
  • Tight coupling between components
  • Deployment bottlenecks
  • Single point of failure
  • Scaling challenges

After this skill:

  • Well-designed microservices
  • Loose coupling and high cohesion
  • Independent deployments
  • Fault isolation
  • Scalable and resilient systems

Cross-References

  • domain-driven - For domain model design
  • api-design - For microservice API specifications
  • devops-pipeline - For CI/CD of microservices

References

Câu hỏi thường gặp

Kỹ năng AI Microservices Architecture làm được gì?

Use when designing and implementing microservices architectures, domain-driven design, service boundaries, event-driven communication, and distributed systems patterns. Includes CQRS, sagas, service discovery, and API gateway patterns. Based on Certified Microservices Architect (CMA) certification and microservices best practices.

Vì sao nên dùng Microservices Architecture trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Microservices Architecture là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Microservices Architecture trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Omar-Obando/qwen-orchestrator/tree/main/skills/microservices-architecture. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Microservices Architecture?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Microservices Architecture với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Microservices Architecture với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Microservices Architecture có miễn phí không?

Có. Kỹ năng này được Omar-Obando phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇