System Design Mapping
Every design pattern, mapped to the real-world systems that use it. Spot patterns in Netflix, Google, Uber, Spring, Kafka — and understand why they made that choice.
Creational
- →HikariCP Database Connection Pool (Every major Java backend)
- →Spring ApplicationContext (Spring Framework)
- +3 more — see pattern page
Define an interface for creating objects, but let subclasses decide which class to instantiate.
- →JDBC DriverManager.getConnection() (Java Database Connectivity)
- →slf4j LoggerFactory.getLogger() (SLF4J / Logback / Log4j)
- +2 more — see pattern page
Separate construction from representation
- →OkHttp HttpRequest Builder (OkHttp HTTP Client)
- →Protobuf/Avro Schema Builder (Google Protobuf / Apache Avro)
- +2 more — see pattern page
Create objects by cloning an existing prototype
- →JavaScript Object.create() cloning (JavaScript / Node.js)
- →Redux state cloning (Redux state management)
- +2 more — see pattern page
Structural
Convert incompatible interfaces into compatible ones
- →JDBC database adapters (JDBC drivers (MySQL, PostgreSQL, Oracle))
- →Spring DispatcherServlet HandlerAdapter (Spring Framework)
- +2 more — see pattern page
Decouple abstraction from implementation so they can vary independently
- →JDBC Driver/Connection bridge (JDBC API)
- →AWT/Swing platform abstraction (Java GUI frameworks)
- +2 more — see pattern page
Compose objects into tree structures to represent hierarchies
- →React component tree (React / Facebook)
- →Browser DOM tree (HTML5 / All browsers)
- +2 more — see pattern page
Add responsibilities to objects dynamically
- →Java InputStream chains (Java Standard Library)
- →Express middleware (Express.js / Node.js)
- +3 more — see pattern page
- →Spring JdbcTemplate (Spring Framework)
- →AWS SDK high-level APIs (AWS SDKs)
- +2 more — see pattern page
Share fine-grained objects efficiently to reduce memory usage
- →Java String interning pool (Java Virtual Machine)
- →Browser DOM text node pooling (V8 / SpiderMonkey / JavaScriptCore)
- +2 more — see pattern page
Control access to another object through a surrogate
- →Spring AOP @Transactional proxy (Spring Framework)
- →Hibernate lazy-loaded entities (Hibernate ORM)
- +3 more — see pattern page
Behavioral
Encapsulate a request as an object, allowing you to parameterize clients with different requests, queue them, and log them
- →Git commit history (Git / GitHub)
- →Redux action dispatching (Redux state management)
- +2 more — see pattern page
Provide a way to access the elements of an object sequentially without exposing its underlying representation
- →Java Iterator interface (Java Collections Framework)
- →Python generators with yield (Python Standard Library)
- +2 more — see pattern page
- →Kubernetes control plane (Kubernetes)
- →Redux central store (Redux state management)
- +2 more — see pattern page
Capture and externalize an object's internal state without violating encapsulation, allowing it to be restored later
- →Browser history stack (Chrome, Firefox, Safari)
- →Photoshop undo history (Adobe Photoshop)
- +2 more — see pattern page
Define a one-to-many dependency where when one object changes state, all its dependents are notified automatically
- →Kafka consumer groups (Apache Kafka)
- →React useState hooks (React / Facebook)
- +3 more — see pattern page
- →TCP connection state machine (Kernel / POSIX sockets)
- →Redux reducers (Redux state management)
- +2 more — see pattern page
- →Java Comparator interface (Java Collections Framework)
- →Payment processor strategies (Stripe, PayPal, Square)
- +2 more — see pattern page
Represent an operation to be performed on elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates
- →Java compiler AST visitors (javac / Eclipse Compiler)
- →Document format exporters (LibreOffice, Word, Google Docs)
- +2 more — see pattern page
AI Agent & LLM
Ground LLM responses in real data by retrieving relevant documents before generating an answer.
- →ChatGPT knowledge base retrieval (OpenAI)
- →Perplexity.AI web search integration (Perplexity AI)
- +3 more — see pattern page
Generate, critique, and refine outputs iteratively to improve quality.
- →Claude self-reflection (Anthropic)
- →OpenAI self-refining chains (OpenAI)
- +2 more — see pattern page
- →LangChain conversation memory (LangChain)
- →OpenAI Assistants persistent memory (OpenAI)
- +3 more — see pattern page
Validate inputs and outputs to ensure safety, quality, and compliance.
- →OpenAI moderation API (OpenAI)
- →Anthropic Constitutional AI (Anthropic)
- +3 more — see pattern page
ML System & MLOps
Ready to practice?
Test your knowledge with FAANG-style interview questions.
Go to Top Practice Questions →