Skip to content
JavaAgentic

Type at least two characters. Try “RAG”, “pgvector” or “tool calling”.

Java Tutorials

241 published guides across 4 roadmaps and 25 phases, ordered so each one only assumes what came before. Every tutorial ships complete, runnable code.

Refresh the modern Java and Spring Boot foundations every AI integration builds on: records, virtual threads, reactive streams, and containers.

Beginner6 min read

Java 17 to 21 — What's New for AI Developers

The Java 17-to-21 features that matter most for AI work: records, sealed classes, pattern matching, text blocks and virtual threads — each shown with a concrete AI use case.

Read tutorial
Beginner4 min read

Functional Programming in Java for AI Pipelines

Functional Java refreshed for AI work: streams for document pipelines, Optional for safe metadata access, and CompletableFuture for concurrent model calls — with practical examples.

Read tutorial
Intermediate4 min read

Reactive Programming with Project Reactor

Project Reactor for AI developers: Mono, Flux, back-pressure and WebFlux — and the one place they are genuinely the right tool, streaming LLM tokens to a browser.

Read tutorial
Intermediate5 min read

Microservices Architecture Deep Dive

Microservices patterns that matter for AI systems: API gateway, circuit breakers around model calls, the saga pattern for agent workflows, and where an AI service fits in the topology.

Read tutorial
Intermediate4 min read

Containerization with Docker & Kubernetes

Containerize and deploy a Spring Boot AI application: a production Dockerfile with layered JARs, Kubernetes deployment with secrets for API keys, health probes and resource limits.

Read tutorial
Beginner4 min read

Modern Build Tools & Dependency Management

Maven and Gradle for Java AI projects: managing Spring AI and LangChain4j versions with BOMs, multi-module layout for projects with separate ingestion and serving, and dependency hygiene.

Read tutorial

Phase 1Spring AI

13/13 published

Wire large language models into Spring Boot with Spring AI — chat clients, embeddings, RAG, tool calling, structured output, and production observability.

Beginner8 min read

Introduction to the Spring AI Framework

What Spring AI is, how its abstractions map onto Spring concepts you already know, when to choose it over LangChain4j, and a working ChatClient example in under five minutes.

Read tutorial
Beginner6 min read

Setting Up Spring AI with OpenAI

A complete Spring Boot + OpenAI setup: dependencies, API key management, model options, timeouts, retries and the five errors every developer hits on the first run.

Read tutorial
Beginner8 min read

The Spring AI ChatClient API

Master the Spring AI ChatClient: system messages, prompt templates, streaming with SSE, chat memory, advisors and per-call options — with complete Spring Boot code.

Read tutorial
Beginner5 min read

Prompt Engineering for Java Developers

Prompt engineering explained for engineers, not marketers: system prompts, few-shot, delimiters, output contracts and grounding — each as testable Spring AI code, not vibes.

Read tutorial
Intermediate6 min read

Spring AI Embeddings & Vector Stores

How embeddings and vector stores work in Spring AI, with a complete pgvector Spring Boot setup — schema, indexes, metadata filtering, dimensions and the mistakes that force a re-ingest.

Read tutorial
Intermediate8 min read

Building a RAG Pipeline with Spring Boot

Build a production RAG pipeline in Spring Boot: document ingestion, chunking, pgvector retrieval, the QuestionAnswerAdvisor, citations, evaluation and the failure modes nobody warns you about.

Read tutorial
Intermediate8 min read

Spring AI Function Calling & @Tool

How Spring AI function calling works, with complete @Tool examples: registering tools, typed parameters, error handling, the agent loop, and how to stop a tool-using model doing damage.

Read tutorial
Intermediate4 min read

Structured Output with Spring AI

Turn LLM responses into typed Java objects with Spring AI: BeanOutputConverter, .entity(), generic lists, enums and validation — the reliable alternative to parsing text by hand.

Read tutorial
Intermediate4 min read

Multimodal AI with Spring Boot

Send images and audio to vision models from Spring Boot with Spring AI: the Media API, image analysis, document extraction from scans, and handling multimodal input safely.

Read tutorial
Intermediate4 min read

Spring AI with Ollama (Local LLMs)

Run local LLMs in Spring Boot with Spring AI and Ollama: setup, model selection, offline development, cost and privacy trade-offs, and when a local model is the right call.

Read tutorial
Advanced4 min read

Spring AI Observability & Monitoring

Instrument Spring AI with Micrometer and OpenTelemetry: token and cost metrics per feature, latency tracking, tracing model calls, and dashboards that catch a cost problem before the invoice does.

Read tutorial
Advanced5 min read

Security in AI-Powered Spring Applications

Secure a Spring Boot AI application against the OWASP LLM Top 10: prompt injection defenses, output validation, rate limiting, PII handling and safe tool authorization — with code.

Read tutorial
Advanced4 min read

Testing AI Applications

How to test non-deterministic AI code in Spring Boot: mocking the ChatModel for unit tests, golden datasets for retrieval, property-based assertions, and LLM-as-judge for quality.

Read tutorial

Master LangChain4j end to end: AI Services, document loaders, splitters, embedding stores, retrievers, memory, and tool-using agents.

Beginner6 min read

LangChain4j Introduction & Architecture

A complete LangChain4j introduction for Java developers: core abstractions, the AiServices declarative style, memory, tools and retrieval — plus an honest comparison with Spring AI.

Read tutorial
Beginner3 min read

LangChain4j Chat Models

Configure chat models in LangChain4j: OpenAI, Anthropic Claude, Google Gemini, Mistral and Ollama — with streaming, timeouts, retries and how to swap providers without touching your code.

Read tutorial
Intermediate4 min read

LangChain4j Chains & Composition

Compose multi-step LLM workflows in LangChain4j: sequential chains, routing by classification, and building custom chains from AI Services — when to chain and when a single call suffices.

Read tutorial
Intermediate3 min read

LangChain4j Document Loaders

Load documents into LangChain4j from files, URLs, S3, GitHub and more, and parse PDF, DOCX and HTML with Apache Tika — the ingestion front-end for any RAG pipeline in Java.

Read tutorial
Intermediate4 min read

LangChain4j Text Splitters

Chunk documents effectively in LangChain4j: the recursive splitter, chunk size and overlap tuning, splitting code and markdown, and why chunking is the highest-impact decision in RAG.

Read tutorial
Intermediate3 min read

LangChain4j Embedding Models

Configure embedding models in LangChain4j: hosted models like OpenAI and Cohere, free in-process ONNX models, dimension matching, and choosing an embedding model for RAG.

Read tutorial
Intermediate3 min read

LangChain4j Embedding Stores

Store and search vectors in LangChain4j: the in-memory store for tests, PgVector for production, Redis and Elasticsearch, plus metadata filtering and picking the right store.

Read tutorial
Advanced3 min read

LangChain4j Retrievers & RAG

Build RAG in LangChain4j with ContentRetriever: attach retrieval to AI Services, transform queries, re-rank results, and assemble an advanced RAG pipeline with the RetrievalAugmentor.

Read tutorial
Advanced5 min read

LangChain4j Agents & Tools

Build tool-using agents in LangChain4j: the @Tool annotation, how the agent loop works, bounding iterations, safe write tools and the ReAct pattern — with production-ready code.

Read tutorial
Intermediate4 min read

LangChain4j Chat Memory

Add conversation memory to LangChain4j AI Services: message and token windows, per-user memory with @MemoryId, persistent stores, and why unbounded memory breaks in production.

Read tutorial
Intermediate4 min read

LangChain4j Structured Output

Return typed objects from LangChain4j AI Services: POJO and record return types, enums, lists, JSON schema mode and validation — no manual parsing of model responses.

Read tutorial

Phase 3Agentic AI

13/13 published

Go from LLM calls to autonomous systems: ReAct, plan-and-execute, reflection, agent memory, multi-agent orchestration, evaluation and guardrails.

Beginner7 min read

What Is Agentic AI? A Complete Guide

A clear, hype-free explanation of agentic AI: how it differs from generative AI, the five components of an agent, when autonomy is worth it, and when a plain workflow is the better engineering choice.

Read tutorial
Intermediate4 min read

Agent Architecture Patterns

The core agent architecture patterns explained with Java: ReAct, plan-and-execute, reflection, orchestrator-worker and routing — when to use each, and why simpler is usually better.

Read tutorial
Intermediate4 min read

Tool Use & Function Calling

How agents use tools well: designing tool schemas, dynamic tool selection, composing tools into workflows, error recovery, and keeping the tool set small enough to choose from.

Read tutorial
Advanced4 min read

Planning & Reasoning in Agents

How agents plan and reason: task decomposition, hierarchical planning, chain-of-thought and tree-of-thought — with Java examples and honest guidance on when planning helps.

Read tutorial
Advanced4 min read

Memory Systems for Agents

How agent memory works beyond a chat window: working, episodic and semantic memory, vector-based recall, memory consolidation, and implementing persistent agent memory in Java.

Read tutorial
Advanced4 min read

Multi-Agent Systems (MAS)

Building multi-agent systems in Java: orchestrator-worker coordination, agent handoffs, communication protocols and conflict resolution — and the honest case for when one agent is better.

Read tutorial
Intermediate4 min read

Agent Frameworks Compared

A practical comparison of agent frameworks for Java developers: LangChain4j, Spring AI, and how the Python ecosystem (LangGraph, CrewAI, AutoGen) compares — plus when to use no framework at all.

Read tutorial
Advanced4 min read

Building Autonomous Coding Agents

Design autonomous coding agents in Java: code generation with verification, review agents that bias for precision, refactoring and test-generation agents — with the guardrails they need.

Read tutorial
Advanced4 min read

Agent Evaluation & Testing

How to evaluate and test AI agents: trajectory analysis, benchmarking, hallucination detection, outcome verification and human-in-the-loop evaluation — with Java patterns.

Read tutorial
Advanced4 min read

Agentic RAG — Advanced Patterns

Advanced RAG where the model controls retrieval: self-RAG, corrective RAG, adaptive retrieval and query planning — when to let an agent decide whether and what to retrieve, in Java.

Read tutorial
Intermediate4 min read

Human-in-the-Loop (HITL) Systems

Design human-in-the-loop AI systems in Java: approval flows for agent actions, escalation patterns, confidence thresholds and feedback loops — how to deploy autonomy without accepting unbounded risk.

Read tutorial
Expert4 min read

Productionizing Agentic Systems

Take agents to production: per-run budgets and step caps, guardrails, durable execution, scaling on the JVM, cost control and the operational patterns that keep agents from causing incidents.

Read tutorial
Intermediate5 min read

Ethical AI & Responsible Agent Design

Build responsible AI agents: managing bias, ensuring transparency and accountability, designing for contestability, and the engineering practices that make agents safe and fair.

Read tutorial

The model-side knowledge that separates an integrator from an AI engineer: transformers, fine-tuning, vector search internals, evaluation and LLMOps.

Intermediate4 min read

Foundation Models Deep Dive

Understand the foundation models you build on: GPT, Claude, Gemini, Llama and Mistral families, how they differ, and a practical framework for choosing a model for your Java application.

Read tutorial
Advanced4 min read

Transformer Architecture Explained

The transformer architecture explained for engineers, not researchers: self-attention, multi-head attention, positional encoding and why it explains context limits, token cost and hallucination.

Read tutorial
Advanced4 min read

Fine-Tuning LLMs: LoRA & QLoRA

Understand fine-tuning for engineers: LoRA and QLoRA, instruction tuning, RLHF and DPO, and the crucial decision of when to fine-tune versus when retrieval or prompting is the better tool.

Read tutorial
Advanced4 min read

Vector Databases Deep Dive

How vector databases work under the hood: the HNSW index, approximate nearest-neighbour search, cosine vs Euclidean distance, product quantization and metadata filtering — for Java developers.

Read tutorial
Advanced4 min read

Embedding Models & Semantic Search

How embedding models power semantic search: bi-encoders vs cross-encoders, re-ranking, hybrid search combining keywords and vectors, and choosing embeddings for retrieval quality.

Read tutorial
Intermediate4 min read

Prompt Engineering Masterclass

Advanced prompt engineering techniques: prompt chaining, meta-prompting, self-consistency, structured reasoning and prompt optimization — beyond the basics, for reliable production prompts.

Read tutorial
Intermediate4 min read

Tokenization & Context Windows

Understand tokens and context windows: how BPE tokenization works, why code costs more tokens, managing the context budget, and the token math behind LLM cost — for Java developers.

Read tutorial
Advanced4 min read

LLM Evaluation & Benchmarks

How to evaluate LLMs and LLM applications: what public benchmarks like MMLU and HumanEval measure, their limits, and building a custom evaluation suite that reflects your real task.

Read tutorial
Expert4 min read

Model Distillation & Quantization

Make models smaller and faster: quantization (GGUF, GPTQ, AWQ), knowledge distillation, the accuracy-vs-efficiency trade-off, and when self-hosting a compressed model makes sense.

Read tutorial
Advanced4 min read

Guardrails & Safety Systems

Build guardrails around LLMs: input filtering, output validation against schemas and rules, content moderation, jailbreak defense and layered safety — deterministic controls in Java.

Read tutorial
Advanced4 min read

LLMOps & MLOps for Generative AI

The operational practice of running LLM features: prompt versioning, evaluation in CI/CD, model registries, A/B testing and canary rollouts of prompt and model changes — for Java teams.

Read tutorial
Intermediate4 min read

GenAI on AWS, Azure & GCP

Run generative AI on the major clouds from Java: Amazon Bedrock, Azure OpenAI and Google Vertex AI compared, with Spring AI and LangChain4j integration and how to choose.

Read tutorial

Phase 5Patterns

10/10 published

Architectural patterns for shipping AI inside real systems: streaming APIs, event-driven pipelines, semantic caching, multi-tenancy and low-latency serving.

Intermediate4 min read

Building AI-Powered REST APIs

Design robust AI REST APIs in Spring Boot: streaming with Server-Sent Events, async processing for long tasks, timeouts, back-pressure and the API patterns that make AI features reliable.

Read tutorial
Advanced4 min read

Event-Driven AI Architectures

Build event-driven AI systems with Kafka and Spring Boot: async AI processing pipelines, decoupling model calls from request threads, dead-letter handling and back-pressure for LLM workloads.

Read tutorial
Intermediate4 min read

AI in CI/CD Pipelines

Integrate AI into CI/CD pipelines: automated code review, test generation, documentation and PR triage — with the precision discipline and guardrails that keep these bots useful, not noisy.

Read tutorial
Advanced4 min read

AI-Powered Search Applications

Build AI-powered search in Java: hybrid keyword-plus-vector search, faceted filtering, query understanding, personalization and re-ranking — beyond both keyword search and naive RAG.

Read tutorial
Intermediate4 min read

Chatbot & Conversational AI Architecture

Design production chatbots in Java: intent classification, dialog state management, slot filling, multi-turn context, tool integration and handoff to humans — beyond a single ChatClient call.

Read tutorial
Intermediate4 min read

AI for Data Engineering

Apply LLMs to data engineering in Java: text-to-SQL with safety guards, AI-assisted data cleaning, schema mapping and anomaly detection — where AI helps and where it must be constrained.

Read tutorial
Advanced4 min read

AI Observability & LLM Tracing

Observe LLM applications in production: distributed tracing of model and retrieval calls, LangFuse and OpenTelemetry GenAI conventions, span attributes, and cost dashboards for Java teams.

Read tutorial
Expert5 min read

Multi-Tenant AI Architectures

Build multi-tenant AI systems in Java: strict tenant isolation in retrieval, per-tenant quotas and rate limits, cost allocation, and data residency — keeping tenants apart safely at scale.

Read tutorial
Advanced4 min read

AI Caching Strategies

Cut LLM cost and latency with caching: exact-match caching, semantic caching by embedding similarity, provider prompt caching, and invalidation — with Redis and Java examples.

Read tutorial
Expert4 min read

Low-Latency LLM Serving

Serve LLMs with low latency: time to first token, streaming, continuous batching, vLLM and TGI, speculative decoding, and the latency levers available whether you self-host or use an API.

Read tutorial

Phase 6Advanced

10/10 published

Where the field is heading: multimodal agents, GraphRAG, small language models, enterprise agent platforms, regulation, and your career roadmap.

Advanced4 min read

Multimodal Agents

Build multimodal agents that reason over images, audio and screens: vision-language agents, document-understanding agents, computer-use patterns and the guardrails they need.

Read tutorial
Intermediate4 min read

Code Generation & AI-Assisted Development

How AI code generation works and how to use it well: repository context, code LLMs, evaluating generated code, and the judgement to accept, verify or reject what the model produces.

Read tutorial
Advanced4 min read

AI for DevOps & SRE

Apply AI to DevOps and SRE in Java: incident investigation agents, LLM log analysis, alert correlation and runbook automation — with the read-only-first, human-approved discipline ops demands.

Read tutorial
Advanced4 min read

GraphRAG & Knowledge Graphs

Go beyond vector RAG with GraphRAG: knowledge graphs in Neo4j, entity and relationship extraction, graph retrieval for multi-hop questions, and when a graph beats a vector store.

Read tutorial
Intermediate4 min read

Small Language Models (SLMs)

When smaller models win: SLMs like Phi and Gemma, on-device and edge AI, model routing between small and large models, and the cost and latency case for not always reaching for the biggest model.

Read tutorial
Advanced4 min read

AI Agents for the Enterprise

Deploy AI agents in the enterprise: integrating with SAP, Salesforce and ServiceNow, SSO and identity, audit trails, approval workflows and the governance enterprise agents require.

Read tutorial
Expert5 min read

Federated Learning & Privacy-Preserving AI

Privacy-preserving AI techniques for engineers: federated learning, differential privacy, PII redaction, secure processing and the practical patterns for handling sensitive data with LLMs.

Read tutorial
Intermediate4 min read

AI Regulations & Compliance

What developers need to know about AI regulation: the EU AI Act risk tiers, GDPR for AI, ISO 42001 and the NIST AI RMF — and the engineering practices that keep AI systems compliant.

Read tutorial
Intermediate4 min read

Open Source vs Proprietary AI Strategy

Choose an AI model strategy: open-weight vs proprietary hosted models, total cost of ownership, vendor lock-in risk, hybrid approaches and migration paths — a decision framework for Java teams.

Read tutorial
Beginner6 min read

Future of AI & Career Roadmap

The Java developer to AI engineer career path: the skills that matter, how to build a portfolio, where the field is heading, and how to keep learning in a fast-moving space.

Read tutorial

Enterprise Backend

68/68 published

From Spring Boot novice to enterprise architect

Stop treating Spring Boot as magic. Auto-configuration, the IoC container lifecycle, AOP proxies, caching, scheduling, JPA and Redis — how each one actually works, and what breaks when it does not.

Intermediate6 min read

Spring Boot Auto-Configuration Deep Dive

How Spring Boot auto-configuration actually works: the import selector, the @Conditional family, ordering rules, the --debug report, and how to write your own starter.

Read tutorial
Intermediate6 min read

Spring IoC Container Internals

The Spring container from the inside: the full bean lifecycle in order, what BeanPostProcessor actually intercepts, every bean scope, and how circular dependencies are resolved.

Read tutorial
Beginner5 min read

Configuration & Profiles Mastery

Type-safe configuration with @ConfigurationProperties, the full property precedence order, relaxed binding rules, profile groups, and keeping secrets out of your YAML.

Read tutorial
Advanced6 min read

Spring AOP & Aspect-Oriented Programming

Spring AOP from pointcut syntax to proxy mechanics: the five advice types, writing annotation-driven aspects, aspect ordering, and why self-invocation silently does nothing.

Read tutorial
Intermediate5 min read

Actuator & Observability Endpoints

Every Actuator endpoint worth exposing, writing custom health indicators for Kubernetes probes, adding Micrometer metrics that answer real questions, and securing it all.

Read tutorial
Intermediate6 min read

Spring Boot Testing Masterclass

A test strategy that stays fast: when to use @SpringBootTest versus a slice, real databases with Testcontainers and @ServiceConnection, stubbing HTTP with WireMock, and context caching.

Read tutorial
Beginner7 min read

Exception Handling & Error Response Design

A consistent error contract for a Spring Boot API: an exception hierarchy worth having, @ControllerAdvice done properly, RFC 7807 ProblemDetail, and validation errors clients can act on.

Read tutorial
Intermediate6 min read

Caching Strategies in Spring Boot

Spring cache abstraction in practice: @Cacheable key design, choosing between Caffeine and Redis, per-cache TTLs, cache stampedes, and a two-level cache that survives a Redis outage.

Read tutorial
Intermediate7 min read

Scheduling & Async Processing

Scheduled tasks and async methods done properly: fixedRate versus fixedDelay, sizing executors, exception handling that does not silently swallow, and distributed locking with ShedLock.

Read tutorial
Intermediate8 min read

Spring Data JPA Deep Dive

Entity mapping that scales: relationship pitfalls, diagnosing and fixing the N+1 problem, derived queries versus Specifications, pagination that stays fast, and JPA auditing.

Read tutorial
Intermediate5 min read

Redis with Spring Boot

Redis beyond caching: choosing the right data structure, distributed locks that are actually safe, Redis Streams as a queue, and configuring Lettuce for Sentinel and Cluster.

Read tutorial
Beginner7 min read

Validation & Data Integrity

Jakarta Bean Validation in Spring Boot: the full constraint set, custom validators, validation groups, cross-field rules, method validation and where each layer belongs.

Read tutorial
Beginner8 min read

Logging & Debugging in Production

Logging that helps at 3am: choosing levels that mean something, MDC correlation IDs across threads, structured JSON output, async appenders, and what must never be logged.

Read tutorial
Intermediate6 min read

File Handling & Object Storage

Handling uploads and downloads safely: multipart limits, detecting real content types with Tika, streaming large files, S3 and MinIO integration, and presigned URLs.

Read tutorial

Phase 2REST APIs

10/10 published

Design APIs other teams enjoy consuming: correct resource modelling and status codes, versioning that survives contact with real clients, pagination, rate limiting, RFC 7807 errors, GraphQL and WebSockets.

Beginner6 min read

REST API Design Principles

The decisions that make an API pleasant to consume: resource naming, method semantics and idempotency, choosing the right status code, HATEOAS, and the Richardson maturity model.

Read tutorial
Beginner7 min read

Spring REST Controllers Deep Dive

Everything a Spring controller can bind, how ResponseEntity builds responses properly, content negotiation, custom argument resolvers, and keeping controllers thin.

Read tutorial
Beginner6 min read

API Documentation with OpenAPI

Generating documentation people actually use: springdoc-openapi setup, annotations worth adding, grouping large APIs, documenting errors and auth, and the API-first workflow.

Read tutorial
Intermediate5 min read

API Versioning Strategies

Comparing URI, header, query and media-type versioning honestly, deciding what counts as breaking, running two versions at once, and retiring one without breaking clients.

Read tutorial
Beginner7 min read

Pagination, Filtering & Sorting

Pagination that stays fast at depth: why OFFSET degrades, keyset and cursor pagination, dynamic filtering with Specifications, safe sorting, and the RFC 8288 Link header.

Read tutorial
Intermediate7 min read

Rate Limiting & Throttling

The five rate-limiting algorithms compared, distributed limiting with Redis and Bucket4j, per-tier quotas, and the response headers clients need to behave well.

Read tutorial
Intermediate5 min read

Error Handling with Problem Details

Designing an error contract on RFC 7807: the standard fields, extension properties worth adding, an error catalogue, internationalised messages, and errors across service boundaries.

Read tutorial
Intermediate7 min read

WebClient & HTTP Client Integration

Calling other services without taking yourself down: WebClient configuration, the four timeouts that matter, connection pool sizing, retry with backoff, and testing against a real socket.

Read tutorial
Advanced5 min read

GraphQL with Spring Boot

Building a GraphQL API with Spring for GraphQL: schema-first mapping, solving N+1 with batch mapping, field-level authorisation, and the query limits every public endpoint needs.

Read tutorial
Advanced6 min read

WebSocket & Real-Time Communication

Real-time push in Spring: STOMP over WebSocket, broadcasting and user-targeted messages, authenticating the handshake, scaling with an external broker, and when SSE is the better fit.

Read tutorial

The whole distributed-systems toolkit: decomposing by bounded context, discovery, gateways, resilience, sagas and the outbox pattern, tracing, containers, Kubernetes and service mesh.

Intermediate6 min read

Microservices Decomposition Patterns

Finding service boundaries that hold: decomposing by business capability and subdomain, context mapping patterns, the anti-corruption layer, and the strangler fig migration.

Read tutorial
Intermediate5 min read

Service Discovery & Registration

Client-side versus server-side discovery, running Eureka properly including self-preservation, Consul as an alternative, and why Kubernetes usually makes a separate registry unnecessary.

Read tutorial
Intermediate6 min read

API Gateway with Spring Cloud Gateway

Building an edge gateway: route predicates, the filter catalogue, custom global filters for auth and correlation, Redis rate limiting, and circuit breakers at the edge.

Read tutorial
Intermediate5 min read

Inter-Service Communication Patterns

Choosing how services talk: synchronous REST and gRPC versus asynchronous messaging, the coupling each creates, correlation propagation, and graceful degradation.

Read tutorial
Advanced5 min read

Circuit Breakers & Resilience4j

Resilience4j in production: how the circuit breaker state machine works, tuning the sliding window, combining retry and bulkhead correctly, and the decorator order that matters.

Read tutorial
Advanced5 min read

Distributed Tracing & Observability

Distributed tracing that actually helps: spans and trace context, W3C propagation across HTTP and messaging, sampling strategies, and correlating traces with logs and metrics.

Read tutorial
Advanced7 min read

Distributed Transactions & Saga Patterns

Why two-phase commit fails in microservices, choreography versus orchestration sagas, compensating transactions, the transactional outbox, and idempotent consumers.

Read tutorial
Advanced6 min read

Event-Driven Microservices

Designing events that last: domain versus integration events, Avro and schema registry compatibility, event sourcing basics, ordering guarantees and schema evolution.

Read tutorial
Advanced5 min read

Microservices Testing Strategies

A testing strategy for distributed systems: where the pyramid changes shape, consumer-driven contract testing, component tests with Testcontainers, and why end-to-end tests fail you.

Read tutorial
Intermediate5 min read

Containerizing Spring Boot with Docker

Building small, fast, secure Spring Boot images: multi-stage builds, BuildKit cache mounts, layered jars, JVM container awareness, distroless bases and vulnerability scanning.

Read tutorial
Advanced6 min read

Kubernetes for Java Microservices

Running Spring Boot on Kubernetes properly: liveness versus readiness probes, JVM memory inside cgroups, resource requests and limits, autoscaling, and zero-downtime rollouts.

Read tutorial
Advanced5 min read

Service Mesh with Istio

What a service mesh moves out of your application: automatic mTLS, VirtualService routing, outlier detection, authorization policies, fault injection and progressive delivery.

Read tutorial
Advanced6 min read

The Microservices Observability Stack

Assembling logs, metrics and traces into something usable: PromQL that answers real questions, the Grafana stack, golden signals, and alerts that mean something.

Read tutorial
Advanced5 min read

Microservices Security Patterns

Securing a distributed system: authentication at the edge, mTLS and workload identity between services, token propagation without over-trust, API keys and secret management.

Read tutorial
Intermediate5 min read

Spring Cloud Config & Centralised Configuration

Centralised configuration done safely: Config Server with a Git backend, client bootstrap and fail-fast, @RefreshScope, encrypted values, and when Kubernetes ConfigMaps are enough.

Read tutorial

Phase 4Messaging

11/11 published

Both brokers, properly. AMQP exchanges and routing, Kafka partitions and consumer groups, Spring AMQP and Spring Kafka, Kafka Streams, Connect, production operations — and a framework for choosing between them.

Beginner7 min read

Messaging Fundamentals & Patterns

The vocabulary and patterns every broker shares: point-to-point versus publish-subscribe, competing consumers, acknowledgement modes, dead-letter queues and delivery guarantees.

Read tutorial
Beginner6 min read

RabbitMQ Architecture & Core Concepts

AMQP 0-9-1 from the ground up: the four exchange types and when each fits, queue properties, bindings and routing keys, prefetch and fairness, and publisher confirms.

Read tutorial
Intermediate6 min read

Spring AMQP & RabbitMQ Integration

Spring AMQP in production: RabbitTemplate and message converters, @RabbitListener containers, manual acknowledgement, retry with backoff, and a dead-letter topology that works.

Read tutorial
Advanced5 min read

RabbitMQ Advanced Patterns

Beyond basic queues: quorum queues and Raft, clustering and partition handling, federation and shovel for multi-datacentre, priority and lazy queues, and delayed delivery.

Read tutorial
Beginner6 min read

Apache Kafka Architecture & Core Concepts

How Kafka actually works: the partitioned log, leaders and in-sync replicas, producer acks and idempotence, consumer groups and rebalancing, and offset management.

Read tutorial
Intermediate7 min read

Spring Kafka Integration

Spring for Apache Kafka in production: KafkaTemplate, @KafkaListener containers, JSON serialisation without trusting the wire, DefaultErrorHandler with backoff, and dead-letter topics.

Read tutorial
Advanced5 min read

Kafka Streams & Stream Processing

Stream processing without a cluster: KStream and KTable semantics, stateless and stateful operations, windowing, joins, exactly-once v2 and testing with TopologyTestDriver.

Read tutorial
Advanced5 min read

Kafka Connect & Data Integration

Moving data in and out of Kafka without writing code: source and sink connectors, Debezium change data capture, single message transforms, and running Connect in distributed mode.

Read tutorial
Advanced5 min read

Kafka in Production

Running Kafka for real: partition and cluster sizing, retention versus compaction, the metrics that predict incidents, the CLI tools worth knowing, and geo-replication.

Read tutorial
Advanced5 min read

Kafka vs RabbitMQ — A Decision Framework

A practical comparison across throughput, latency, ordering, replay, routing and operational cost — with the use cases each one clearly wins, and when to run both.

Read tutorial
Intermediate6 min read

Spring Cloud Stream & Message-Driven Services

One programming model over Kafka and RabbitMQ: functional bindings, destination configuration, per-binder tuning, dead-letter handling and the in-memory test binder.

Read tutorial

Phase 5DevOps

10/10 published

Everything between "it works on my machine" and "it survives Black Friday": pipelines, Docker, Kubernetes rollouts, Terraform, OpenTelemetry, Flyway, JVM tuning, load testing and disaster recovery.

Intermediate5 min read

CI/CD Pipeline Design for Java

A pipeline that stays fast as the codebase grows: stage design, GitHub Actions with dependency and Docker caching, test parallelisation, and quality gates that catch real problems.

Read tutorial
Intermediate5 min read

Docker in CI/CD & Production

Container builds that are fast and trustworthy: BuildKit cache and secret mounts, tagging strategy, registry choice, vulnerability scanning, SBOM generation and image signing.

Read tutorial
Advanced6 min read

Kubernetes Deployment Strategies

Shipping without downtime: rolling update mechanics, blue-green switching, canary with automated analysis, and GitOps reconciliation with Argo CD.

Read tutorial
Intermediate6 min read

Infrastructure as Code for Java Apps

Provisioning the infrastructure a Java service needs: Terraform state and locking, reusable modules, managed databases and brokers, and where Pulumi fits.

Read tutorial
Advanced5 min read

Production Observability — Full Stack

Assembling a production observability stack: the OTel agent and collector pipelines, Mimir, Loki and Tempo, alerting strategy that avoids fatigue, and runbooks that get used.

Read tutorial
Intermediate5 min read

Production-Grade Application Configuration

Configuration that survives production: the 12-factor principles applied to Java, property precedence, fail-fast validation, feature flags, and graceful shutdown done properly.

Read tutorial
Beginner5 min read

Database Migrations with Flyway

Schema changes you can deploy safely: Flyway naming and ordering, repeatable migrations, baselining an existing database, and expand-and-contract for zero downtime.

Read tutorial
Advanced6 min read

Performance Tuning & JVM Optimisation

Diagnosing and fixing JVM performance: the memory model, choosing and tuning a collector, reading GC logs, profiling with JFR and async-profiler, and container-aware settings.

Read tutorial
Advanced5 min read

Load Testing & Capacity Planning

Finding your limits before users do: the five load test types, writing k6 and Gatling scenarios, the metrics that matter, and turning results into a capacity plan.

Read tutorial
Advanced5 min read

Disaster Recovery & High Availability

Planning for failure: defining RPO and RTO honestly, replication trade-offs, multi-region topologies and their costs, DNS failover, and testing recovery before you need it.

Read tutorial

The senior-engineer layer: GoF patterns as Spring actually uses them, CQRS and event sourcing, DDD in practice, transaction semantics, API security, gRPC, sharding and enterprise integration patterns.

Intermediate5 min read

Design Patterns for Java Backends

The GoF patterns as Spring actually implements them, the ones worth writing yourself, and modern Java alternatives using records, sealed types and pattern matching.

Read tutorial
Advanced6 min read

CQRS & Event Sourcing

Separating reads from writes: CQRS without event sourcing, event stores and aggregate replay, building projections, snapshots, and an honest account of when not to use either.

Read tutorial
Advanced6 min read

Domain-Driven Design in Practice

DDD applied rather than described: choosing aggregate boundaries, value objects that enforce invariants, repositories, hexagonal architecture, and running an event storming session.

Read tutorial
Intermediate6 min read

Transaction Management Deep Dive

Transactions beyond the annotation: every propagation mode and when it applies, isolation levels and the anomalies they prevent, transaction-bound events, and why XA lost to sagas.

Read tutorial
Advanced6 min read

API Security & the OWASP API Top 10

The API-specific vulnerability classes and their Spring fixes: broken object-level authorization, mass assignment, unrestricted consumption, SSRF, and API inventory management.

Read tutorial
Advanced6 min read

gRPC in Java Microservices

gRPC for internal service calls: Protocol Buffers and schema evolution, the four RPC types, deadlines and interceptors, Spring Boot integration, and an honest comparison with REST.

Read tutorial
Advanced6 min read

Database Sharding & Scaling Strategies

Scaling past one database: read replicas and routing, choosing a shard key you will not regret, hash versus range sharding, cross-shard queries, and migrating without downtime.

Read tutorial
Advanced5 min read

Enterprise Integration Patterns

The vocabulary of system integration: routers, splitters, aggregators, content enrichers and the claim check, implemented with Apache Camel and Spring Integration.

Read tutorial

Spring Security

40/40 published

From basic authentication to zero-trust architecture

The filter chain, and every way to prove who someone is: passwords, JWT, OAuth 2.0, OIDC, SAML, LDAP — plus the authorisation models and cryptography you build on top of them.

Beginner6 min read

Spring Security Architecture Deep Dive

How Spring Security actually works: the filter chain and its ordering, SecurityContextHolder, the AuthenticationManager delegation model, and where to plug in custom logic.

Read tutorial
Beginner5 min read

Password Management & Encoding

Storing passwords properly: choosing between BCrypt, Argon2 and scrypt, DelegatingPasswordEncoder for zero-downtime migration, strength rules, and breached-password checks.

Read tutorial
Beginner6 min read

HTTP Basic & Form-Based Authentication

The two classic authentication mechanisms: when Basic is appropriate, configuring form login properly, custom success and failure handlers, logout, and account lockout that is not a DoS.

Read tutorial
Beginner5 min read

In-Memory & JDBC Authentication

Where user credentials live: in-memory users for tests, JdbcUserDetailsManager and its schema, writing a custom UserDetailsService, and seeding an initial administrator safely.

Read tutorial
Intermediate7 min read

JWT Authentication Deep Dive

JWTs done safely: structure and claims, why RS256 beats HS256, key rotation with JWKS, the alg=none and key-confusion attacks, and how to revoke a stateless token.

Read tutorial
Advanced5 min read

OAuth 2.0 — The Complete Guide

OAuth 2.0 without the confusion: the four actors, the grants that still matter, why PKCE is mandatory, refresh token rotation, and what OAuth 2.1 removed.

Read tutorial
Advanced6 min read

Spring Authorization Server

Running your own OAuth 2.1 and OIDC provider: registering clients, persisting authorizations, JWK sources and key rotation, custom claims, and the consent page.

Read tutorial
Advanced6 min read

OAuth 2.0 Resource Server

Validating tokens correctly: NimbusJwtDecoder configuration, issuer and audience validators, mapping claims to authorities, opaque token introspection and multi-tenant decoding.

Read tutorial
Advanced5 min read

OpenID Connect (OIDC)

The identity layer on OAuth 2.0: what an ID token is and how to validate it, standard scopes and claims, discovery, and single logout across relying parties.

Read tutorial
Intermediate6 min read

Social Login — Google, GitHub, Microsoft

Adding sign in with Google, GitHub and Microsoft: client registration, mapping provider profiles to your user model, safe account linking, and the onboarding flow afterwards.

Read tutorial
Expert5 min read

SAML 2.0 Authentication

Enterprise SSO with SAML: the SP-initiated flow step by step, RelyingPartyRegistration, the assertion checks that matter, metadata exchange and single logout.

Read tutorial
Intermediate6 min read

LDAP & Active Directory Integration

Authenticating against a corporate directory: LDAP structure, bind versus password comparison, ActiveDirectoryLdapAuthenticationProvider, group-to-role mapping and LDAPS.

Read tutorial
Intermediate6 min read

Role-Based Access Control (RBAC)

Authorisation with roles: HTTP versus method security, role hierarchies, @PreAuthorize and @PostAuthorize, custom PermissionEvaluator, and where RBAC stops being enough.

Read tutorial
Advanced6 min read

Attribute-Based Access Control (ABAC)

When roles are not enough: the PDP/PEP model, Open Policy Agent and Rego, integrating OPA with Spring, and deciding between ABAC and a richer RBAC.

Read tutorial
Advanced6 min read

Cryptography & Encryption in Spring

Applied cryptography without inventing anything: choosing AES-GCM, envelope encryption, encrypting database columns with an AttributeConverter, and Vault Transit for key management.

Read tutorial

Phase 2OWASP

10/10 published

Each major web attack class, how it actually works against a Spring application, and the specific configuration or code that stops it — CSRF, CORS, headers, TLS, injection, XSS, uploads, SSRF and deserialisation.

Intermediate5 min read

CSRF Protection

How CSRF works, how Spring CsrfFilter stops it, SameSite cookies as a second layer, the double-submit pattern for SPAs, and exactly when disabling CSRF is correct.

Read tutorial
Intermediate5 min read

CORS Configuration

Understanding the same-origin policy, what preflight actually checks, configuring CORS in Spring correctly, and why allowedOrigins star with credentials is refused.

Read tutorial
Beginner5 min read

HTTP Security Headers

Every security header worth setting: what each one prevents, the values to use, Spring configuration, and how to roll out a Content Security Policy without breaking the site.

Read tutorial
Intermediate5 min read

SSL/TLS & HTTPS in Spring Boot

Configuring TLS properly: the handshake, keystores and PKCS12, HTTP to HTTPS redirect, mutual TLS for service-to-service, cipher policy, and where to terminate.

Read tutorial
Intermediate7 min read

SQL Injection Prevention

How SQL injection actually works, why parameterised queries stop it, the JPA and JdbcTemplate patterns that are safe, the ones that are not, and how to test for it.

Read tutorial
Intermediate6 min read

XSS Prevention

Stopping cross-site scripting: the three XSS types, why encoding must be context-aware, Thymeleaf escaping, OWASP Java Encoder, nonce-based CSP and sanitising rich text.

Read tutorial
Intermediate6 min read

File Upload Security

Every attack a file upload enables and its defence: extension allowlists, real content-type detection with Tika, path traversal, polyglot files, SVG, and safe serving.

Read tutorial
Intermediate6 min read

SSRF Prevention

Stopping server-side request forgery: why cloud metadata endpoints are the prize, validating URLs correctly, defeating DNS rebinding, and egress controls as a second layer.

Read tutorial
Advanced5 min read

Insecure Deserialisation

Why readObject on untrusted data is remote code execution, how gadget chains work, ObjectInputFilter as a mitigation, and the Jackson polymorphic typing configuration to avoid.

Read tutorial
Advanced6 min read

OWASP Top 10 for LLM Applications

Securing AI features in a Spring application: why prompt injection cannot be fully solved, treating model output as untrusted, capability scoping for agents, and cost-based denial of service.

Read tutorial

Beyond the login form: TOTP and WebAuthn second factors, session fixation and concurrency control, remember-me token rotation, single sign-on, and Kerberos for domain-joined intranets.

Advanced6 min read

Multi-Factor Authentication (MFA)

Implementing a second factor: TOTP enrolment and verification, recovery codes, trusted-device handling, and why WebAuthn is the endpoint worth aiming at.

Read tutorial
Intermediate6 min read

Session Management & Security

Sessions done safely: creation policies, session fixation defence, concurrent session limits, cookie flags that matter, and distributed sessions with Spring Session and Redis.

Read tutorial
Beginner5 min read

Remember-Me Authentication

Keeping users signed in safely: hash-based versus persistent tokens, series rotation and how it detects theft, cookie configuration, and invalidating on password change.

Read tutorial
Advanced6 min read

Single Sign-On (SSO)

Designing single sign-on across several applications: the trust model, choosing SAML or OIDC per tenant, silent authentication, single logout, and running Keycloak as the broker.

Read tutorial
Advanced6 min read

Kerberos & SPNEGO

Seamless Windows domain authentication: how Kerberos tickets work, SPNEGO negotiation over HTTP, keytab and SPN setup, Spring configuration, and diagnosing the usual failures.

Read tutorial

Proving the controls work and keeping them working: spring-security-test, penetration testing methodology, pipeline security gates, threat modelling and secrets management.

Intermediate6 min read

Testing Spring Security

Writing security tests that catch real gaps: @WithMockUser and @WithUserDetails, MockMvc request post-processors, testing method security, mock JWTs, and the negative tests that matter.

Read tutorial
Advanced6 min read

Penetration Testing for Java Apps

A structured approach to testing your own application: reconnaissance, authentication and authorisation testing, injection, business logic flaws, and the tools that help.

Read tutorial
Advanced5 min read

DevSecOps — Securing the Pipeline

Security gates that catch real problems without blocking delivery: pre-commit secret scanning, SAST with FindSecBugs, dependency and container scanning, DAST, and tuning out the noise.

Read tutorial
Advanced6 min read

Threat Modelling

Finding design flaws before they ship: drawing data flow diagrams, applying STRIDE per element, prioritising with DREAD, and running a session that produces actionable work.

Read tutorial
Intermediate5 min read

Secrets Management & Key Security

Getting secrets out of configuration: taking an inventory, Vault KV and dynamic database credentials, Kubernetes auth, the External Secrets Operator, and rotation that works.

Read tutorial

What auditors and regulators ask for, and the architecture that answers them: GDPR data-subject rights, tamper-evident audit logs, zero-trust design and cryptographic key management.

Intermediate6 min read

GDPR Compliance for Java Applications

Implementing the parts of GDPR that reach the code: data subject access and export, consent records, erasure through anonymisation, retention jobs, and breach notification.

Read tutorial
Advanced6 min read

Audit Logging & SIEM Integration

Building an audit trail that stands up to scrutiny: what to record, a structured event format, hash-chained tamper evidence, Hibernate Envers, and shipping to a SIEM.

Read tutorial
Expert6 min read

Zero-Trust Architecture

Building zero-trust in practice: the NIST model, workload identity with SPIFFE, mTLS everywhere, per-request authorization, micro-segmentation, and just-in-time access.

Read tutorial
Advanced6 min read

Cryptographic Key Management

Managing keys across their lifecycle: generation, storage in HSMs and KMS, envelope encryption, rotation without re-encrypting everything, and the key hierarchy that makes it work.

Read tutorial
Expert5 min read

SecureX — Zero-Trust Platform Architecture

The capstone architecture: an auth server, security gateway, OPA policy engine, secrets service, audit service and self-service portal, and how they fit together.

Read tutorial

Interview Prep

58/58 published

From core Java recall to production war stories

The questions every Java interview opens with, answered at the depth that separates a memorised answer from an understood one: the equals/hashCode contract, string interning, generics erasure, exception semantics and class initialisation order.

Beginner6 min read

The equals() and hashCode() Contract

Why overriding equals() without hashCode() breaks every hash-based collection, what the five contract rules guarantee, and the mutable-key bug that silently loses data.

Read tutorial
Beginner6 min read

Strings: Immutability, the Pool and StringBuilder

Why String is immutable and what that buys you, how the string pool and intern() really work, why == sometimes appears to work, compact strings, and when concatenation in a loop actually costs you.

Read tutorial
Beginner6 min read

OOP Principles the Interviewer Actually Probes

The OOP questions behind the textbook four: static vs dynamic dispatch, Liskov violations that compile cleanly, abstract class versus interface, and composition over inheritance.

Read tutorial
Intermediate6 min read

static, final and Class Initialisation Order

The exact order the JVM initialises a class, why a static final String can survive deleting the class that declared it, effectively final, and how two classes can deadlock while loading.

Read tutorial
Intermediate7 min read

Generics, Type Erasure and Wildcards

What the compiler removes and what it inserts, why you cannot create an array of a generic type, PECS explained by what it enables, bridge methods, and heap pollution from unchecked varargs.

Read tutorial
Intermediate6 min read

Immutable Objects & Defensive Copying

The five conditions for a genuinely immutable class, the leaked-collection bug that defeats final, why records are only shallowly immutable, and what final fields guarantee across threads.

Read tutorial
Intermediate5 min read

Comparable, Comparator and Sorting Contracts

Natural order versus external order, the total-ordering contract and the exception thrown when you break it, comparator chaining, the integer-overflow bug, and TimSort stability.

Read tutorial

Phase 2Java 8+

10/10 published

Functional Java as an interviewer probes it — not "name three functional interfaces" but why a lambda is not an anonymous class, how a stream pipeline actually executes, when parallel streams make things slower, and what Java 9 through 21 added on top.

Beginner5 min read

Java 8 Features: The Interview Overview

Every Java 8 feature an interviewer asks about, why each was added, and the one-sentence answer for each — lambdas, streams, Optional, default methods, java.time, CompletableFuture and Metaspace.

Read tutorial
Intermediate6 min read

Lambdas and invokedynamic: How They Really Work

Why a lambda is not an anonymous class, what invokedynamic and LambdaMetafactory do at first call, the allocation difference between capturing and non-capturing lambdas, and what this means.

Read tutorial
Intermediate5 min read

Stream API Fundamentals: Lazy Pipelines

How a stream pipeline actually executes: why nothing runs until the terminal operation, what short-circuiting really means, stateful versus stateless operations, and why a stream is single-use.

Read tutorial
Intermediate7 min read

Collectors, groupingBy and Downstream Collectors

The collector API in depth: multi-level groupingBy, downstream collectors, the toMap duplicate-key exception, the null-value trap, teeing and flatMapping, and writing a Collector by hand.

Read tutorial
Advanced6 min read

Parallel Streams and the Common ForkJoinPool

Why every parallel stream in your JVM shares one pool, which sources split well, the N times Q rule for deciding, and why a blocking call inside a parallel stream can stall the whole application.

Read tutorial
Beginner7 min read

Optional: Correct Use and Common Abuse

What Optional was designed for and what it was not, the orElse versus orElseGet trap that evaluates the fallback every time, chaining with map and flatMap, and why Optional fields are a mistake.

Read tutorial
Intermediate6 min read

Default & Static Methods in Interfaces

Why default methods were added, the three resolution rules when a class inherits conflicting defaults, calling a specific supertype with X.super.method(), and private interface methods.

Read tutorial
Beginner5 min read

The java.time API

Choosing between Instant, LocalDateTime and ZonedDateTime, Period versus Duration, what happens at a daylight-saving gap, and how to store timestamps so they survive a zone change.

Read tutorial

What is actually inside the collection you picked: array growth and copying, hash buckets and treeification, red-black trees, the difference between a fail-fast and a fail-safe iterator, and the memory each structure really costs per element.

Beginner6 min read

The Collections Framework Map

The interface hierarchy and what each contract promises, why some methods throw UnsupportedOperationException by design, and the differences between Arrays.asList, List.of and List.copyOf.

Read tutorial
Beginner6 min read

ArrayList vs LinkedList: Internals and Growth

What each one stores in memory, the 1.5x growth and array copy, why LinkedList loses even at insertion in the middle, and the per-element overhead that makes cache locality decide the winner.

Read tutorial
Intermediate7 min read

HashMap Internals: Buckets, Resize and Treeification

How HashMap stores entries, why the hash is XORed with its own high bits, what happens during a resize, when a bucket becomes a red-black tree, and the Java 7 race that caused infinite loops.

Read tutorial
Advanced7 min read

ConcurrentHashMap vs Hashtable vs synchronizedMap

How ConcurrentHashMap achieves concurrency without a global lock, why segments disappeared in Java 8, the computeIfAbsent deadlock, and why size() is only an estimate.

Read tutorial
Intermediate6 min read

TreeMap, LinkedHashMap and Building an LRU Cache

How TreeMap uses a red-black tree for sorted keys and range queries, how LinkedHashMap adds a doubly-linked list for ordering, and building an LRU cache in ten lines with removeEldestEntry.

Read tutorial
Beginner6 min read

HashSet, LinkedHashSet and TreeSet

Why every Set is a Map underneath, how iteration order differs, the TreeSet comparator-equality trap, EnumSet as a bit vector, and choosing a Set for concurrent access.

Read tutorial
Intermediate6 min read

Queues, Deques and BlockingQueues

The three method families and why Queue has three ways to insert, choosing between ArrayBlockingQueue and LinkedBlockingQueue, PriorityQueue as a binary heap, and the SynchronousQueue handoff.

Read tutorial
Intermediate6 min read

Fail-Fast vs Fail-Safe Iterators

How modCount makes an iterator fail fast, why removing inside a for-each throws, the four correct ways to remove while iterating, and what weakly consistent iteration actually promises.

Read tutorial
Intermediate7 min read

Choosing a Collection: Complexity and Memory Footprint

A complete Big-O table for every common collection, what each one actually costs per element in bytes, why boxing dominates numeric collections, and a decision procedure that fits on one page.

Read tutorial

The Java Memory Model and everything built on it: happens-before, why volatile is not a lock, how to size a thread pool from measurements rather than folklore, composing CompletableFuture chains, and diagnosing a deadlock from a thread dump.

Beginner7 min read

Threads: Lifecycle, Creation and What One Costs

The six thread states and what moves between them, why calling run() directly is a no-op, what a platform thread actually costs in memory and switching, and the interrupt protocol done properly.

Read tutorial
Advanced8 min read

synchronized, Locks and the Java Memory Model

What the Java Memory Model guarantees, why reordering and visibility are separate problems, what synchronized actually does beyond mutual exclusion, and when ReentrantLock earns its extra complexity.

Read tutorial
Intermediate7 min read

volatile, Atomics and the Visibility Problem

What volatile guarantees and what it does not, why count++ is broken even when volatile, how compare-and-swap works, when LongAdder beats AtomicLong, and the double-checked locking idiom.

Read tutorial
Intermediate7 min read

ExecutorService and Thread-Pool Sizing

How ThreadPoolExecutor decides whether to queue or grow, why newFixedThreadPool can exhaust the heap, sizing pools from measurements with Little law, and shutting down without losing work.

Read tutorial
Advanced6 min read

CompletableFuture and Async Composition

Composing async work without blocking: thenApply versus thenCompose, which thread runs each stage, combining with allOf and anyOf, timeouts, and how exceptions propagate through a chain.

Read tutorial
Advanced7 min read

Deadlock, Livelock and Starvation

The four conditions every deadlock needs and how breaking one prevents it, reading a deadlock out of a thread dump, lock ordering and tryLock, and the pool-starvation deadlock with no locks at all.

Read tutorial
Intermediate6 min read

CountDownLatch, Semaphore, CyclicBarrier and Phaser

The coordination primitives in java.util.concurrent, when a latch beats a barrier, using a semaphore as a bulkhead, and the AbstractQueuedSynchronizer that all of them are built on.

Read tutorial
Advanced6 min read

Virtual Threads and Structured Concurrency

How a virtual thread mounts and unmounts from a carrier, why pinning on synchronized still matters, why pooling virtual threads is wrong, and what StructuredTaskScope adds over raw futures.

Read tutorial

Heap, stack, metaspace and direct memory; every collector from Serial to ZGC and when each is the right answer; reading a GC log; the leak patterns that recur across every codebase; and the tooling that turns a guess into a measurement.

Intermediate6 min read

JVM Memory Areas: Heap, Stack, Metaspace, Direct

Every region the JVM allocates, which are per-thread and which are shared, why the heap is generational, where Metaspace lives since Java 8, and why total process memory always exceeds Xmx.

Read tutorial
Advanced6 min read

Reading GC Logs and Tuning Without Guessing

Enabling unified GC logging, reading a G1 log line by line, calculating allocation and promotion rates, identifying every Full GC cause, and the tuning changes that are usually wrong.

Read tutorial
Advanced7 min read

The Seven Classic Java Memory Leaks

The seven leak patterns that recur in every codebase, why a garbage-collected language leaks at all, how each one is diagnosed from a heap dump, and the code change that fixes each.

Read tutorial
Advanced6 min read

Every OutOfMemoryError and What It Means

Each OutOfMemoryError message, what it actually indicates, the most likely cause, and the first three things to check — plus why OOMKilled by the kernel is a different failure entirely.

Read tutorial
Advanced6 min read

Heap Dump Analysis with MAT

Capturing a heap dump safely in production, the difference between shallow and retained size, reading the dominator tree, using path to GC roots, and OQL queries that answer real questions.

Read tutorial
Advanced6 min read

JVM Flags and Container Awareness in Kubernetes

How the JVM reads cgroup limits, why MaxRAMPercentage beats Xmx in a container, how CPU quota affects GC and pool sizing, and why CPU limits cause latency spikes through throttling.

Read tutorial
Advanced6 min read

Profiling with JFR and async-profiler

Running JFR continuously in production, why traditional samplers suffer safepoint bias, reading a flame graph, allocation profiling, and choosing between CPU and wall-clock sampling.

Read tutorial
Expert8 min read

Object Layout, Escape Analysis and the JIT

How many bytes an object really costs, why compressed oops stop working above 32GB, how the JIT proves an object never escapes and removes the allocation, and what deoptimisation is.

Read tutorial

Nine outages, each told as it actually unfolds: the symptom on the dashboard, the commands that narrow it down, the root cause, the fix, and the guardrail that stops it recurring. This is the phase that gives you stories to tell.

Advanced6 min read

Debugging a 100% CPU Spike in Production

The exact command sequence that turns a pinned CPU into a line number: top -H, converting the thread id to hex, matching nid in a thread dump, and the four causes it usually turns out to be.

Read tutorial
Advanced7 min read

HikariCP Connection-Pool Exhaustion

The incident where every request times out waiting for a connection: how to read the HikariCP exception, find the leak with leakDetectionThreshold, and why a bigger pool usually makes it worse.

Read tutorial
Advanced6 min read

Thread-Pool Starvation and Queue Collapse

When every worker thread is blocked and the queue grows without limit: reading it from a thread dump, why an unbounded queue turns a slowdown into an outage, and isolating with bulkheads.

Read tutorial
Intermediate7 min read

The N+1 Query and the Endpoint That Got Slow

Why a lazy association turns one request into a thousand queries, how to detect N+1 in tests rather than production, JOIN FETCH versus EntityGraph, and the MultipleBagFetch and pagination traps.

Read tutorial
Advanced6 min read

Latency Spikes: Proving It Was (or Was Not) GC

A method for attributing p99 latency: correlating GC logs with request timings, why safepoint pauses hide outside GC, coordinated omission in load tests, and the causes that are not GC at all.

Read tutorial
Advanced7 min read

Cascading Failure: Timeouts, Retries and Backpressure

How one slow dependency takes down an unrelated service, why retries amplify an outage, setting a timeout budget across a call chain, and the four defences that contain the blast radius.

Read tutorial
Advanced7 min read

Cache Stampede, Hot Keys and Stale Reads

What happens when a popular cache entry expires under load, single-flight loading and probabilistic early expiry, sharding a hot key across a Redis cluster, and getting invalidation right.

Read tutorial
Intermediate7 min read

Capacity Planning: Finding the Knee Before Production Does

Finding the point where latency turns vertical, applying Little law to size pools and predict queueing, choosing headroom for failover and spikes, and running load tests that produce honest numbers.

Read tutorial

The rounds themselves: the coding screen and the handful of patterns it keeps reusing, the Spring question bank, backend system design under a whiteboard clock, behavioural answers that survive follow-up questions, and an eight-week plan that fits around a full-time job.

Intermediate7 min read

The Coding Round: Patterns That Keep Coming Back

The six patterns that cover most coding-screen questions, with Java templates, the language-specific traps that cost points, and how to talk while you code without losing your place.

Read tutorial
Intermediate7 min read

Spring & Spring Boot Interview Questions

The Spring questions asked at every level answered with mechanisms: how auto-configuration decides, why self-invocation breaks @Transactional, proxy modes, bean scopes and testing slices.

Read tutorial
Advanced8 min read

System Design for Java Backend Engineers

A 45-minute structure that works: clarify and estimate, data model first, then the API, then scale what the numbers say to scale — plus idempotency, the outbox pattern and talking in numbers.

Read tutorial
Beginner8 min read

The Behavioural Round: STAR Stories for Engineers

Why the behavioural round is scored harder than candidates expect, the six stories that cover almost every question, how to quantify impact honestly, and surviving the follow-up questions.

Read tutorial
Beginner7 min read

The Eight-Week Preparation Plan

A week-by-week plan that fits into eight hours a week: what to cover when, how to use spaced repetition on the topics you forget, when to start applying, and how to handle the offer stage.

Read tutorial