
Learn to build scalable, performant reactive microservices with Spring WebFlux and Redis, including caching, pub-sub, real-time websockets, and a geospatial restaurant locator.
Discover how Redis, an in-memory data structure server, delivers sub-millisecond responses, supports lists, sets, and maps, and acts as cache, message queue, and pub/sub alongside traditional databases.
Set up redis using docker, run a redis server on port 6379, and interact with it via the cli inside the docker container, using commands and a cheat sheet.
Set up Redis on Mac with a command install, run server in a terminal and the client in another; Windows lacks an easy executable, use the official tutorial or WSL.
Learn to access all Redis keys using scan, paginate with a cursor, and filter with match patterns, while avoiding keys in production for debugging and learning.
Learn to delete Redis keys by removing single or multiple user keys and tracking affected counts. Understand pattern limits and how to reset the database with flushdb.
Learn how Redis expiring keys work, set and extend time-to-live, read TTLs, and apply to session tokens and time-limited access like movie rentals and seat holds.
Learn how to control Redis key expiration using exact timestamps or millisecond precision, and how updating values can preserve, reset, or remove the expiry.
Explore set options XX and NX in Redis, which perform conditional writes based on key presence. See how these options affect set and get results.
Learn how the exists command checks key presence in Redis at scale, offering a fast alternative to scanning thousands of keys, with 1 for present and 0 for not.
Learn how Redis incr and decr commands increment or decrement values, auto-create missing keys as zero, and handle floats with incrbyfloat.
Demonstrate a practical rate limit design using a time window and quotas, showing how a 100 calls per 10 minutes rule, expiring keys, and expiration notifications control access.
Learn how to store a user as a Redis hash, with fields like name and age, and access or update individual fields using hash operations.
Explore Redis hashes, viewing all field keys with hkeys and values with hvals, and checking existence with hexists. Delete a single field with hdel or remove the hash with del.
learn how to implement a Redis-backed message queue by pushing order objects onto a list and having payment services pop and process actions such as charge or refund.
Explore using a Redis list as a stack, implementing last-in, first-out behavior with push and pop operations, inspecting length, range, and automatic key removal when empty.
Explore Redis set operations for managing unique items, including adding, checking membership, viewing cardinality, listing members, and removing or popping elements for cases like active users and blacklisted IP addresses.
Apply Redis set operations to match candidates with required skills by using intersection, union, and difference to filter for knowledge of Java, JavaScript, or both, and exclude undesired traits.
Master sorted sets in Redis by using zadd, noting score comes before member, and using zrange and zrevrange to view ranks and top items.
Discover how Redis operates as a priority queue to rank orders by score, prioritizing prime users and moving high-priority items to the front for efficient shipping.
Explore how Redis handles concurrent updates on a single thread, showing how a transaction groups balance transfer commands to execute atomically or roll back to preserve consistency.
Demonstrates using Redis transactions with multi and exec to run multiple commands as a single block, watch keys to detect conflicts, and rollback with discard when needed.
Explore an in-memory key-value data store with lists, sets, hashes, and sorted sets; learn commands like get, set, expire, and transaction patterns using watch, multi, exec, and discard.
Explore the three Java Redis clients—Jedis, Lettuce, and Redisson—highlighting reactive streams support and Spring Data integration for Java Spring Boot apps, including hash, list, set, and map structures.
Set up a project in your IDE and create a playground inside an empty directory, then copy dependencies. Re-import to fix issues, including project reactor and unit test dependencies.
Master Redisson usage for Java Spring Boot developers by configuring a single-server setup, creating a programmatic config, establishing a connection, and exposing reactive operations for Redis tasks.
Create a base abstract test class with before all and after all hooks, using a static instance and a shared plan to streamline setup and teardown across multiple tests.
Explore Redisson codec and data serialization options, from string and long values to lightweight binary formats like protocol Bofors, and observe how storage differs by codec.
Learn how to set and extend bucket expiry in Redis, using time units and delays to simulate expiration, and manage session lifetimes by extending from 10 seconds to 60 seconds.
Explore how to treat multiple buckets as a single map in a reactive redis context, building test data with sample key-value pairs, and retrieving a map of names and values.
Configure an expired event listener to react when Redis keys expire. Enable key space notifications via a permanent release configuration file or a runtime configuration to observe expirations across apps.
Configure a deleted event listener in Redis to receive notifications when an object is deleted, with a non-expiring listener active until deletion and multiple listeners notified via a lambda-based implementation.
Learn how to model Redis maps as Java maps with reactive types, performing put, get, and map operations to store user data (name, city) and validate key-value storage.
Create and manage a users map in Redis, storing user objects as JSON values with integer keys, then retrieve all users or query by id, using Jackson serialization.
Demonstrates map cache in Relisten, showing per-field expiry within a hash, storing two student objects with five- and ten-second lifetimes and validating expiration via get.
Explore how the local cache map loads a complete hash copy for instant reads, and compare the three sink strategies—none, invalidate, and reconnect—for update behavior.
Demonstrates creating two observers for a local cached map, using a local copy for reads, and testing updates under various strategies like none, clear, and reconnect.
Use a local cache map to hold configuration properties and push updates to all service instances in real time, avoiding restarts by propagating changes through a config server.
Learn to make a list behave as a queue and as a stack using Java collections, including queue operations with poll and peek, and using deque to simulate both behaviors.
Learn to implement a blocking message queue with a producer and multiple consumers, simulate a never-ending stream of items, and observe item distribution across consumers and basic processing concepts.
Learn how HyperLogLog provides memory-efficient, probabilistic estimates of unique items like IP addresses and visits in high-volume systems, without storing every item. Compare it to sets for scalable unique counts.
Explore pub-sub as a broadcast model where a producer publishes to a topic and all online subscribers receive updates, unlike a queue that distributes items to one consumer.
Explore the pub-sub pattern by subscribing to multiple channels or a single room, using topic-based filters and a reactive type to receive string messages, with channels that start with Slack.
Learn how batching with Redis pipeline reduces network calls and boosts throughput, as you collect items into lists and sets and execute them in one go.
Explore how Redis sorted sets order items by score, compare add and add score behavior, and retrieve items by rank in ascending or descending order.
Design a priority queue solution that processes prime users first, then standard users, and finally free trial users, to improve order processing when many orders arrive per second.
Learn to implement a reactive priority queue solution for Java Spring Boot, modeling users with category-based scores, and a producer-consumer workflow that prioritizes primaries first.
Explore solving a priority queue ordering issue by adding a double-score mechanism to break ties and prioritize items by arrival order.
Explore caching with Redis in a spring boot app, showing how caching avoids repeated queries and external calls to boost throughput and response time.
Compare Spring Data Redis and Redisson in a reactive Spring Boot setup, demonstrating value and hash operations and high-volume performance tests, with Redisson showing faster performance and noting reactive limitations.
Explore the cache-aside pattern in a spring boot app using Redis to boost performance and reduce database load by checking the cache, computing on miss, and updating the cache.
Create a fibonacci service in Spring Boot app with a rest controller exposing a get endpoint for an index, using a recursive exponential algorithm and noting performance under heavy requests.
Demonstrates enabling Redis-backed caching in a Spring Boot app using @Cacheable and a cache manager to store computed results and speed up repeated calls.
Explain how Spring's @Cacheable uses method parameters as the hash key, diagnose unnecessary recalculation, and show how to fix by using an index-based key for efficient caching.
Schedule cache eviction in a Redis app by setting a fixed-rate window (every 10 seconds) to clear all keys, demonstrating scheduled method execution.
Learn how cacheable annotations skip or run method executions and how cache put updates or evicts entries, including before-invocation options, illustrated by a weather service refreshing data for zip codes.
Leverage the cacheable annotation with a scheduled refresh to serve up-to-date weather and zip data without slow external calls. As users log in, cached results surface instantly.
Analyze the limitations of the cache model in reactive Java Spring Boot, including no automatic expiry and restricted annotation support. Discover practical workarounds for reactive publishers and data structure choices.
Build a reactive city service client in a Spring Boot app, consuming an external service on localhost:3030 to fetch city data by zip code, including state name and temperature.
In this reactive cache aside demo, test your application with and without the cache to observe slow performance absent cache and fast performance after caching.
Explore ttl settings in reactive redis for java spring boot, enabling per-entry expiry with map cache by passing a time unit and auto removing entries after ten seconds.
Demonstrates a scheduled, reactive update of city data in a Spring Boot app, refreshing a city map by zip code every 10 seconds with asynchronous retrieval and resilience.
Build a simple, PostgreSQL-backed reactive Spring project, run a baseline performance test with Gemito, then add 3-D into the architecture and compare results.
Develop a simple product service using a reactive repository: define a product entity with id, description, and price; implement repository, service, and controller to fetch and update products.
set up postgres in docker with two containers, create a user and password, and map volumes to preserve data. expose port 5432 and provide admin credentials for queries.
Launch as a Spring component on app startup to load schema and seed the product table in a local PostgreSQL database.
Demonstrate testing a data setup service by sending get and put requests with Postman to localhost, verify 200 responses, and ensure PostgreSQL-backed get/put operations work.
Set up JMeter to load test your application and measure performance on a single local machine, then add Redis to the architecture and rerun the same script to compare results.
Explore how to use JMeter for performance testing, building get and post requests, using a preprocessor for random numbers, and interpreting throughput and response times.
Run a baseline test using the debugging script, switch to GUI mode to warm up, then run five minutes and review the aggregate report showing 36,600 requests per second.
Integrate Redisson into the architecture by adding the Spring Data dependency and wiring it into the product service. Create V1 endpoints and versioned controllers to support multiple product versions.
Explore the template method design pattern to create a generic cache template. Implement get from cache, fall back to the source, and update or delete the cache.
Implement a reactive cache template in a Spring environment, extending the cache and using a repository and map. Handle get, update, delete, and insert flows for cache and source synchronization.
Complete the V2 service using a cache template for product entities, adding get, update, and delete operations in a Spring service and product controller, then resolve Spring Data model conflicts.
Demonstrates a reactive Redis caching workflow for a product service, including get, update, delete, eviction, database synchronization, and a post-restart performance test.
Drive performance testing with warm-up and five-minute load tests, ignore the initial warm-up results, and observe Redis caching boost that raises throughput from about 600 to 1600 requests per second.
Develop a product service with a local cached map by extending the gas template, adopting reactive cache options, and performing asynchronous updates to keep caches synchronized.
Deploy two product service v3 instances to run the performance test and validate that both instances show the same data while creating, updating, and deleting records via the cache template.
Conducted a performance test and observed throughput 7,200 requests per second in the 30-second window; longer duration and more memory may improve results, and local cache map options boost performance.
Track real-time product visits to surface the daily top three products, with a periodic update every three seconds and an endpoint for business users.
Convert a periodically updating map into a reactive stream for product visit service using flux from iterable map, then update product scores in a batch and subscribe to push results.
Build a reactive business metrics service in Spring Boot that streams top three products by view count, preserves order with a linked hash map, and updates periodically using flux.
Demonstrates generating lightweight load on a running app, accessing localhost, and observing metrics for top products with periodic updates. The demo lets business users monitor product performance.
Build a real-time chat application using WebSocket for two-way browser-server communication, and apply pub/sub to broadcast messages across multiple server instances.
Develop a chat room service with a reactive WebSocket handler, where the backend subscribes to incoming messages and broadcasts them to all clients via a pub/sub topic.
Demonstrates broadcasting chat messages using a per-room topic in a Redis reactive setup, converting text inputs to WebSocket messages and publishing to subscribers for real-time delivery.
Configure a WebSocket handler and mapping to a chat room service, wire a map of chat rooms with a default room, and derive the user from the handshake.
Test a WebSocket chat application using a Chrome WebSocket test plan; two browser windows simulate users, verify messages flow in real time, with Redis and server running.
Develop a basic chat interface by copying a ready-made HTML template, setting name and room fields, and wiring the start button to open a WebSocket connection and send messages.
Learn to implement client-side JavaScript for a chat app: wire DOM controls, reveal the chat after start, and manage a WebSocket connection.
Establish a dynamic WebSocket connection from client-side JavaScript, using window.location.hostname to target the server, and handle onopen, onmessage, and onclose to build a live chat history.
Develop client side javascript to send chat messages by pressing the send button, build a sender and message object, serialize to a string, and transmit via WebSocket.
watch a live chat demo where users join rooms, exchange messages, and identify missing chat history, then tackle an assignment to implement persistent storage using Redis, MySQL, PostgreSQL, or MongoDB.
Learn to implement chat history in a reactive Redis setup by maintaining a list of messages, adding new messages before publishing, and replaying history to joining clients.
Learn how to run the same Spring Boot application in two distinct instances on different ports, verify inter-instance communication, and preserve history.
Discover the Redis acl introduction, learning to manage default users, set passwords, enable or disable accounts, and view the current user to control privileges.
Learn to configure Redis ACLs by creating users, assigning or revoking command and key access, using aliases like all commands, and enforcing safe defaults to prevent dangerous permissions.
Learn how to set credentials in Redisson by configuring a username and password (password is one, two, three) and resolve permission issues blocking commands.
Learn to secure the default passwordless Redis user by setting and authenticating with a password, then remove it to revert to the original behavior.
Explore geospatial indexing in Redis to store earth-based objects, query distance and radius, and build a simple real estate example that shows nearby houses or theaters by zip code.
Build a Texas restaurant locator by parsing a JSON file into restaurant objects (name, zip, lat, lon) with Jackson, using a utility to list restaurants for a given zip.
Add restaurant data with longitude and latitude into a geospatial structure, then perform radius-based geo searches to find nearby venues, using current location or zip code when needed.
Create a geo location helper and a zip-based search that maps zip codes to geolocation, then perform a reactive radius search to retrieve nearby restaurants.
Create a restaurant locator service in a Spring reactive project by scaffolding a new app, adding a controller and service, and setting up test data with zip codes.
Develop the restaurant locator service by wiring geolocation logic, supporting a zip-based query and a radius, exposing a rest controller, and visualizing results on a Google Map.
Copy the entire restaurant locator frontend code into the static resources. Start the Spring project and test the restaurant locator service.
Test the restaurant locator demo by running the app on localhost:800 and verify nearby restaurants are returned, then change zip codes to see venues like KFC and Jack in the Box.
Unlock the full potential of Spring WebFlux, a reactive and non-blocking web stack that outperforms traditional Spring Web MVC. In a Microservices architecture, where network calls to databases or external APIs are common, optimizing performance and scalability is crucial. This course delves into techniques for reducing unnecessary network calls, minimizing heavy recomputation, and maximizing the scalability of your Microservices.
By the end of this course, you will gain proficiency in:
Microservices Caching with Redis: Harness the power of Redis, explore various Redis data structures, leverage caching patterns, and implement cache eviction strategies. Learn to capture expired and deleted events from Redis and utilize Redis for rate limiting, batching, and transactions.
Spring Data Reactive Redis / Redisson: Utilize a Java library for Redis that supports reactive streams. Implement cache-aside patterns for reactive types, create a generic cache template, and integrate Spring Data Reactive Redis with your applications.
Redis as a Message Queue: Discover how Redis can serve as a powerful message queue in a Microservices architecture. Implement a priority queue using Redis and leverage Redis Pub/Sub for messages broadcasting.
WebFlux WebSocket + Redis PubSub: Develop a chat application using Spring WebFlux WebSocket, enabling real-time messaging and broadcasting messages using Redis Pub/Sub. Create chat rooms and explore trend finding based on user views.
Geospatial Data: Dive into Redis' geospatial data structure and develop a restaurant locator application using Spring WebFlux and Redis. Locate nearby restaurants based on user-provided zip codes.
Throughout the course, practical examples and demonstrations reinforce your learning. In addition, a JMeter performance test showcases an impressive 80% performance improvement.
Join this course to elevate your Spring WebFlux skills, optimize Microservices performance, and unlock the vast capabilities of Redis for scalable and efficient applications.