Build Your Own Redis with C/C++
Network programming, data structures, and low-level C, 2nd Edition
Author:build-your-own.org
Publisher finelybook 出版社: build-your-own.org
Publication Date 出版日期: 2025-02-24
Edition 版本: 1st
Language 语言: English
Print Length 页数: 131 pages
Book Description
Invest in
Build real-world software by coding a Redis server from scratch.
Network programming. The next level of programming is programming for multiple machines. Think HTTP servers, RPCs, databases, distributed systems.
Data structures. Redis is the best example of applying data structures to real-world problems. Why stop at theoretical, textbook-level knowledge when you can learn from production software?
Low-level C. C was, is, and will be widely used for systems programming and infrastructure software. It’s a gateway to many low-level projects.
From scratch. A quote from Richard Feynman: “What I cannot create, I do not understand”. You should test your learning with real-world projects!
Build real-world software by coding from scratch. If you can build a Redis server, you can build almost any software beyond CRUD! Because it teaches you 3 fundamental skills:
Network programming. The next level of programming is programming for multiple machines. Think HTTP servers, RPCs, databases, distributed systems.
Data structures. Redis is the best example of applying data structures to real-world problems. Why stop at theoretical, textbook-level knowledge when you can learn from production software?
Low-level C. C was, is, and will be widely used for systems programming and infrastructure software. It’s a gateway to many low-level projects.
Why from scratch? A quote from Richard Feynman: “What I cannot create, I do not understand”. You should test your learning with real-world projects!
Why a book? The real Redis project is a large code base built with lots of effort. The book distills the core concepts and guides you through small steps.
Table of Contents
From the Back Cover
Introduction
Socket Programming
TCP Server and Client
Request-Response Protocol
Concurrent IO Models
Event Loop (Part 1) Event Loop (Part 2)
Key-Value Server
Hashtables (Part 1) Hashtables (Part 2)
Data Serialization
Balanced Binary Tree
Sorted Set
Timer and Timeout
Cache Expiration with TTL
Thread Pool
.