Skip to content

Commit a5af648

Browse files
committed
MANIFESTO v2.
1 parent 14b17c3 commit a5af648

File tree

1 file changed

+41
-6
lines changed

1 file changed

+41
-6
lines changed

MANIFESTO

+41-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,21 @@ Redis Manifesto
3434
so that the complexity is obvious and more complex operations can be
3535
performed as the sum of the basic operations.
3636

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
3852
practical result. Sometimes people that are far from the Redis philosophy
3953
suggest using other code written by other authors (frequently in other
4054
languages) in order to implement something Redis currently lacks. But to us
@@ -45,23 +59,44 @@ Redis Manifesto
4559
when needed. At the same time, when writing the Redis story we're trying to
4660
write smaller stories that will fit in to other code.
4761

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
4963
complexity. We'll accept to fight the complexity when it's worthwhile but
5064
we'll try hard to recognize when a small feature is not worth 1000s of lines
5165
of code. Most of the time the best way to fight complexity is by not
5266
creating it at all.
5367

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
5582
naturally into a distributed version of Redis and 2) a more complex API that
5683
supports multi-key operations. Both are useful if used judiciously but
5784
there's no way to make the more complex multi-keys API distributed in an
5885
opaque way without violating our other principles. We don't want to provide
5986
the illusion of something that will work magically when actually it can't in
6087
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.
6390

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
6592
only way it can be worth is by enjoying it. When there is no longer joy in
6693
writing code, the best thing to do is stop. To prevent this, we'll avoid
6794
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

Comments
 (0)