SpringBoot
7 items
Series Posts
Part 0: Redis Deep Dive: From Cache to AI Memory
An extensive 8-part Redis tutorial series written for senior engineers. It follows the story of Maya, a Staff Engineer at GlobalMart, who transforms a struggling monolith into a distributed, AI-powered platform using Redis.
Part 1: "The Database Meltdown" — The In-Memory Revolution
Maya faces her first Black Friday at GlobalMart. The relational database is collapsing under read-heavy traffic. We explore the physics of disk I/O versus RAM, the single-threaded event loop architecture of Redis, and implement the Cache-Aside pattern in Spring Boot.
Part 2: Building the Engine — Azure Compute Services
CloudVault needs to deploy its microservices. Marcus explores four compute options—Virtual Machines, App Service, Azure Functions, and Containers. We build a production-ready Java Spring Boot API and learn when to use each service for different workloads.
Part 2: "Beyond Strings" — The Anatomy of Data Structures
GlobalMart needs a real-time leaderboard. We move beyond simple key-value caching to explore the internal implementations of Redis data structures: Strings (SDS), Hashes (ZipList), Sets, and Sorted Sets (Skip Lists). We build a high-performance leaderboard using Spring Data Redis.
Part 4: "The Memory Limit" — Eviction Policies and Approximated LRU
GlobalMart hits physical RAM limits, causing OOM crashes. We explore memory management, the maxmemory directive, and how Redis uses an ingenious probabilistic approximated LRU algorithm to evict keys without the overhead of a true linked list.
Part 7: "Semantic Discovery" — Vector Embeddings and HNSW Graphs
Keyword search is failing. We introduce Redis Stack and RediSearch to build a "Find Similar Products" feature. We dive deep into vector embeddings, distance metrics (L2, Cosine), and how the Hierarchical Navigable Small World (HNSW) algorithm achieves logarithmic search times.
Part 8: "The Intelligent Agent" — Production RAG Architectures
Maya builds an AI shopping assistant. We move from naive retrieval to a production-grade Retrieval-Augmented Generation (RAG) system. We cover chunking strategies, hybrid search (combining vectors with metadata filters), and using Redis as conversational memory for LLMs.