Skip to main content
Loading page…
Python Mastery
Chapter 31
Lesson 4 of 4
Putting It Together
Contents
Notes
Tutor
Concept
The Polyglot Persistence Decision Guide
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
22 min
9 activities
0 of 9 done
In this lesson
1
The Polyglot Persistence Decision Guide
2
Redis Caching a Slow MongoDB Query
3
Async Drivers: redis.asyncio and Motor
4
A Minimal FastAPI Service With Redis + MongoDB
5
Production Checklist
6
Cache-Aside Request Flow
7
Which Store Handles It Best?
8
Why Use Motor Instead of PyMongo in FastAPI?
9
Choosing the Right Store
Objectives
Apply a decision framework to choose between PostgreSQL, Redis, and MongoDB
Implement the cache-aside pattern to accelerate a slow MongoDB query using Redis
Describe the async drivers (motor, redis.asyncio) and when to use them
Explain polyglot persistence and name a realistic example architecture
Further reading
redis-py documentation
PyMongo documentation
Chapter 31 · NoSQL with Redis & MongoDB
SQL vs NoSQL
Redis with redis-py
MongoDB with PyMongo
Putting It Together
Previous: MongoDB with PyMongo
Next: Routes & the Dev Server