Redis: A Beginner's Guide (3rd Edition) cover

Redis: A Beginner's Guide (3rd Edition)

No rating yet
Word count
306K words
Chapters
12
ISBN
9787115569899

Tags

Summary

Redis: A Beginner's Guide (3rd Edition) is an introductory Redis text revised from the first two editions, covering Redis 6.0 throughout, in nine chapters plus three appendices. It begins with Redis's history and development, explaining its storage structure—key-value data held in memory with the option of persistence to disk—and its characteristics in functionality, stability, and ease of adoption, answering the question beginners ask most often: why use Redis at all? It then covers installation on POSIX systems, macOS, and Windows, along with starting and stopping Redis, configuration, multiple databases, and use of the command-line client. The core chapters unfold type by type—strings, hashes, lists, sets, sorted sets, and streams—each following the same progression: what it is, which commands it has, what scenarios it serves, and which lesser-known commands remain. The advanced section discusses transactions and WATCH, expiration and rate limiting, SORT, task queues and publish/subscribe, pipelining, and space optimization at the level of key names and internal encodings. The practice chapter takes a task-driven approach, using dialogues between the fictional characters "Xiaobai" and "Teacher Song" to demonstrate installing and calling client libraries for PHP, Ruby, Python, and Node.js, and to complete small projects such as user registration and login, autocomplete, and online friends. The final two chapters cover Lua scripting, persistence, Sentinel, and Cluster—high availability and operations topics—while the appendices provide a quick reference to command attributes, an index of configuration parameters, and a reference implementation of CRC16.

Editor's review

Redis几乎是后端岗位的“必考项”,但很多入门资料一上来就丢出命令清单,读者会背不会用。这本书的好处,是它始终把命令绑在具体场景上:讲字符串时说到计数器与限流,讲列表时说到任务队列,讲有序集合时说到排行榜与区间查找,读者更容易理解“什么时候该用它”。第3版把内容对齐到Redis 6.0,补入了流类型、消费组、脚本以及哨兵与集群等近年项目里绕不开的主题,也让早期版本中被反复吐槽的“过时”问题得到缓解。全书仅两百余页、三十万字,两天到一周就能通读一遍,很适合当作入门阶段的一张地图:先用它建立完整的知识框架,再针对持久化、集群、内存编码等专题去读更深的设计与运维专著。书中虚构的“小白与宋老师”对话和随书附赠的示例代码,也降低了动手门槛。需要提醒的是,它是入门书而非参考手册,命令细节与版本差异仍需以官方文档为准。

Who it's for

A good fit for

  • 完全没有接触过Redis、想系统建立知识框架的后端初学者
  • 需要在校招或社招面试前快速补齐Redis基础知识的求职者
  • 使用PHP、Ruby、Python或Node.js、想在项目中引入缓存的开发者
  • 计算机专业学生与培训课学员,可配合课程实验同步阅读

Not a good fit for

  • 已经在生产环境运维Redis多年、想深入源码与集群调优的资深工程师
  • 需要覆盖Redis 7.x全部新命令与最新特性的读者
  • 只想查命令语法、需要速查手册而非通读教程的人

Reading tips

  1. 先读第1—2章建立概念并装好环境,后续章节边读边在命令行里敲一遍命令。
  2. 第3章按数据类型拆成六次小任务读,每读完一种类型就用它实现一个小功能。
  3. 把第4章的过期时间、任务队列与管道当作重点,这是面试和实际项目中出现频率最高的部分。
  4. 读完第3版后,用官方文档核对命令是否已被弃用,再选一本《Redis设计与实现》补原理。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Chapter 1 Introduction
  2. Chapter 2 Preparation
  3. Chapter 3 Getting Started
  4. Chapter 4 Advanced Topics
  5. Chapter 5 Practice
  6. Chapter 6 Scripting
  7. Chapter 7 Persistence
  8. Chapter 8 Cluster
  9. Chapter 9 Administration
  10. Appendix A Command Attributes
  11. Appendix B Configuration Parameter Index
  12. Appendix C CRC16 Reference Implementation

FAQ

这本书适合零基础直接读吗?
适合。书中从安装、启动和命令行客户端讲起,不要求读者事先有NoSQL经验;但需要具备基本的编程能力和命令行操作习惯,否则在部署与实践章节会比较吃力。
第3版和第2版差别大吗?值不值得换新版?
差别不小。第3版依据Redis 6.0改写,新增了流类型与消费组、脚本、哨兵与集群等内容,并调整了部分命令的用法说明;如果手上还是2015年的第2版,建议直接读新版。
书里的示例代码怎么获取?
按出版社与异步社区的说明,读者可凭书中的提示领取配套源代码,也可在异步社区该书页面下载。代码主要用于第5章的客户端实践,建议边读边跑。
读完之后下一步读什么?
如果目标是理解内部实现,可读《Redis设计与实现》;如果面向生产运维,可读《Redis开发与运维》。本书负责搭框架,这两本负责补深度。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

More by the same author

Top rated in the same category