Beyond Caching: Building an ASP.NET Core 7 Blazor App with Redis for Real-Time Updates

Introduction

Recently, I’ve been exploring Redis and its potential beyond merely being a cache service. In this post, I’ll show you how to use Redis as a fast and scalable data store for your .NET 7 applications. We’ll create a Blazor Server application with a .NET 7 minimal API back end that uses Redis to implement a real-time scoreboard for multiple players. I’ll also discuss why and when to use Redis, and how it differs from other data stores.

Redis: What’s the Big Deal?

Redis is a fully managed, in-memory data store providing high performance, availability, and scalability for your applications. It supports various data structures such as strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs, streams, and geospatial indexes. Additionally, it supports transactions, Lua scripting, Pub/Sub messaging, and cluster mode for horizontal scaling and high availability.

While commonly used as a cache service to reduce latency and load, Redis can serve as a primary data store for specific use cases that require rapid and frequent read/write operations on small pieces of data.

Read More »