Coding Challenges/Build Your Own Redis Server (Python Edition)

  • $150

Build Your Own Redis Server (Python Edition)

  • Course
  • 59 Lessons

Build Your Own Redis in Python is a self-paced online course that teaches you what you need to know to build high-performance servers like Redis using Python, while saving you months (if not years) of learning along the way.

You'll learn network programming, concurrency, test-driven development and performance optimisation.

🎯 No filler content. Concise lessons with practical advice.

🐣No experience writing a server is necessary.

🧑🏽‍💻 Guided coding exercises along the way.

⏳Purchase once, access forever.

🚀 Always up to date.

Contents

Introduction

Introduction
Preview
Learn About Redis

Step 0 - Setting Up

This is software engineering so we’re zero-indexed and for this step you’re going to set your environment up ready to begin developing and testing your solution.

Step Goals
Installing Redis
Setting Up Python
Learn To Use Redis, Redis CLI And Redis Benchmark
Create A GitHub Repo For Your Project.

Step 1 - Introduction to RESP, Building a Protocol Handler Using Test-Driven Development

Introduction to RESP
Introduction to Test Driven Development
Using Test Driven Development to Build a Protocol Handler
Step 1 - Challenge: Protocol Handling
Preview
Step 1 - Solution: Protocol Handling

Step 2 - Creating a Network Client and Server

Introduction To Creating A Network Client And Server
Serialising the RESP Data Types
Building a Simple Redis CLI
Testing the CLI Against Redis
Sample Solution for a Simple Redis CLI
Step 2 - Challenge: Handling PING and ECHO Commands
Preview
Building a Simple Server To Handle Incoming Connections
Responding To The PING And ECHO Commands
Step 2 - Solution: Handling PING and ECHO Commands

Step 3 - Data Structures, Set and Get

Set Up Continuous Integration
Step 3 - Challenge: SET and GET
Preview
Adding The Core Data Structure
Handling The Set Command
Handling the Get command
Using the Redis CLI to test Set and Get
Step 3 - Solution: SET and GET

Step 4 - Handling Concurrency

Step 4 - Challenge: Handling Concurrent Clients
Preview
Threads Versus Async
Making The Data Store Thread-Safe
Handling Concurrent Clients With Threads
Using The Redis CLI And Redis Benchmark To Test Concurrency
Step 4 - Solution: Handling Concurrent Clients With Threads
Step 4 - Async Solution: Handling Concurrent Clients With Async IO

Step 5 - Implementing Expiry

Introducing The Two Methods Of Expiry
Step 5 - Challenge: Implementing Key Expiry
Preview
Updating The Data Store And Set Command Handler Ready For Expiry
Implementing Expire On Read
Implementing Background Expiry
Step 5 - Solution: Implementing Key Expiry (Common Parts)
Step 5 - Solution: Implementing Key Expiry Using Threads
Step 5 - Solution: Implementing Key Expiry Asynchronously

Step 6 - Implementing More Commands

Step 6 - Challenge: Adding More Commands
Preview
Impelenting EXISTS and DEL
Implementing INCR and DECR
Implementing LPUSH, RPUSH And LRANGE
Step 6 - Solution: Adding More Commands

Step 7 - Performance

Step 7 - Challenge: Performance Optimisation and Benchmarking
Preview
Benchmarking Your Server
How To Optimise For Performance
Performance Tuning The Server

Step 8 - Persistence

Step 8 - Challenge: Persistence
Preview
Persisting The Database
Loading The Database
Step 8 - Solution: Persistence

Closing Remarks

The Complete Final Solution
Going Further
Wrapping Up

Frequently asked questions

You’ve got questions. We’ve got answers.

Who specifically is this course for?

Any professional or soon-to-be software developer who wants to improve their coding skills by using Python to build a Redis Server.

Can I see a sample before purchasing?

Several parts of the course are available to preview, they're marked with a 'Preview button'.

How much Python experience do I need?

I won't be teaching Python on the course. I will assumed you at least know how to write a run and basic program in Python. You don't need to have gone any further than that - it's a great project to use to learn [more] Python.

How long does it take to complete the course?

Most people are completing the course in 1 to 4 weeks, depending on how much time they have to dedicate to it. Typically that's around 40 hours of work.

Can I use my learning and development budget at work to pay for this course?

Most companies simply require a receipt. If you need anything more please contact me with what you need and I'll help out.

What operating system will the solution work with?

The solution developed in this course will work on all operating systems for with a Python 3.11 or later interpreter is available.

Do I get lifetime access?

Absolutely. You can access it for as long as you'd like with no extra payment.