本文へ移動
cccskills
無料GitHub で公開

kleppmann-data-intensive

Comprehensive guide to designing reliable, scalable data systems covering databases, streaming, and consistency

インストール方法を見る

含まれるファイル(9)

  • SKILL.md8.7 KB
  • _book_identity.json4.6 KB
  • _raw_response.md76.0 KB
  • references/consistency-models-and-coordination-costs.md12.9 KB
  • references/distributed-transactions-and-coordination.md13.9 KB
  • references/fault-tolerance-through-architecture.md9.1 KB
  • references/immutability-determinism-and-debuggability.md13.1 KB
  • references/load-parameters-and-scalability.md9.9 KB
  • references/operational-realities-and-failure-modes.md12.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

SKILL: Designing Data-Intensive Systems (Kleppmann)

Source: Designing Data-Intensive Applications by Martin Kleppmann Domain: Distributed systems, data architecture, reliability engineering Applies to: Building systems where data complexity (not computation) is the bottleneck

DECISION POINTS

1. Consistency Model Selection

IF: Strong consistency required (banking, inventory)
  AND: Can tolerate higher latency + coordination overhead
THEN: Use linearizability with synchronous replication

IF: Operations need ordering but not global agreement
  AND: User experience matters more than strict consistency
THEN: Use causal consistency (preserve cause-effect, allow concurrent ops)

IF: High availability required during network partitions
  AND: Can resolve conflicts application-side
THEN: Accept eventual consistency with conflict resolution

IF: Read-your-writes is critical but global consistency isn't
  AND: Users mostly operate on their own data
THEN: Route user reads to leader/use session consistency

2. Scaling Architecture Decisions

IF: tail latency > 500ms + replication lag > 1s
  AND: Cache hit rate < 80%
THEN: Switch to local quorum reads, accept bounded staleness

IF: Write throughput bottleneck identified
  AND: Operations can be partitioned by key
THEN: Implement horizontal partitioning with partition-local transactions

IF: Cross-partition queries frequent
  AND: Eventual consistency acceptable for derived data
THEN: Use CQRS pattern (separate write/read paths)

IF: Coordination overhead dominates response time
  AND: Operations can be made idempotent
THEN: Replace distributed locks with compare-and-set operations

3. Failure Handling Strategy

IF: Component failure detected (timeout/error)
  AND: Operation might have succeeded
THEN: Make operation idempotent, use unique request IDs for retry

IF: Distributed resource coordination required
  AND: Process pauses/network delays possible
THEN: Implement fencing tokens (resource rejects lower-numbered tokens)

IF: Multi-step workflow spans services
  AND: Atomic rollback needed
THEN: Use saga pattern with compensating transactions, not 2PC

IF: Service dependency causing tail latency spikes
THEN: Implement circuit breaker + hedged requests after timeout threshold

FAILURE MODES

1. Split-Brain Coordination

Symptoms: Two nodes both believe they're the leader, conflicting writes accepted Root Causes: Network partition + inadequate quorum checking + lease expiry race conditions Detection Rule: If you see duplicate primary keys or "impossible" data states after network events Fixes (ranked by speed/safety):

  1. Immediate: Enable fencing tokens, reject operations from stale leaders
  2. Short-term: Implement proper quorum (majority must agree on leader)
  3. Long-term: Use consensus algorithm (Raft/Paxos) for leader election

2. Cascade Failure Amplification

Symptoms: Single component failure causes system-wide outage, p99 latency spike across all services Root Causes: Synchronous dependencies + no circuit breakers + retry storms + unbounded queues Detection Rule: If failure rate increases exponentially rather than linearly with initial fault Fixes (ranked by speed/safety):

  1. Immediate: Deploy circuit breakers, implement fail-fast with timeouts
  2. Short-term: Add backpressure mechanisms, bound all queues
  3. Long-term: Break synchronous dependencies, use asynchronous messaging

3. Read-After-Write Disappearing Data

Symptoms: User writes data, immediately reads and sees old value, claims "data was lost" Root Causes: Async replication lag + load balancer routes read to stale replica + no session affinity Detection Rule: If user complaints about "lost data" correlate with write-then-read patterns Fixes (ranked by speed/safety):

  1. Immediate: Route user reads to primary for N seconds after write
  2. Short-term: Implement read-your-writes consistency with logical timestamps
  3. Long-term: Use strongly consistent reads for user-critical paths

4. Phantom Distributed Lock

Symptoms: Multiple processes acquire same lock simultaneously, resource corruption occurs Root Causes: Lock service uses timeouts without fencing + GC pauses + network delays exceed lease time Detection Rule: If you see lock violation errors or concurrent modification of "protected" resources Fixes (ranked by speed/safety):

  1. Immediate: Implement fencing tokens, resource validates token before operation
  2. Short-term: Use compare-and-set instead of locks where possible
  3. Long-term: Redesign to avoid coordination, use immutable data structures

5. Thundering Herd Cache Stampede

Symptoms: Cache expires, all requests hit database simultaneously, database overloads Root Causes: Cache expiry + no request deduplication + synchronous cache population + high concurrency Detection Rule: If database load spikes correlate with cache miss events Fixes (ranked by speed/safety):

  1. Immediate: Implement cache request coalescing, only one thread populates
  2. Short-term: Use probabilistic cache refresh before expiry
  3. Long-term: Implement cache warming and gradual expiry spreading

WORKED EXAMPLES

Example: E-commerce Inventory Management

Scenario: User adds last item to cart, another user tries same item simultaneously

Decision Process:

  1. Identify coordination requirement: Need atomic decrement of inventory count
  2. Assess consistency needs: Overselling is unacceptable (lost revenue + customer complaints)
  3. Choose approach: Use linearizable reads/writes for inventory, eventual consistency for recommendations

Implementation:

-- Atomic inventory check with compare-and-set
UPDATE inventory 
SET quantity = quantity - 1, version = version + 1
WHERE product_id = ? AND quantity >= 1 AND version = ?

Novice would miss: Using SELECT then UPDATE (race condition window) Expert catches: Version field prevents lost updates, quantity check prevents overselling

Fallback handling:

  • IF update affects 0 rows (item sold out): Return "out of stock" immediately
  • IF operation times out: Use fencing token to prevent duplicate decrement
  • IF database unavailable: Fail fast rather than queue requests indefinitely

Example: Social Feed Consistency

Scenario: User posts update, immediately checks feed, doesn't see their post

Decision Process:

  1. Analyze user expectation: Seeing own posts matters, seeing others' posts can be delayed
  2. Identify load parameters: Write fan-out to followers, not write volume
  3. Choose consistency model: Causal consistency (preserve user's action order)

Implementation Strategy:

  • Write to user's timeline synchronously (read-your-writes)
  • Fan out to followers asynchronously (eventual consistency)
  • Use logical timestamps to prevent time-travel anomalies

Quality validation:

  • User always sees their own posts immediately
  • Followers see posts within bounded time (monitor lag)
  • No posts appear before their replies

QUALITY GATES

  • Consistency model explicitly chosen and anomalies catalogued
  • Load parameters identified and instrumented (p99 latency, fan-out ratio, partition skew)
  • Failure modes tested: component failures, network partitions, process pauses
  • Coordination minimized: operations partitioned, idempotency implemented
  • Tail latency measured: p99 and p999 tracked separately from averages
  • Quorum mathematics verified: w + r > n for required consistency level
  • Circuit breakers deployed: timeout and error rate thresholds configured
  • Observability complete: can trace requests across service boundaries
  • Chaos testing implemented: deliberate fault injection in non-production
  • Rollback strategy proven: can revert changes without data loss

NOT-FOR BOUNDARIES

This skill should NOT be used for:

  • Pure computational problems (ML training, rendering) → Use parallel-processing patterns instead
  • Single-machine applications with local data → Use database-patterns skill instead
  • Systems where "eventual consistency" means "never consistent" is acceptable → Use eventual-consistency-design skill instead
  • Real-time systems with hard latency bounds → Use real-time-systems skill instead

Delegate to other skills:

  • For message queue design → Use messaging-patterns skill
  • For database schema design → Use data-modeling skill
  • For microservices boundaries → Use service-decomposition skill
  • For monitoring/alerting setup → Use observability skill

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

日本語の概要は準備中です。原文の説明を表示しています。

curiositech/windags-skills132026年10月12日 更新

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

日本語の概要は準備中です。原文の説明を表示しています。

curiositech/windags-skills132026年10月12日 更新

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

日本語の概要は準備中です。原文の説明を表示しています。

curiositech/windags-skills132026年10月12日 更新

Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

日本語の概要は準備中です。原文の説明を表示しています。

curiositech/windags-skills132026年10月12日 更新

Use for insight, reframing, contradiction, impasse, and anomaly-driven problem solving when execution effort no longer helps. NOT for routine optimization, error correction, or well-specified tasks with known solution paths.

日本語の概要は準備中です。原文の説明を表示しています。

curiositech/windags-skills132026年10月12日 更新

Apply normative BDI reasoning to agents that must detect norms, choose which commitments to internalize, and resolve conflicts by comparing consequences. Use when obligations, prohibitions, or policies collide in autonomous systems. NOT for simple fixed-priority rules, pure constraint satisfaction, or domains where no real normative conflict exists.

日本語の概要は準備中です。原文の説明を表示しています。

curiositech/windags-skills132026年10月12日 更新

curiositech のスキルをすべて見る

このスキルの問題を報告する