@@ -10,6 +10,20 @@ application.
10
10
** Disclaimer** Don't even think about trying to use this in production... just
11
11
don't.
12
12
13
+ ## Why Redis
14
+
15
+ The primary goal of this project is teaching Tokio. Doing this requires a
16
+ project with a wide range of features with a focus on implementation simplicity.
17
+ Redis, an in-memory database, provides a wide range of features and uses a
18
+ simple wire protocol. The wide range of features allows demonstrating many Tokio
19
+ patterns in a "real world" context.
20
+
21
+ The Redis wire protocol documentation can be found [ here] ( https://redis.io/topics/protocol ) .
22
+
23
+ The set of commands Redis provides can be found
24
+ [ here] ( https://redis.io/commands ) .
25
+
26
+
13
27
## Running
14
28
15
29
The repository provides a server, client library, and some client executables
@@ -117,6 +131,12 @@ the server to update the active subscriptions.
117
131
The server uses a ` std::sync::Mutex ` and ** not** a Tokio mutex to synchronize
118
132
access to shared state. See [ ` db.rs ` ] ( src/db.rs ) for more details.
119
133
134
+ ### Testing asynchronous code that relies on time
135
+
136
+ In [ ` tests/server.rs ` ] ( tests/server.rs ) , there are tests for key expiration.
137
+ These tests depend on time passing. In order to make the tests deterministic,
138
+ time is mocked out using Tokio's testing utilities.
139
+
120
140
## Contributing
121
141
122
142
Contributions to ` mini-redis ` are welcome. Keep in mind, the goal of the project
@@ -128,6 +148,9 @@ demonstrate a new pattern.
128
148
129
149
Contributions should come with extensive comments targetted to new Tokio users.
130
150
151
+ Contributions that only focus on clarifying and improving comments are very
152
+ welcome.
153
+
131
154
## FAQ
132
155
133
156
#### Should I use this in production?
0 commit comments