Articles tagged with #Java
A curated list of engineering series, deep dives, and notes related to #Java.
Building a Custom In-Memory Data Store in Java: The Collections Capstone
Build a production-grade in-memory key-value database in Java from scratch using custom data structures: HashMaps, LRU caches, priority queues, and SkipLists.
Java Specialized Queues: SynchronousQueue Handoffs & DelayQueue Expiration
Master Java SynchronousQueue and DelayQueue internals. Learn zero-capacity thread handoffs and how Delayed Min-Heaps power task schedulers.
Lock-Free Sorted Range Queries: ConcurrentSkipListMap & SkipLists in Java
Learn how ConcurrentSkipListMap uses SkipLists and atomic CAS pointers to deliver lock-free sorted range queries across 64+ CPU cores in Java.
Java BlockingQueue Performance: ArrayBlockingQueue vs LinkedBlockingQueue
Compare ArrayBlockingQueue vs LinkedBlockingQueue in Java. Learn how dual-lock splitting eliminates contention in multi-threaded task queues.
Java IdentityHashMap Internals: Reference Equality & Open Addressing Probing
Learn how Java IdentityHashMap uses reference equality (==) and flat array linear probing to prevent infinite recursion in object graph serializers.
Building a Custom Transactional Storage Engine in Java: The Database Capstone
Build a complete, working transactional storage engine in Java with slotted memory pages, WAL crash recovery, LRU buffer pool management, and 2PL locking.
Building a Custom Container Runtime Engine in Java: The Docker Capstone
Build a functional container runtime CLI in Java with Linux namespaces (unshare), cgroups v2 resource controls, rootfs pivot_root, and container execution.
Java WeakHashMap Internals: Preventing Memory Leaks with Weak References
Explore how Java WeakHashMap uses WeakReference keys and ReferenceQueue polling to prevent memory leaks in caches and plugin frameworks.
Building a Custom Kubernetes Operator in Java: The Kubernetes Capstone
Build a complete, functional Kubernetes Custom Operator in Java with Custom Resources, Informer watchers, and Observe-Diff-Act reconciliation loops.
Building a Custom Mini Spring Boot Framework in Java: The Spring Capstone
Build a custom, runnable mini Spring Boot framework in Java from first principles. Synthesize IoC wiring, ASM/reflection scanning, AOP proxies, and embedded HTTP routing.
Building a Custom Distributed Rate Limiter & Resilience Gateway in Java: The System Design Capstone
Build a custom, runnable Distributed Rate Limiter & Resilience Gateway in Java from first principles. Synthesize token buckets, circuit breakers, and singleflight locks.
High-Performance Java: How EnumSet and EnumMap Achieve Zero-Allocation Speed
Discover why EnumSet and EnumMap are the fastest collections in Java. Learn how 64-bit long bitmasks execute set operations in 1 CPU cycle.
Building a Real-Time Event-Driven Order System with Apache Kafka
Build an end-to-end event-driven microservices architecture in Java using Apache Kafka, Schema Registry, Avro, Dead Letter Topics, and Kafka Streams.
Spring Boot Externalized Configuration, Profiles, and Production Observability
Master Spring Boot configuration hierarchy, relaxed property binding, profile management, and production health probes with Spring Boot Actuator.
Java ConcurrentHashMap Internals: Lock-Free CAS & Fine-Grained Bucket Sync
Deep dive into Java 8+ ConcurrentHashMap internals. Learn how lock-free CAS, volatile reads, and bucket-level synchronized locks handle high concurrency.
Dynamic Proxies in Spring: JDK Dynamic Proxies vs CGLIB Bytecode Generation
Master Spring dynamic proxies. Compare JDK Dynamic Proxies via interfaces with CGLIB bytecode generation, and learn why Spring Boot defaults to CGLIB.
Java Concurrent Collections: CopyOnWriteArrayList vs Unmodifiable vs List.of()
Compare Fail-Fast vs Fail-Safe collections in Java. Learn CopyOnWriteArrayList memory mechanics and the difference between List.of() and unmodifiable wrappers.
Aspect-Oriented Programming (AOP) Concepts: JoinPoints, Pointcuts, and Advices
Master Spring Aspect-Oriented Programming (AOP). Learn how JoinPoints, Pointcuts, and Advices intercept execution to modularize cross-cutting concerns.
Java PriorityQueue Internals: Building a Min-Heap Array from Scratch
Build a custom PriorityQueue in Java using a flat Min-Heap array. Learn parent-child index formulas, siftUp, and siftDown algorithms.
Declarative Transaction Management: How @Transactional Works Under the Hood
Understand Spring's @Transactional internal mechanics: TransactionInterceptor proxying, PlatformTransactionManager, propagation levels, and silent rollback failures.
Java TreeMap Internals: Building a Navigable Sorted Map from Scratch
Build a custom TreeMap in Java. Learn how NavigableMap range queries and custom Comparators maintain sorted keys in O(log N) time.
Hibernate ORM and Spring Data JPA: Entity Management and N+1 Query Traps
Dissect Hibernate ORM and Spring Data JPA internals. Master the Persistence Context, entity states, lazy loading proxies, and solutions for N+1 queries.
Red-Black Tree Rotations Explained: Self-Balancing Trees in Java
Demystify Red-Black tree rotations and recoloring. Understand how Java TreeMap and HashMap maintain O(log N) balance guarantees.
Data Access Primitives: From Plain JDBC to Spring JdbcTemplate
Trace data access evolution in Java from raw JDBC boilerplate and connection leaks to Spring JdbcTemplate and HikariCP connection pool tuning.
Building a Binary Search Tree (BST) in Java: Recursive Operations & Range Queries
Implement a Binary Search Tree in Java. Learn recursive insertion, in-order traversal for sorted data, and why skewed trees degrade.
Exception Handling in Spring Web: ControllerAdvice, ExceptionHandlers, and Error Responses
Learn how Spring MVC intercepts exceptions using ControllerAdvice, evaluates HandlerExceptionResolvers, and formats RFC 7807 error responses.
Building a Custom LRU Cache in Java Using LinkedHashMap
Build an LRU Cache in Java in 10 lines of code by extending LinkedHashMap and leveraging access-order doubly linked entry pointers.
Spring MVC Request Lifecycle: HandlerMappings, HandlerAdapters, and MessageConverters
Master Spring MVC request processing: how RequestMappingHandlerMapping matches URIs, HandlerMethodArgumentResolvers inspect parameters, and HttpMessageConverters serialize JSON.
How Java HashSet Works Under the Hood: Building a Set via Composition
Discover how Java HashSet uses composition to wrap HashMap key uniqueness, spending zero extra memory on static dummy value references.
The Front Controller Pattern: How DispatcherServlet Routes HTTP Requests
Explore the Front Controller architectural pattern in Spring MVC. Learn how DispatcherServlet initializes strategies and routes requests via doDispatch.
Java HashMap Internals (Part 2): Load Factor, Resizing & Red-Black Treeification
Learn how Java HashMap resizes its bucket table when reaching load factor threshold, and how JDK 8 treeifies long bucket chains.
Spring Boot Starters & Embedded Web Servers: How Tomcat Runs Inside an Executable JAR
Discover how Spring Boot embeds Apache Tomcat inside executable fat JARs, configures ServletWebServerFactory, and resolves classloading with LaunchedURLClassLoader.
Java HashMap Internals (Part 1): Hashing Functions, Buckets & Separate Chaining
Deep dive into Java HashMap internals. Learn how hash functions, bitwise masking, and separate bucket chaining store key-value pairs.
Spring Boot Auto-Configuration Under the Hood: @EnableAutoConfiguration and Conditional Annotations
Learn how Spring Boot loads auto-configuration classes from classpath manifests and uses conditional annotations like @ConditionalOnClass and @ConditionalOnMissingBean.
Building a Double-Ended Queue (Deque) in Java for Sliding Window Algorithms
Implement a custom ArrayDeque in Java for dual-ended operations. Solve sliding window maximum algorithms in O(1) time.
Why Spring Boot Exists: Eliminating XML Configuration and Dependency Hell
Trace the architectural history of Spring Framework from XML bean wiring and WAR deployments to Spring Boot opinionated starter dependencies.
Building a Circular Queue in Java: Array Ring Buffers and Modulo Math
Build a high-performance circular array queue in Java. Eliminate O(N) array shifts using modulo arithmetic head and tail pointers.
The Complete Spring Bean Lifecycle: Instantiation, Dependency Injection, Init, and Destroy
Master the complete Spring Bean Lifecycle: Instantiation, property population, Aware interfaces, BeanPostProcessors, @PostConstruct, AOP proxying, and @PreDestroy.
Building a Custom Java Stack: LIFO Mechanics & Why Legacy Stack is Broken
Build a custom LIFO Stack in Java. Learn why java.util.Stack is obsolete and how ArrayDeque provides better performance.
Java Iterator and modCount: How Fail-Fast Iteration Prevents Data Corruption
Explore how Java iterators use modCount to throw ConcurrentModificationException and prevent silent data corruption during list traversal.
Java LinkedList Internals: Building a Doubly Linked List from Scratch
Learn how Java LinkedList works under the hood by building a doubly linked list. Compare ArrayList vs LinkedList performance trade-offs.
Building a Custom IoC Container in Java: Reflection-Based Dependency Wiring
Build a functional Inversion of Control (IoC) container in Java with custom @MyComponent and @MyAutowired annotations and reflection-based wiring.
How Java ArrayList Works Internally: Building a Dynamic Array from Scratch
Build a custom ArrayList in Java from scratch. Understand dynamic array resizing, System.arraycopy performance, and garbage collection.
Dependency Injection Mechanics: Constructor, Field, and Setter Injection Trade-offs
Master Spring Dependency Injection styles: Constructor, Field, and Setter Injection mechanics, immutability, unit testing, and circular dependencies.
Java equals() and hashCode() Contract: Avoiding Silent HashMap Bugs
Learn the unbreakable contract between equals() and hashCode() in Java to prevent silent HashMap lookup bugs and memory leaks.
Java Reflection Under the Hood: Classloading, Instantiation, and Metadata Inspection
Master Java Reflection: Class.forName(), getDeclaredConstructor(), setAccessible(true), annotation inspection, and ReflectionUtils performance.
Java Memory Model Explained: Stack vs Heap Allocation for Arrays
Understand how the JVM allocates memory on the stack and heap when declaring primitive and object reference arrays in Java.
Why Manual Object Wiring Fails at Scale: The Inversion of Control (IoC) Problem
Discover why manual Java object instantiation fails at scale: tight coupling, rigid constructor dependencies, and Inversion of Control (IoC) solutions.
Mastering Java Collections from First Principles: Series Introduction & Learning Roadmap
Discover what you will learn in this 25-part series on Java Collections internals. Build data structures from scratch and master memory mechanics.
Mastering Spring & Spring Boot Core Internals: Series Introduction & Learning Roadmap
Discover what you will learn in this 20-part series on Spring & Spring Boot Core Internals. Build a custom Spring Boot framework from scratch.