Engineering With Java: Digest #92
Java, Spring Boot, and JVM chaos—plus a few “this should not work in production but does” moments.
👋 Java Devs! Welcome to this week’s addition! I hope you’re all doing great.
This week, we cover essential insights on:
One Quick Announcement:
We are now planning to actively post on Youtube, mainly solving real world interview questions. So consider subscribing
Also, consider sharing your interview questions to me through DM or email (surajmishra150893@gmail.com). I will try to cover them.
📢 Get actionable Java and Spring Boot insights every week, including practical code tips and real-world, use-case-based interview questions, to help you level up your backend skills—join 7600+ subscribers for hand-crafted, no-fluff content.
First 100 paid subscribers will get the annual membership at $50/year forever that is ~ $4/mo ( 91 already converted to paid, 9 remaining)
Testimonials
Articles Of The Week
Cache Stampede Control in Spring Boot With Single Flight : This article explains how the Single Flight (request coalescing) pattern prevents cache stampedes by ensuring that when multiple concurrent requests miss the same cache key, only one performs the expensive database lookup while the others wait for the shared result. It covers Spring's built-in @Cacheable(sync = true) support, custom CompletableFuture-based implementations, trade-offs in multi-instance deployments, and how this pattern reduces database load and improves throughput under heavy traffic.
7 Ways to Make Your Spring Boot Application Faster : This article covers practical techniques to improve Spring Boot performance, including reducing unnecessary auto-configuration, enabling lazy initialization, optimizing database access, using efficient connection pools, applying caching, leveraging asynchronous processing, and tuning the JVM. It emphasizes measuring performance with profiling and monitoring tools before optimizing, helping developers reduce startup time, improve throughput, and lower resource consumption.
Pi4J Drivers: Simplifying Sensor and Hardware Integration in Java : This article introduces the new Pi4J Drivers library, which provides ready-to-use Java drivers for common sensors, displays, and actuators on Raspberry Pi. By separating hardware-specific drivers from the Pi4J core, it offers a cleaner, extensible architecture, allowing developers to integrate I2C, SPI, and GPIO devices with minimal boilerplate while focusing on application logic instead of low-level hardware communication.
A Guide to Agent Skills in Spring AI : This article introduces Agent Skills in Spring AI, a lightweight alternative to MCP servers for adding reusable capabilities to AI agents. It demonstrates how to package skills as SKILL.md files with scripts and resources, enabling agents to dynamically discover and execute tasks such as article summarization. The guide also shows how to integrate skills with ChatClient, SkillsTool, FileSystemTools, and ShellTools, making agent behavior modular, reusable, and provider-agnostic across supported LLMs.
AI-Assisted Unused & Dead Code Removal : This article explains how Azul combines production runtime insights with OpenRewrite to safely identify and remove unused or dead Java code. By analyzing what code actually executes in production instead of relying solely on static analysis, teams can confidently automate cleanup, reduce maintenance overhead, improve developer productivity, and accelerate large-scale Java modernization with lower risk
CopyOnWriteArrayList.subList() ConcurrentModificationException : This article explains why CopyOnWriteArrayList.subList() can still throw a ConcurrentModificationException, despite the parent collection being designed for safe concurrent iteration. The reason is that subList() maintains a view tied to the original list's state, and structural changes to the parent invalidate that view. The author highlights this subtle concurrency pitfall, clarifies the internal implementation, and offers guidance on when to avoid subList() or create an independent copy instead.
Why Java’s New Concurrency Model Still Needs Discipline : This article argues that while Java's virtual threads dramatically simplify concurrent I/O by letting developers write blocking code at scale, they do not eliminate the need for asynchronous design. Bottlenecks such as database connection pools, rate limits, backpressure, CPU-bound work, and thread pinning still require careful architecture. The takeaway is that virtual threads reduce the complexity of concurrency, but they are not a silver bullet for every scalability challenge.
Videos Of The Week
Better Tools for Immutable Data : Dan Smith explains why immutable data leads to simpler, safer, and more concurrent Java applications, distinguishing immutable data models from merely using final fields. He highlights best practices such as records, sealed classes, switch expressions, and immutable JDK APIs, showing how modern Java (17–25) significantly reduces the boilerplate and complexity of building immutable domain models while improving correctness and maintainability.
Java Memory Management Best Practices : The talk explores how Java memory really works; from CPU cache lines and JVM heap ergonomics to containers and Kubernetes; highlighting why default JVM settings often lead to inefficient memory usage. It explains practical tuning techniques such as configuring -Xmx, understanding CPU quotas, and avoiding common pitfalls like container OOM kills and misleading heap sizes. It also covers production debugging with heap dumps, JVM flags, and the hidden memory overheads every Java application should account for.
Spring Boot 4.1: Block SSRF Attacks with InetAddressFilter : Spring Boot 4.1 introduces an InetAddressFilter that protects applications from Server-Side Request Forgery (SSRF) by blocking HTTP clients from accessing internal or private addresses supplied by users. By simply registering an InetAddressFilter bean (e.g., allowing only external addresses), Spring automatically applies it to auto-configured RestClient and reactive clients, preventing attackers from abusing URL-fetching endpoints to access internal resources.
Getting Started with Spring gRPC in Spring Boot 4.1 : Spring Boot 4.1 introduces first-class gRPC support with starters, auto-configuration, and test slices, making it much easier to build contract-first microservices in Java. The video walks through building a full gRPC “Greeter” service from scratch using .proto definitions, generating Java stubs, implementing a @GrpcService, and testing it via grpcurl, before finally wiring a client using injected stubs. It also compares REST vs gRPC and explains why gRPC’s binary, HTTP/2-based, streaming-friendly model is useful for modern distributed systems.
In-house Blogs
Spring Boot Interview Question - Kafka Consumer Became a Zombie
Java Interview Question - Find Minimum Version in Rotated Release History
Spring Boot Interview Question — Your API Went Viral Overnight
Thats all for this week friends! Thanks for reading this far. If you liked it please share with your network.
Happy Coding 🚀
Suraj
Subscribe | Sponsor us | LinkedIn | Twitter | Youtube




