Latest Blog Posts

Moham Pandi

I'm a software developer passionate about building efficient, scalable, and reliable systems, with expertise in Java, Spring, system design, and architecture. On this blog, I share insights, tutorials, and experiences to foster continuous learning—welcome, and I hope you discover ideas and resources to support your tech journey!

Your Picture

Do Different Programming Languages Use Different Threads?

Imagine two multi-threaded programs running on a Mac: one written in Java, the other in Go. Do they use different kinds of threads?... Read Post

Three Things Have to Line Up Before a Breakpoint Works

It looks like your program is running from source. In reality the JVM is running bytecode the whole time... Read Post

The Request That Looked Like a Forward, But Wasn’t

At first glance, it may look like Backend A is simply forwarding the request to Backend B. But in Spring applications, the word forward has a very specific meaning... Read Post

Ever Wondered Why Spring Knows the Current User Without Passing It Around? The Answer Is Thread-Local.

Understanding it helps explain why some things “just work” in a normal request flow, but suddenly break when we introduce async execution, custom executors, or reactive programming... Read Post

From 2PC to Sagas, Managing Transactions in Distributed Systems

Modern distributed applications rarely resemble the monoliths we built a decade ago. Instead of a single codebase and database, today’s systems are composed of many independently deployed services, often communicating through an event bus such as Apache Kafka... Read Post

From State-Centric Persistence to Event-Centric Architecture

ORM-based and CRUD-oriented models are optimized for storing current state. While this approach is familiar and effective for basic data storage, it has a structural weakness that becomes increasingly visible in modern systems: domain events are not a first-class concern... Read Post

Compiler Bootstrapping

You may have heard that a language X is written in X, and you may be wondering how that is possible. How can a language exist before it exists?... Read Post

Don’t Do DDD — Just Do These 5 Things in Your Next Project

DDD was never meant to be a rigid framework or an all-or-nothing religion. It is a *set of principles* meant to improve how we understand, model, and evolve complex domains... Read Post

Three Streams, Three Worlds, Java Streams vs Reactive Streams vs Kafka Streams

Java 8 Streams, Reactive Streams, and Kafka Streams often get mixed together because of the name — but they solve completely different problems, follow different execution models, and have no technical relationship to each other... Read Post

Being Reactive Even When Your Upstream Isn't

You don’t need the whole world to be reactive before you adopt reactive technologies... Read Post

If You Don’t Practice TDD, Do This Instead

Most developers learn testing by example (copy, paste, and tweak until it works). That approach makes tests pass, but it rarely makes testing fun... Read Post

Making the Invisible Visible

Dashboards are all green. Logs are endless. Customers are angry. You know something’s wrong but you can’t see where... Read Post

Don’t Let Your Java Debugger Fool You

If you’ve ever set a breakpoint in your IDE and stepped through some Java code, you might have assumed you were literally running that source line by line... Read Post

Defending Against XSS in React and JSP

Cross-Site Scripting (XSS) is one of the most common and dangerous vulnerabilities in web applications... Read Post

Staying on Track When a Ticket Gets Complicated

Here are some simple and helpful tips to keep moving when a ticket starts dragging on... Read Post

Don't Mix Up Polling and Pooling

In system design, two similar-sounding terms often cause confusion... Read Post

How to Scale Spring Boot for High Concurrency

Should you increase the Tomcat thread pool size? How do you determine the right number of threads?... Read Post

How Threads Share Code in Java

In this post, we answer a key question: how do threads work with a singleton instance in Java?... Read Post

Java’s Mission: No More Excuses

Java isn't trying to be the flashiest language or lead every trend — it’s focused on one strategic goal: removing every valid excuse not to use it... Read Post

Java Concurrency 5 - How Virtual Threads Make Java Concurrency Effortless

Virtual threads let you write code in a familiar, blocking style — without managing callbacks or chaining... Read Post

Java Concurrency 4 - Goodbye Threads, Hello Streams!

We’ll dive into reactive concurrency in Java with Project Reactor and explore how it transforms the way we handle asynchronous, concurrent tasks—especially in high-throughput systems... Read Post

Java Generics: A Compile-Time Gift With a Runtime Disguise

Generics weren't added to Java just for nicer-looking syntax. They were introduced to solve real problems — but with very real trade-offs... Read Post

Java Concurrency 3 - Mastering CompletableFuture

In my latest post, I walk through CompletableFuture, how it compares to JavaScript's Promise, and show a real-world example of handling file imports asynchronously... Read Post

Mock vs Spy in Mockito — Never Ask Again

Ever mixed up @Mock and @Spy in your unit tests? You're not alone. Here, I explain the difference with a memory trick you'll never forget... Read Post

Java Concurrency 2 - Multithreading in Tomcat

We look at how Apache Tomcat, a popular Java HTTP server, uses thread pools internally to manage concurrent HTTP requests... Read Post

Java Concurrency 1 - ExecutorService and ForkJoinPool

When building concurrent applications in Java, managing threads properly is crucial. Spawning raw threads by new Thread(...) works for simple cases, but it's inefficient and hard to scale... Read Post

How Web Servers Handle Logging Efficiently

Have you ever wondered how web servers generate log files so quickly, even though writing to files is known to be an expensive operation?... Read Post

Don’t Mix Up "Aggregates" and "Aggregators"!

While they may sound similar, they serve entirely different purposes... Read Post

Setting Up Azure AD as a Federated Identity Provider

Imagine you run a growing organization where employees need access to AWS services... Read Post

Using Nginx to Front Both Backend and Frontend

When setting up a web application with a Spring Boot backend and a React frontend, you can choose to deploy them directly or use Nginx as a reverse proxy... Read Post

PostgreSQL Transactions - Part 2

How transactions, isolation levels, locking mechanisms ensures data consistency, reliability, and optimal performance in database operations... Read Post

PostgreSQL Transactions - Part 1

When we think about database transactions, the focus is often on INSERT, UPDATE, or DELETE queries. But did you know that... Read Post

Stay Friends with the Console

IntelliJ makes running applications effortless, but it often abstracts the underlying commands developers should understand... Read Post

Invisible Ownership Subtasks

The best developers recognize that visible subtasks are only part of the picture. There's another category... Read Post

Correlating Bamboo Concepts with AWS ECS

When managing CI/CD pipelines with Atlassian Bamboo and deploying containerized workloads using AWS Elastic Container Service... Read Post

How Singleton Components Work with Thread Pools

Spring’s component model is built on the principle of singletons for many of its core beans, ensuring efficiency and consistency across your application... Read Post

How HashMap Handles Collisions

Collisions in a HashMap occur when multiple keys hash to the same bucket index... Read Post

Method-Level Authorization in Spring Security

In this post, we'll explore how to use Spring Security to control access both at the endpoint and method level using a sample project... Read Post