Skip to content

redis-developer/acct-ac-demo

Repository files navigation

Redis Account Auto-complete

Contents

  1. Summary
  2. Features
  3. Prerequisites
  4. Installation
  5. Usage
  6. Screenshots

Summary

This is a Javascript-based demo of Redis Suggest functionality. Synthetic account data is generated with Faker (1M accounts). Each account has the following fields:

  • name: fake account name
  • subsidiary: fake account name
  • region: one of the continents
  • branch code: 'B-' and a random 5 character alphanumeric
  • internal code: 'I-' and a random 5 character alphanumeric

Name, subsidiary, branch and internal code are all added to 1 Redis Suggest dictionary. Each dictionary entry has a payload field equal to the full colon-separated concatenation of all the fields for that account. Example:

> FT.SUGGET acctDict Weis WITHPAYLOADS
1) "Weissnat Inc"
2) "Kerluke, Auer and Altenwerth:Weissnat Inc:Asia:B-YV4ev:I-rdW1C"
3) "Weissnat LLC"
4) "Weissnat LLC:Robel, Runolfsdottir and Smitham:North America:B-lpgjB:I-hhC3y"
5) "Weissnat - Von"
6) "Weissnat - Von:Hackett - Ankunding:Africa:B-rr7TE:I-KTQva"
7) "Weissnat - Toy"
8) "Kessler - Roberts:Weissnat - Toy:North America:B-cRmYJ:I-CIbiI"
9) "Weissnat - Kub"
10) "Tromp LLC:Weissnat - Kub:Africa:B-NLKgE:I-vw78X"

Features

  • ExpressJS-based REST API server, synthetic data generation + load functionality, and HTML GUI to demonstrate address autocomplete.

Prerequisites

  • Docker
  • Docker Compose

Installation

git clone [email protected]:redis-developer/acct-ac-demo.git && cd acct-ac-demo

Usage

Start-up

./start.sh

Shutdown

./stop.sh

GUI Access

http://localhost:8000

Screenshots

Data Load

This screen is displayed until all 1M entries have been loaded into Redis. load

Name Auto-complete (Account or Subsidiary)

name

Branch Code Auto-complete (Account or Subsidiary)

code