This is a submission for the Redis AI Challenge: Beyond the Cache.
What I Built
I built an E-Commerce System that goes beyond just using Redis as a caching solution. This application leverages Redis 8's powerful capabilities such as data persistence, search functionality, streams, and pub/sub to create a dynamic e-commerce environment.
Product Management:
Users can manage products, search for them, and view detailed information in real time.
Order Processing:
A system that listens for new orders, processes them, and updates product stock accordingly.
Inventory Updates:
Inventory changes are reflected live using Redis' Pub/Sub and streams, keeping the UI updated with minimal delay.
Demo
You can see the application in action here:
Below are some screenshots showcasing the interface:
- Main Product Management Dashboard
- Order Processing Interface
- Redis running on docker container
Project Link https://github.com/CliffordIsaboke/Real-Time-AI-Innovators-Redis-Beyond-the-Cache-.git
How I Used Redis 8
I used Redis 8 in various ways, stepping beyond its typical use as a cache. Here's a breakdown of how Redis was used:
Primary Database:
Redis is used as the main database for storing product information. Each product is stored as a JSON document and indexed for quick retrieval using Redis' RediSearch module.
Search Functionality:
Redis' RediSearch module enables product search using full-text search and filtering. Users can search for products based on their name, description, or price, with the search results appearing instantly.
Streams & Pub/Sub:
Streams are utilized for order management, allowing new orders to be processed and tracked in real-time.
Pub/Sub is used for live inventory updates. When an inventory change happens (e.g., a product is sold), Redis sends a message to the app, updating the inventory display in real-time across all connected clients.
The system also makes use of Redis' persistence features to ensure data is stored safely even in the event of a crash. Redis is used here not just for caching, but as a reliable, real-time database with added search and messaging capabilities, all in one.
Top comments (0)