Skip to content

Latest commit

 

History

History
122 lines (73 loc) · 3.47 KB

File metadata and controls

122 lines (73 loc) · 3.47 KB

Tip: For best viewing in your IDE, use markdown preview (VS Code: Cmd+Shift+V on Mac, Ctrl+Shift+V on Windows/Linux)

Processor Modules (1-5)

Prerequisite: Complete Module 0 — Explore Your Deployment first.

You're building a real-time transaction processor. Transactions stream in every few seconds.

Store them using Redis data structures so each query is instant — no filtering, no sorting at query time.

The consumer.py reads from the Redis Stream and calls your modules. You just complete the TODOs.

Deploying Your Changes

After completing any module, deploy your changes (~10 seconds):

./sync-and-restart.sh

This uploads your processor/modules/*.py to Azure Files and restarts the processor.


Module 1: Ordered Transactions

Goal: How can we natively return the last 20 transactions?

Redis Solution: Lists — Docs

File: modules/ordered_transactions.py

Stuck? solutions/ordered_transactions.py

Complete Module 2 before deploying — the Transactions tab needs both.


Module 2: Store Transaction

Goal: How can we natively return the details for each transaction?

Redis Solution: JSON — Docs

File: modules/store_transaction.py

Stuck? solutions/store_transaction.py

Deploy & Test:

./sync-and-restart.sh

Unlocks: Transactions tab on UI


Module 3: Spending Categories

Goal: How can we natively return the top spending categories and merchants?

Redis Solution: Sorted Sets — Docs

File: modules/spending_categories.py

Stuck? solutions/spending_categories.py

Deploy & Test:

./sync-and-restart.sh

Unlocks: Categories tab on UI


Module 4: Spending Over Time

Goal: How can we natively return spending analytics over a period of time?

Redis Solution: TimeSeries — Docs

File: modules/spending_over_time.py

Stuck? solutions/spending_over_time.py

Deploy & Test:

./sync-and-restart.sh

Unlocks: Spending Chart on UI


Module 5: Vector Search

Goal: How can we natively return transactions from a natural language input?

Redis Solution: Vector Search + RedisVL — Vector Search Docs | RedisVL Docs

File: modules/vector_search.py

Stuck? solutions/vector_search.py

Deploy & Test:

./sync-and-restart.sh

Unlocks: Transaction Search on UI

Note: Embeddings only apply to new transactions after restart.


✅ Coding Modules Complete!

You've built a complete transaction processor using:

  • Lists for ordered data
  • JSON for document storage
  • Sorted Sets for rankings
  • TimeSeries for analytics
  • Vector Search for AI-powered queries

Next: Module 6 — Observability with AMR