Back to list
jsmithdenverdev

microservices

by jsmithdenverdev

OpenCode configuration

0🍴 0📅 Jan 21, 2026

SKILL.md


name: microservices description: Microservices architecture pattern for distributed, independently deployable services license: MIT compatibility: opencode metadata: category: architecture pattern: microservices deployment: distributed

What I do

I provide guidance on building microservices architecture - independently deployable services with bounded contexts.

When to use me

Load this skill when:

  • Multiple independent teams (> 20 developers)
  • Clear bounded contexts
  • Need independent scaling of services
  • Polyglot persistence requirements
  • Can tolerate eventual consistency
  • Mature DevOps practices

Core Principles

1. Service Per Bounded Context

Each service owns a bounded context with its own data.

2. Database Per Service

No shared databases between services.

3. API-First Communication

Services communicate via APIs (REST/gRPC) or messaging.

4. Independent Deployment

Deploy services independently without coordinating releases.

5. Decentralized Governance

Teams own their service tech stack choices.

Service Structure

services/
├── user-service/
│   ├── src/
│   ├── Dockerfile
│   └── package.json
├── product-service/
│   ├── src/
│   ├── Dockerfile
│   └── package.json
└── order-service/
    ├── src/
    ├── Dockerfile
    └── package.json

Communication Patterns

Synchronous (REST/gRPC)

// Service-to-service HTTP call
class OrderService {
  async createOrder(userId: string, productIds: string[]) {
    // Call user service
    const user = await fetch(`${USER_SERVICE_URL}/users/${userId}`);
    
    // Call product service
    const products = await fetch(`${PRODUCT_SERVICE_URL}/products`, {
      method: 'POST',
      body: JSON.stringify({ ids: productIds }),
    });
    
    // Create order with fetched data
  }
}

Asynchronous (Message Queue)

// Publish event to message queue
await messageQueue.publish('order.created', {
  orderId: order.id,
  userId: order.userId,
  items: order.items,
});

// Other services subscribe
messageQueue.subscribe('order.created', async (event) => {
  await inventoryService.reserveItems(event.items);
});

Advantages

  1. Independent Scaling: Scale services based on load
  2. Technology Diversity: Choose best tool per service
  3. Team Autonomy: Teams own services end-to-end
  4. Fault Isolation: Service failure doesn't crash system
  5. Parallel Development: Teams work independently

Challenges

  1. Distributed Complexity: Network calls, latency
  2. Data Consistency: Eventual consistency, distributed transactions
  3. Operational Overhead: More services to deploy/monitor
  4. Testing Complexity: Integration testing across services
  5. Debugging: Tracing requests across services

Patterns

API Gateway

Client → API Gateway → [User Service, Product Service, Order Service]

Service Mesh

For service-to-service communication (Istio, Linkerd)

Saga Pattern

For distributed transactions across services

CQRS

Separate read and write models

Best Practices

  1. Design for failure: Circuit breakers, retries, timeouts
  2. Observability: Distributed tracing, centralized logging
  3. API versioning: Don't break consumers
  4. Service discovery: Dynamic service registration
  5. Configuration management: Centralized config
  6. Automated deployment: CI/CD for each service

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon