`
朱秋旭
  • 浏览: 230682 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

The Blog Redis Manifesto of antirez

阅读更多
Many times I don't know what to exactly reply to feature requests, or questions about why things in Redis are done in a specific way. Most of the time the questions make a lot of sense, there is not just a way to make things in programming, a lot is about your taste, feeling, and ideas about how software should be written. So I tried to condense my feelings about Redis and software development in general in this short manifest, that I'll include in the Redis distribution. There are an infinite number of ways of doing things, this is just the one I and a good part of the Redis community like.

Redis Manifesto

1 - A DSL for Abstract Data Types. Redis is a DSL (Domain Specific Language) that manipulates abstract data types and implemented as a TCP daemon. Commands manipulate a key space where keys are binary-safe strings and values are different kinds of abstract data types. Every data type represents an abstract version of a fundamental data structure. For instance Redis Lists are an abstract representation of linked lists. In Redis, the essence of a data type isn't just the kind of operations that the data types support, but also the space and time complexity of the data type and the operations performed upon it.
2 - Memory storage is #1. The Redis data set, composed of defined key-value pairs, is primarily stored in the computer's memory. The amount of memory in all kinds of computers, including entry-level servers, is increasing significantly each year. Memory is fast, and allows Redis to have very predictable performance. Datasets composed of 10k or 40 millions keys will perform similarly. Complex data types like Redis Sorted Sets are easy to implement and manipulate in memory with good performance, making Redis very simple. Redis will continue to explore alternative options (where data can be optionally stored on disk, say) but the main goal of the project remains the development of an in-memory database.
3 - Fundamental data structures for a fundamental API. The Redis API is a direct consequence of fundamental data structures. APIs can often be arbitrary but not an API that resembles the nature of fundamental data structures. If we ever meet intelligent life forms from another part of the universe, they'll likely know, understand and recognize the same basic data structures we have in our computer science books. Redis will avoid intermediate layers in API, so that the complexity is obvious and more complex operations can be performed as the sum of the basic operations.
4 - Code is like a poem; it's not just something we write to reach some practical result. Sometimes people that are far from the Redis philosophy suggest using other code written by other authors (frequently in other languages) in order to implement something Redis currently lacks. But to us this is like if Shakespeare decided to end Enrico IV using the Paradiso from the Divina Commedia. Is using any external code a bad idea? Not at all. Like in "One Thousand and One Nights" smaller self contained stories are embedded in a bigger story, we'll be happy to use beautiful self contained libraries when needed. At the same time, when writing the Redis story we're trying to write smaller stories that will fit in to other code.
5 - We're against complexity. We believe designing systems is a fight against complexity. We'll accept to fight the complexity when it's worthwhile but we'll try hard to recognize when a small feature is not worth 1000s of lines of code. Most of the time the best way to fight complexity is by not creating it at all.
6 - Two levels of API. The Redis API has two levels: 1) a subset of the API fits naturally into a distributed version of Redis and 2) a more complex API that supports multi-key operations. Both are useful if used judiciously but there's no way to make the more complex multi-keys API distributed in an opaque way without violating our other principles. We don't want to provide the illusion of something that will work magically when actually it can't in all cases. Instead we'll provide commands to quickly migrate keys from one instance to another to perform multi-key operations and expose the tradeoffs to the user.
7 - We optimize for joy. We believe writing code is a lot of hard work, and the only way it can be worth is by enjoying it. When there is no longer joy in writing code, the best thing to do is stop. To prevent this, we'll avoid taking paths that will make Redis less of a joy to develop.
分享到:
评论

相关推荐

    Redis集群管理工具Redis::Sentinel.zip

    Redis-sentinel是Redis的作者antirez完成的,因为Redis实例在各个大公司的应用,每个公司都需要一个Redis集群的管理工具,被迫都自己写管理工具来管理Redis集群,antirez考虑到社区的急迫需要(详情),花了几个星期写...

    The Little Redis Book

    Reidis简介入门型,比较概要,细节需要进一步学习。

    Redis Essentials

    A fast-paced guide, full of real-world examples to help you get the best out of the features offered by Redis Who This Book Is For If you are a competent developer with experience of working with data...

    The Little Redis Book中文版

    《The Little Redis Book》中文版是一本专注于介绍Redis这一开源数据存储系统的图书。Redis,全称为Remote Dictionary Server,是一款高性能的键值对数据库,广泛应用于缓存、消息队列、实时统计等多种场景。这本书...

    The Little Redis Book.pdf

    值得注意的是,本书《The Little Redis Book》的版权声明是采用CC BY-NC 3.0许可证,这意味着读者可以自由复制、分发、修改或展示本书,但需按照许可证要求,始终将著作权归属于作者Karl Seguin,并且不得将其用于...

    Redis-Essentials.pdf

    variety of Redis commands are presented in this chapter, including the administration commands and data type commands that were not covered in the previous chapters. This chapter also shows you how to...

    awesome-redis:精选的令人惊叹的Redis和Redis生态系统资源列表

    Antirez - Redis作者的博客 文献资料 Redis Comands - Redis实现的命令的完整列表,以及每个命令的详尽文档 常见问题解答-有关Redis的一些常见问题。 社区 邮件列表 Freenode网络聊天 伦敦Redis聚会小组 旧金山聚会...

    Redis应用场景--Redis作者谈Redis应用场景

    本文将围绕Redis作者@antirez分享的几个典型应用场景进行深入探讨,旨在帮助读者更好地理解Redis的功能特性及其在实际项目中的应用。 #### 一、取最新N个数据的操作 在许多网站中,如博客、论坛等,经常会遇到需要...

    Redis-7.2.5-Windows-x64-msys2-with-Service

    Upgrade urgency MODERATE: Program an upgrade of the server, but it's not urgent. Bug fixes A single shard cluster leaves failed replicas in CLUSTER SLOTS instead of removing them (redis/redis#12824)...

    redis-5.0.0.zip

    4. The cluster manager was ported from Ruby (redis-trib.rb) to C code inside redis-cli. Check `redis-cli --cluster help` for more info. 5. New sorted set commands: ZPOPMIN/MAX and blocking variants. ...

    redis 6.2.5 for windows

    Redis binaries are built with the original source Redis and have been compiled with free Visual Studio 2019 (VC16,Community Edition, version 16.2.5) to obtain higher performance and better stability ...

    redis配置文件redis.conf

    redis配置文件redis.conf

    redis-6.0.0 windows 版

    Redis 是一个高性能的键值对数据库,常用于缓存、数据存储等场景。该压缩包提供的版本是 Redis 6.0.0 的 Windows 版本,适用于在Windows操作系统上部署和运行Redis服务。以下是关于Redis 6.0.0 Windows版的一些关键...

    Windows版 Redis 5.0.14

    Redis 是一个开源的内存数据结构存储系统,常被用作数据库、缓存和消息代理。在Windows环境下,Redis 的安装和使用与在Linux系统中有所不同。这里我们将详细讨论Windows版Redis 5.0.14的相关知识点。 1. **Redis ...

    redis-windows-Redis7.0.0.zip

    Redis,全称Remote Dictionary Server,是一款开源的、高性能的键值存储系统,广泛应用于缓存、消息队列、数据持久化等多种场景。它以其高效、轻量级的特性,在IT行业中备受青睐,尤其是在互联网领域。在Windows环境...

    redis5 windows ZIP免安装版本

    redis5 windows ZIP免安装版本。国外下载太慢,放到这里来。最新版可以在Windows上安装的exe版本的Redis。First release of Redis 5.x for Windows, updated to be in sync with antirez/5.0.9. Redis 5.0.9

    redis 免安装 redis客户端 redis-desktop-manager-0.8.8.384

    Redis 是一个高性能的键值数据库,它以键值对的形式存储数据,广泛应用于缓存、消息中间件、实时分析等领域。在 Windows 环境下,通常需要通过安装过程来设置 Redis 服务,但这里提供的资源是“redis 免安装”,意味...

    redis在win上的运行脚本redis.bat

    Redis是一款高性能的键值对数据库,常用于缓存、消息队列等场景。在Windows操作系统上运行Redis,通常需要借助一些额外的工具。标题提到的"redis在win上的运行脚本redis.bat"就是一个帮助用户在Windows环境下启动...

    redis-desktop-manager

    Redis是一个高性能的键值存储系统,由Antirez在2009年开发,它支持多种数据结构,如字符串、哈希、列表、集合、有序集合等。Redis以其速度快、可持久化和丰富的功能集,广泛应用于缓存、消息队列、实时统计等多种...

Global site tag (gtag.js) - Google Analytics