Byte Depth
© 2026 ByteDepth. All rights reserved.Built with care for curious engineers.

All Topics

Java41 articles

✕ Clear filter

Low Level Design

Design an Amazon Locker System

A complete low-level design walkthrough for Amazon Locker — from requirements clarification to token-based access, compartment management, and expiry enforcement in Java.

Easy·Sep 18, 2026·12 min read
Low Level DesignOOPsSOLID

Low Level Design

Strategy Pattern — Swap Algorithms at Runtime in Java

How the Strategy pattern replaces complex if-else chains with interchangeable algorithm objects, keeping business logic clean and extensible.

Aug 26, 2026·9 min read
Low Level DesignStrategy PatternDesign Patterns

Low Level Design

Abstract Factory Pattern — Families of Related Objects in Java

How the Abstract Factory pattern ensures product families stay consistent and eliminates the risk of mixing incompatible objects at compile time.

Aug 26, 2026·10 min read
Low Level DesignAbstract Factory PatternDesign Patterns

Low Level Design

Adapter Pattern — Bridge Incompatible Interfaces in Java

How the Adapter pattern wraps legacy or third-party classes to make them work with your system's interface — without rewriting existing code.

Aug 26, 2026·8 min read
Low Level DesignAdapter PatternDesign Patterns

Low Level Design

Bridge Pattern — Decouple Abstraction from Implementation

How the Bridge pattern prevents class explosion by separating what an object does from how it does it, letting both hierarchies evolve independently.

Aug 26, 2026·9 min read
Low Level DesignBridge PatternDesign Patterns

Low Level Design

Builder Pattern — Construct Complex Objects Step by Step

How the Builder pattern eliminates telescoping constructors, keeps object construction readable, and enables immutable objects with optional fields.

Aug 26, 2026·9 min read
Low Level DesignBuilder PatternDesign Patterns

Low Level Design

Chain of Responsibility — Pass Requests Through a Handler Chain

How the Chain of Responsibility pattern decouples request senders from receivers, letting multiple objects get a chance to handle a request without the sender knowing which one will.

Aug 26, 2026·9 min read
Low Level DesignChain of Responsibility PatternDesign Patterns

Low Level Design

Composite Pattern — Tree Structures Treated Uniformly

How the Composite pattern lets you compose objects into tree hierarchies where individual items and groups of items share the same interface — eliminating special-case logic.

Aug 26, 2026·9 min read
Low Level DesignComposite PatternDesign Patterns

Low Level Design

Decorator Pattern — Add Behaviour Without Subclassing

How the Decorator pattern wraps objects to add responsibilities at runtime, eliminating the combinatorial subclass explosion that inheritance creates.

Aug 26, 2026·10 min read
Low Level DesignDecorator PatternDesign Patterns

Low Level Design

Facade Pattern — Simplify Complex Subsystems in Java

How the Facade pattern provides a single, clean entry point to a complex system of classes — hiding the internals and decoupling clients from subsystem details.

Aug 26, 2026·8 min read
Low Level DesignFacade PatternDesign Patterns

Low Level Design

Factory Pattern — Centralise Object Creation in Java

How the Factory Method pattern eliminates scattered `new` calls, enforces the Open/Closed Principle, and keeps object creation logic in one place.

Aug 26, 2026·9 min read
Low Level DesignFactory PatternDesign Patterns

Low Level Design

Null Object Pattern — Eliminate Null Checks in Java

How the Null Object pattern replaces null references with do-nothing objects that implement the expected interface, removing defensive null checks throughout your codebase.

Aug 26, 2026·8 min read
Low Level DesignNull Object PatternDesign Patterns

Low Level Design

Proxy Pattern — Control Access to Objects in Java

How the Proxy pattern adds access control, caching, logging, and lazy initialisation to objects without modifying their original class.

Aug 26, 2026·9 min read
Low Level DesignProxy PatternDesign Patterns

Low Level Design

State Pattern — Object Behaviour That Changes with State

How the State pattern replaces complex state-based conditionals with dedicated state classes, making transitions explicit and individual states independently testable.

Aug 26, 2026·9 min read
Low Level DesignState PatternDesign Patterns

Low Level Design

Design a Conference Room Booking System

Low-level design of a thread-safe office room booking system featuring Singleton, Facade, Strategy (pluggable room selection), Observer (Email/Calendar/Slack notifications), Builder for recurring bookings, and atomic rollback.

Hard·Aug 21, 2026·20 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design Splitwise

Low-level design of an expense-sharing app — user and group management, three split strategies (equal, percentage, exact), Factory pattern for entity creation, Singleton orchestration, and a Facade that hides all internal complexity.

Hard·Aug 21, 2026·18 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Library Management System

A full low-level design for a library — rack-based book storage, dual borrow flows (by book ID or copy ID), multi-attribute search, borrow-log tracking, and a thin facade that separates the public API from the core engine.

Medium·Aug 16, 2026·18 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Notification Service

A multi-channel notification broker with per-service subscription control, parallel fan-out via an ExecutorService, exponential-backoff retry, and a Dead Letter Queue — built around Template Method, Strategy, Builder, and Singleton.

Medium·Aug 16, 2026·16 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Pub-Sub Model

Build a Publisher-Subscriber messaging system from scratch — decoupled components, dynamic topic management, and thread-safe broadcast using the Observer pattern and Singleton registry.

Medium·Aug 16, 2026·12 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Tic-Tac-Toe Game

A clean OOP design for the classic two-player grid game — pluggable winning strategies, a Singleton game controller, interface-driven board and game contracts, and a turn-based loop in Java.

Medium·Aug 16, 2026·14 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Logging Framework

A complete low-level design walkthrough for a custom logging framework — from requirements clarification to Singleton, Strategy, and Builder patterns, with async log processing and pluggable appenders in Java.

Easy·Aug 13, 2026·15 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design an LRU Cache

Build a fixed-capacity cache with O(1) get and put using a HashMap and a doubly linked list, with a pluggable eviction engine that cleanly separates storage from access-order tracking.

Medium·Aug 13, 2026·12 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Task Management System

A complete low-level design walkthrough for a task management system — from requirements to State, Strategy, Builder, and Singleton patterns with thread-safe task lifecycle management in Java.

Easy·Aug 13, 2026·15 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Traffic Signal Controller

A complete low-level design walkthrough for a traffic signal control system — State pattern for signal transitions, Singleton context as the FSM, and sensor-driven adaptive durations with emergency override.

Easy·Aug 11, 2026·12 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Bank Account System

A complete low-level design walkthrough for a bank account system — from requirements clarification to SOLID principles, design patterns, and a clean Java implementation with Singleton service, abstract accounts, and transaction history.

Easy·Aug 11, 2026·15 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Coffee Vending Machine

A complete low-level design walkthrough for a coffee vending machine — Singleton services, Factory for coffee types, synchronized thread safety, and inventory tracking with low-stock alerts.

Easy·Aug 11, 2026·15 min read
Low Level DesignOOPDesign Patterns

Concurrency

Blocking Queue — Producer-Consumer

Implement a thread-safe bounded blocking queue from scratch using ReentrantLock and Condition variables — the canonical producer-consumer concurrency problem.

Aug 10, 2026
ConcurrencyJavaMultithreading

Concurrency

Building H2O — Semaphores + CyclicBarrier

Coordinate hydrogen and oxygen threads so they always form complete H2O molecules — never a stray atom — using two semaphores to enforce stoichiometry and a CyclicBarrier to synchronize the triplet.

Aug 10, 2026
ConcurrencyJavaMultithreading

Concurrency

Dining Philosophers — Deadlock-Free Fork Ordering

Five philosophers, five forks, one circular table — eliminate the circular wait that causes deadlock by acquiring forks in a fixed global index order, never left-before-right.

Aug 10, 2026
ConcurrencyJavaDeadlock

Concurrency

Print FooBar Alternately — Two Approaches

Two threads must alternate printing 'foo' and 'bar' exactly n times each. Compare a synchronized wait/notify approach against a cleaner paired-semaphore solution.

Aug 10, 2026
ConcurrencyJavaMultithreading

Concurrency

Print In Order — CountDownLatch vs wait/notify

Three threads must print 'first', 'second', 'third' in order, regardless of scheduling. Compare CountDownLatch (clean one-shot signaling) against synchronized wait/notify (general state machine).

Aug 10, 2026
ConcurrencyJavaMultithreading

Concurrency

Round Robin Print — N Threads in Order

N threads must print a shared counter in strict round-robin order: thread 0 prints 1, thread 1 prints 2, …, wrapping back to thread 0, until maxCount is reached.

Aug 10, 2026
ConcurrencyJavaMultithreading

Concurrency

Print Zero-Odd-Even — Three-Thread Sequencing

Three threads must interleave to print '0102030405…' — zero before every number, odd and even alternating. Solved with ReentrantLock and three dedicated Condition variables.

Aug 10, 2026
ConcurrencyJavaMultithreading

Java

Java Streams Workbook

A progressive, hands-on workbook for building stream-writing fluency from scratch. Six levels, basic → advanced — write every exercise from a blank page.

Aug 8, 2026·25 min read
JavaStreamsFunctional Programming

Low Level Design

Building a Scalable Weather Station

A Practical Look at Pub/Sub Architecture in Java

Easy·Nov 26, 2025
Low Level DesignOOPDesign Patterns

Low Level Design

How to Build a Scalable Music Service

Explore the system design of a music streaming service like Spotify. Learn about positional indexing for playlists, handling concurrency with the Actor model, low-latency playback architecture, and the design patterns that make it scale to millions of users.

Hard·Nov 24, 2025
Low Level DesignOOPDesign Patterns

Low Level Design

Design a Parking Lot

A complete low-level design walkthrough for a multi-level parking lot system — from requirements clarification to class diagrams, design patterns, and thread-safe Java implementation.

Easy·Aug 10, 2025·18 min read
Low Level DesignOOPDesign Patterns

Low Level Design

Observer Pattern — Event-Driven Design in Java

Build a type-safe, decoupled event system using the Observer pattern. Covers the classic GoF design, Java's built-in tools, and a modern generic implementation.

Jul 18, 2025·12 min read
Low Level DesignObserver PatternDesign Patterns

Low Level Design

Deep Dive into Low Level Design (LLD)

Dive into the world of Low-Level Design (LLD) with this comprehensive guide. Whether you're prepping for interviews or strengthening your system design skills, this blog covers it all — essential topics, must-practice questions, core design patterns explained with real-world analogies, and annotated sample code snippets. Perfect for developers aiming to write clean, scalable, and maintainable code.

Jul 15, 2025
Low Level DesignOOPSOLID

Low Level Design

Singleton Pattern — Thread-Safe Implementations in Java

A deep dive into the Singleton design pattern: why it exists, common pitfalls, and three progressively better thread-safe implementations.

Jul 10, 2025·10 min read
Low Level DesignSingleton PatternDesign Patterns

Concurrency

Concurrency & Multithreading: The Complete Guide

Invalid Date
ConcurrencyJavaMultithreading