By Kevin McAleer, 5 Minutes
Page last updated November 24, 2026

By the end of this lesson you will be able to match a maker job to the right Redis feature, and know where to learn more.
You started by installing Redis and saying PONG to it. You finished with a robot and a dashboard sharing live readings, a job queue and a leaderboard through one small server. Along the way you met every major piece of Redis:
| Lesson | What you learned | Robot or maker use |
|---|---|---|
| Redis basics | Keys, set and get, incr, the Python client |
Latest sensor reading, a boot counter |
| Data types | Strings, hashes, lists, sets, sorted sets | Choosing the right shape |
| Commands and transactions | Pipelines, MULTI and EXEC, no rollback, error handling |
Updating state together |
| Lists | rpush, blpop, ltrim |
A job queue, the last N readings |
| Sets | sadd, scard, sinter |
Unique visitors, who came both days |
| Hashes | hset, hgetall, hincrby |
A robot’s whole state in one key |
| Sorted sets | zadd, zrange, zincrby |
Leaderboards and fastest times |
| Pub/sub | publish, subscribe |
Live readings to a dashboard |
| Expiry and persistence | TTL, RDB snapshots, the AOF | Caches, heartbeats, surviving a restart |
| Telemetry hub | All of the above together | A robot and dashboard system |
When you start a new project, ask what you need to do with the data:
flowchart TD
Q{"What do I need?"} -->|"Remember one value"| S["String"]
Q -->|"Remember several facts about one thing"| H["Hash"]
Q -->|"Work through jobs in order"| L["List"]
Q -->|"Count unique things"| T["Set"]
Q -->|"Rank things"| Z["Sorted set"]
Q -->|"Tell others right now"| P["Pub/sub"]
Q -->|"Forget it after a while"| E["Add a TTL"]
Remember the two main cautions from the course. Pub/sub forgets messages that nobody was listening for, and Redis transactions do not roll back. And keep your server private: a default Redis has no password, so never expose its port to the internet.
stop job onto the queueteam prefix to every key and run two hubs side by side on one serverhost='192.168.x.x'), and make sure Redis is set to accept network connections only on a network you trust.Quick quiz 1 of 3
You want to cache a web page for five minutes. Which call fits best?
ex=300 makes the key expire after 300 seconds, so stale pages clear themselves.Quick quiz 2 of 3
Which Redis feature would you use to send live sensor readings to several programs at once?
Quick quiz 3 of 3
You need the fastest maze times ranked automatically. Which data type fits?
Teachers: this lesson makes a good short review. Ask learners to pick a project (a plant monitor, a lap timer, a door counter) and say which Redis feature they would use for each part, and why, before they write any code. The security reminder is worth repeating: Redis on a school network should never be reachable from outside the school.
Comments