Data Structure Server Store

It can be a bit difficult to classify exactly what Redis is. At a basic level, it’s a key-value store, of course, but that simple label doesn’t really do it justice. Redis supports advanced data structures, though not to the degree that a document-oriented database would. It supports set-based query operations but not with the granularity or type support you’d find in a relational database. And, of course, it’s fast, trading durability for raw speed.

In addition to being an advanced data structure server, Redis can also be used as a blocking queue (or stack) and a publish-subscribe system. It features configurable expiry policies, durability levels, and replication options. All of this makes Redis more of a toolkit of useful data structure algorithms and processes than a member of any specific database genre.

Redis’s expansive list of client libraries makes it a drop-in option for many programming languages. It’s not simply easy to use; it’s a joy. If an API is UX for programmers, then Redis should be in the Museum of Modern Art alongside the Mac Cube.

In Days 1 and 2, we’ll explore Redis’s features, conventions, and configuration. Starting with simple CRUD operations, like always, we’ll quickly move on to more advanced operations involving more powerful data structures: lists, hashes, sets, and sorted sets. We’ll create transactions and manipulate data expiry characteristics. We’ll use Redis to create a simple message queue and explore its publish-subscribe functionality. Then we’ll dive into Redis’s configuration and replication options, learning how to strike an application-appropriate balance between data durability and speed.

Databases are often and increasingly used in concert with each other. Redis is introduced last in this book so that we can use it in just such a manner. In Day 3, we’ll build our capstone system, a rich multidatabase music solution including Redis, CouchDB, Neo4J, and Postgres—using Node.js to cement it together.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset