Welcome and setup

Before any code: what we are building, in plain English

Welcome! Before we open an editor, a quick picture. A network server is just two programs sharing a phone line. One side speaks, the other listens. Redis is one of those programs. By the end of this course you have written your own version of it, one short server.rb at a time. No Rails, no Sidekiq, no gems, just the Ruby standard library.

The whole network in one picture

A client sends bytes. A server reads bytes and replies with bytes. Everything else is built on top.

Quiz: Quiz

Loading practice…

The reference repo is github.com/learnwithparam/build-your-own-redis-ruby. The Python, Go, Node, and Rust sibling courses are also available so you can compare the same architecture across runtimes.

Ten steps end to end

Each step adds one Ruby idiom plus one Redis concept.
terminal
bash
git clone https://github.com/learnwithparam/build-your-own-redis-ruby.git
cd build-your-own-redis-ruby
make 01-tcp-echo

Clone and run the first step.

You should see 'echo server listening on 127.0.0.1:6380'. In another terminal, run nc localhost 6380 and type. Bytes echo back.

Quiz: Quiz

Loading practice…