@@ -34,7 +34,21 @@ Redis Manifesto
34
34
so that the complexity is obvious and more complex operations can be
35
35
performed as the sum of the basic operations.
36
36
37
- 4 - Code is like a poem; it's not just something we write to reach some
37
+ 4 - We believe in code efficiency. Computers get faster and faster, yet we
38
+ believe that abusing computing capabilities is not wise: the amount of
39
+ operations you can do for a given amount of energy remains anyway a
40
+ significant parameter: it allows to do more with less computers and, at
41
+ the same time, having a smaller environmental impact. Similarly Redis is
42
+ able to "scale down" to smaller devices. It is perfectly usable in a
43
+ Raspberry Pi and other small ARM based computers. Faster code having
44
+ just the layers of abstractions that are really needed will also result,
45
+ often, in more predictable performances. We think likewise about memory
46
+ usage, one of the fundamental goals of the Redis project is to
47
+ incrementally build more and more memory efficient data structures, so that
48
+ problems that were not approachable in RAM in the past will be perfectly
49
+ fine to handle in the future.
50
+
51
+ 5 - Code is like a poem; it's not just something we write to reach some
38
52
practical result. Sometimes people that are far from the Redis philosophy
39
53
suggest using other code written by other authors (frequently in other
40
54
languages) in order to implement something Redis currently lacks. But to us
@@ -45,23 +59,44 @@ Redis Manifesto
45
59
when needed. At the same time, when writing the Redis story we're trying to
46
60
write smaller stories that will fit in to other code.
47
61
48
- 5 - We're against complexity. We believe designing systems is a fight against
62
+ 6 - We're against complexity. We believe designing systems is a fight against
49
63
complexity. We'll accept to fight the complexity when it's worthwhile but
50
64
we'll try hard to recognize when a small feature is not worth 1000s of lines
51
65
of code. Most of the time the best way to fight complexity is by not
52
66
creating it at all.
53
67
54
- 6 - Two levels of API. The Redis API has two levels: 1) a subset of the API fits
68
+ 7 - Threading is not a silver bullet. Instead of making Redis threaded we
69
+ believe on the idea of an efficient (mostly) single threaded Redis core.
70
+ Multiple of such cores, that may run in the same computer or may run
71
+ in multiple computers, are abstracted away as a single big system by
72
+ higher order protocols and features: Redis Cluster and the upcoming
73
+ Redis Proxy are our main goals. A shared nothing approach is not just
74
+ much simpler (see the previous point in this document), is also optimal
75
+ in NUMA systems. In the specific case of Redis it allows for each instance
76
+ to have a more limited amount of data, making the Redis persist-by-fork
77
+ approach more sounding. In the future we may explore parallelism only for
78
+ I/O, which is the low hanging fruit: minimal complexity could provide an
79
+ improved single process experience.
80
+
81
+ 8 - Two levels of API. The Redis API has two levels: 1) a subset of the API fits
55
82
naturally into a distributed version of Redis and 2) a more complex API that
56
83
supports multi-key operations. Both are useful if used judiciously but
57
84
there's no way to make the more complex multi-keys API distributed in an
58
85
opaque way without violating our other principles. We don't want to provide
59
86
the illusion of something that will work magically when actually it can't in
60
87
all cases. Instead we'll provide commands to quickly migrate keys from one
61
- instance to another to perform multi-key operations and expose the tradeoffs
62
- to the user.
88
+ instance to another to perform multi-key operations and expose the
89
+ trade-offs to the user.
63
90
64
- 7 - We optimize for joy. We believe writing code is a lot of hard work, and the
91
+ 9 - We optimize for joy. We believe writing code is a lot of hard work, and the
65
92
only way it can be worth is by enjoying it. When there is no longer joy in
66
93
writing code, the best thing to do is stop. To prevent this, we'll avoid
67
94
taking paths that will make Redis less of a joy to develop.
95
+
96
+ 10 - All the above points are put together in what we call opportunistic
97
+ programming: trying to get the most for the user with minimal increases
98
+ in complexity (hanging fruits). Solve 95% of the problem with 5% of the
99
+ code when it is acceptable. Avoid a fixed schedule but follow the flow of
100
+ user requests, inspiration, Redis internal readiness for certain features
101
+ (sometimes many past changes reach a critical point making a previously
102
+ complex feature very easy to obtain).
0 commit comments