Course
Skills Expanded
Learn by Building Redis with Ruby
Learn all about Redis and how it works under the hood by building your own clone.
What you'll learn
In this course we build a Redis clone from scratch, using Ruby. We will implement all the major features, including the data structures, transactions, persistence, and more. Along the way we'll also learn how Redis uses Unix sockets and process management to better understand how it operates at the system level. By the end of this course you will have a better understanding of how Redis works, allowing you to make better decisions about how and when to use it.
Table of contents
Introduction
10mins
Simple Commands and Data Structures
30mins
- Introduction 1m
- Echo 5m
- Skeleton Recap 1m
- Introduction to Non-blocking IO 1m
- IO.select 1m
- Non-blocking Parser 4m
- Review 1m
- Graceful Shutdown Using a Pipe 2m
- Naive Set and Get 1m
- Refactoring 3m
- Set Variants and Error Handling 4m
- Hash Basics 2m
- Refactoring the Dispatcher 1m
- Incrementing Values 2m
- Type Checking 1m
- Summary 1m
Expiry, Sets, Transactions, and Lists
37mins
- Introduction 1m
- Passive Expiration 3m
- Passive Expiration for All Commands 2m
- Active Expiration Introduction 3m
- Using a Timer Pipe 3m
- Sorted Sets 1m
- Naive Sorted Sets 2m
- Logarithmic Sorted Sets 2m
- Transactions 3m
- Optimistic Locking 4m
- Lists 2m
- Blocking Operations on Lists 4m
- Handling Client Disconnects 2m
- Robust Message Passing 2m
- Refactoring 3m
- Summary 1m