Demo scenario¶
E-commerce website¶
ECommerce website depending only on Redis to garanty performances for end-users experience.
Product catalog¶
Products are stored in MongoDB. Which is slow and expensive.
Read-through¶
- Add a connection to Mongo database
- Add a Read-Through rule with transformation to fetch products from Mongo to Redis on demand
- Add a long TTL to Redis stored products
- Add auto-refresh in Redis products on TTL expiration
- Add a Redis Query Engine index to search the products
- Add prefetch to prefetch the catalog in Redis at startup and make search more meaningful
Write-through¶
When a change is made the in the online catalog, it needs to be immediately reflected in the backoffice.
Price management¶
Prices are managed in a PostgreSQL database from a legacy system.
Read-Through¶
- Add a PostgreSQL connection
- Add a Read-Through rule with transformation to fetch product prices
- Add auto-refresh in Redis stocks on read operation (first read is fast but maybe stale, second read is slower but accurate)
- Add prefetch to prefetch the stocks in Redis at startup
Stocks management¶
Stocks are managed by a REST API microservice to automatically trigger alerts and restock
Read-through¶
Write-through¶
- Add a REST API webservice connector
- Add a write-through rule to update the stock management system synchronously