The open source project
The success of a technical project is always measurable in terms of the innovation of the proposal, simplicity of use, exhaustive documentation, high performance, low footprint, and stability, among other aspects. However, and this is true for many things, at the end of the day what matters is the capacity to resolve a problem and the impact of the solution. Organizations that decide to add new technology to their stack face several challenges to understand, prototype, validate, and set up a plan to deploy test environments together with a release strategy, a maintenance plan, and, finally, a plan to develop competence. Success stories require careful planning. From these many perspectives, Redis is considered first-in-class, and in this book, we will expose many of the reasons that made Redis the de-facto standard among the in-memory data stores in the world. But even before digging into the features of Redis Stack, Redis, as an open source project, has undoubtedly added value to many businesses:
- A variety of options exist to get it running close to the application. It is available as a managed service in every public cloud provider, it can be installed from the source code or as a binary file, and Docker images are available for all the versions and flavors.
- It has good documentation and a command reference, together with examples (from the https://redis.io/ website).
- It is straightforward to set up and test. The source code is self-contained and does not depend on external libraries.
- Client libraries for the most popular programming languages are available and supported (Java, JavaScript, Python, Go, and C#/.NET).
- The well-known and permissive BSD license grants the freedom to use, modify, and distribute Redis, among other advantages. Users can test and run Redis in production without any concerns.
These reasons, together with the fact that it’s very easy to learn Redis, make it an attractive option to set up and use. On a computer configured to build C projects, pulling the source code from the GitHub repository, compiling it, and running the server can be done in less than a minute:
git clone https://github.com/redis/redis.git cd redis/ make ./src/redis-server & ./src/redis-cli PING PONG
The open source project delivers the core Redis server plus additional utilities, such as these:
- redis-cli, the command-line interface to administer the server and manage the data. This utility assists also in configuring scalable deployments with Redis Cluster and high availability with replication and Sentinel. Among other features, it includes auto-completion, online help for single commands (for example, HELP HSET), or by group of commands (for example, HELP @hash, to learn about the commands that can be used with the Hash data structure). Just type HELP to understand how to make use of the online help.
- redis-benchmark, a simple benchmarking utility to perform batches of tests for different data structures. Useful to evaluate how well the server performs on determined hardware.
- redis-sentinel, the agent that automates the management of replicated topologies and provides clients with a discovery service.
- create-cluster, a utility useful to set up a Redis Cluster environment for testing.
- redis-check-rdb and redis-check-aof, utilities to health check AOF and RDB persistence files.
Now that we have reviewed the basic principles behind Redis and its utilities, we are ready to dive into the world of data modeling. This journey will take us from relational databases to Redis core data structures, and we will see how the multi-model capabilities of Redis Stack simplify many data modeling problems.