ddia-systems

Guides data system design decisions across storage engines, replication, partitioning, transactions, and consistency models.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/HafidJoss/Lummy --skill ddia-systems-hafidjoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddia-systems
Source: https://github.com/HafidJoss/Lummy/tree/main/agent/skills/ddia-systems
Command: npx skills add https://github.com/HafidJoss/Lummy --skill ddia-systems-hafidjoss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Choosing databases and designing distributed data systems involves hard trade-offs between consistency, availability, latency, and scalability. This Skill provides a structured framework, based on Designing Data-Intensive Applications, for making deliberate, documented architecture decisions instead of defaulting to familiar tools. ## Core Features & Use Cases - Seven-Domain Framework: Covers data models, storage engines (LSM vs B-tree), replication strategies, partitioning and hotspot handling, transaction isolation levels, batch/stream processing, and fault tolerance. - Architecture Scoring: Rates a data architecture out of 10 using a seven-row diagnostic covering isolation levels, replication strategy, hot-key handling, failover testing, and more. - Decision References: Deep-dive reference documents for each domain with trade-off matrices, quorum math, CRDTs, CDC patterns, and consensus algorithm guidance. - Use Case: When a user asks "should I use SQL or NoSQL for this workload" or "why are my replicas showing stale reads", the Skill walks through data model fit, replication lag anomalies, and concrete fixes like read-your-writes guarantees. ## Quick Start Ask the assistant to evaluate which database and replication strategy fits your application's read/write ratio, consistency requirements, and scaling needs.

Frequently Asked Questions about ddia-systems

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between SQL and NoSQL databases?

Match the data model to your access patterns: relational excels at many-to-many relationships and ad-hoc queries, document models fit self-contained aggregates with one-to-many data, and graph models suit recursive relationship traversals. Evaluate read/write ratio, consistency needs, and scaling path rather than popularity.

What is the difference between LSM trees and B-trees?

LSM trees optimize write throughput using sequential appends and background compaction, suiting write-heavy workloads like time-series ingestion. B-trees update pages in place with predictable read latency, making them better for mixed OLTP workloads. LSM trees have higher write amplification; B-trees suffer fragmentation.

Why do my replicas return stale data after writes?

Asynchronous replication creates lag between the leader and followers, causing read-your-writes and monotonic-read violations. Fix this by reading recently written data from the leader, pinning users to consistent followers, or tracking replication log positions to ensure followers have caught up.

How do I handle hot partition keys in a sharded database?

Hot keys occur when one key receives disproportionate traffic, which hashing alone cannot fix. Mitigate by splitting the hot key with random suffixes and fanning out reads, adding a caching layer, buffering writes, or using databases with automatic hotspot detection like DynamoDB adaptive capacity.

When should I use a saga instead of a distributed transaction?

Use sagas for operations spanning multiple services or partitions, since two-phase commit is slow, fragile, and makes the coordinator a single point of failure. Design single-partition transactions where possible and use compensating actions, like refunds, to roll back multi-step operations.

What isolation level does my database use by default?

Most databases default to read committed or snapshot isolation, not serializable, which permits anomalies like write skew. Check your database documentation, test for write skew and phantom reads, and use explicit locking such as SELECT FOR UPDATE where stronger guarantees are needed.