{{>toc}} h1. Demo scenario h2. E-commerce website ECommerce website depending only on Redis to garanty performances for end-users experience. h2. Product catalog Products are stored in MongoDB. Which is slow and expensive. h3. 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 h3. Write-through When a change is made the in the online catalog, it needs to be immediately reflected in the backoffice. h2. Price management Prices are managed in a PostgreSQL database from a legacy system. h3. 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 h2. Stocks management Stocks are managed by a REST API microservice to automatically trigger alerts and restock h3. Read-through h3. Write-through * Add a REST API webservice connector * Add a write-through rule to update the stock management system synchronously