New from O’Reilly: The memory architecture behind adaptive AI agents

Read the report

Blog

RedisMart: A Fully-Featured Retail Application With Redis

July 29, 20218 minute read
Dylan Kreisman

Do you remember RedisConf’s keynote demo? If yes, you might enjoy seeing the behind-the-curtain development of the retail application (RedisMart) that was presented. If not, then it’s time to watch Yiftach and Ash present it. Here’s the link to the video again:

This article is the first of a series. It gives you some insights into the main requirements and the architecture of the RedisMart retail application by looking at how you can implement a product catalog, a distributed real-time inventory, and an AI-powered product search. You’ll also see how Redis Enterprise powers all those functionalities.

Requirements

As often in software development, let’s start by discussing some basic requirements. Here are some informally noted user stories:

  • As a retail customer:
    • I want to have fast (<100ms end-to-end latency) access to catalog and product details by being able to find productsbased on a variety of criteria (e.g., full-text, price ranges, ratings of other customers, or faceted search). High response times result in high bounce rates.
    • If I don’t know a product’s brand name or want something similar to what I purchased before, I’d like to shop for products by image. It would be cool to find a camera that’s a close match or visually similar to what I have.
    • I want to have a safe delivery or be able to buy online and pick up in the store or curbside (click and collect).
  • As an inventory manager:
    • I need to have an accurate, real-time view of my inventory to provide a superior fulfillment experience for my customers.
    • I want to optimize my inventory to keep high-demand items in stock and reduce stock of slow moving goods.
    • I need a near real-time view of inventories across different stores and/or fulfillment centers in order to optimize stock.

Architecture

Now that we know the requirements, let me draw an idea of how Redis is able to help us:

  • RediSearch enables rich product searches with numeric filters, full-text search, geo-indexing, scoring, and aggregations.
  • Redis Enterprise’s Active-Active feature provides geo-replicated real-time updates across inventories out of the box.
  • RedisAI, RedisGears, and RediSearch are leveraged for building a database-integrated machine-learning pipeline for real-time inference and vector-similarity search.
RedisMart application blog post image