Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Redis Stack for Application Modernization

You're reading from   Redis Stack for Application Modernization Build real-time multi-model applications at any scale with Redis

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781837638185
Length 336 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Mirko Ortensi Mirko Ortensi
Author Profile Icon Mirko Ortensi
Mirko Ortensi
Luigi Fugaro Luigi Fugaro
Author Profile Icon Luigi Fugaro
Luigi Fugaro
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: Introduction to Redis Stack
2. Chapter 1: Introducing Redis Stack FREE CHAPTER 3. Chapter 2: Developing Modern Use Cases with Redis Stack 4. Chapter 3: Getting Started with Redis Stack 5. Chapter 4: Setting Up Client Libraries 6. Part 2: Data Modeling
7. Chapter 5: Redis Stack as a Document Store 8. Chapter 6: Redis Stack as a Vector Database 9. Chapter 7: Redis Stack as a Time Series Database 10. Chapter 8: Understanding Probabilistic Data Structures 11. Part 3: From Development to Production
12. Chapter 9: The Programmability of Redis Stack 13. Chapter 10: RedisInsight – the Data Management GUI 14. Chapter 11: Using Redis Stack as a Primary Database 15. Chapter 12: Managing Development and Production Environments 16. Index 17. Other Books You May Enjoy

Exploring the history of Redis

Redis was conceived and designed in 2009 by the Italian software engineer Salvatore Sanfilippo as a solution to scaling LLOOGG, an online analytics server co-founded with Fabio Pitrola that empowered web admins to track user activities. Challenged by the scalability limitations of MySQL, Salvatore decided to rethink the concept of key-value storage and design something that would (admittedly) be different from Memcached, while preserving its simplicity and speed. The first beta release was shared on Google Code on February 25, 2009. A few months later, in September 2009, the first stable release, Redis 1.0, was published as a tar package of less than 200 KB.

Redis has been designed to offer an alternative for problems where relational databases (RDBMSs) are not a good fit because there is something wrong if we use an RDBMS for all kinds of work. However, in comparison to other data storage options that became popular when the NoSQL wave shook the world of databases (Memcached, the key-value data store released in 2003, or MongoDB, the document store released in 2009, and many more), Redis has its roots in computer science and makes a rich variety of data structures available. This is one of the distinguishing features of Redis and the likely reason that fostered its adoption by software engineers and developers – presenting data structures such as hashes, lists, sets, bitmaps, and so on that are familiar to software engineers so they could transfer the programming logic to data modeling without any lengthy and computationally expensive data transformation. Viewed in this light, we could say that Redis is about persisting the data structures of a programming language. An example of the simplicity of storing a Python dictionary in a Redis hash data structure follows:

user = {"name":"John",
        "surname":"Smith",
        "company":"Redis",
        "department":"Sales"}
r.hset("user:{}".format(str(2345)), mapping=user)

In the same way, adding elements to a Redis Set can be done using Python lists:

languages = ['Python', 'C++', 'JavaScript']
r.sadd("coding", *languages)

In these examples, the user dictionary and the languages list are stored without transformations, and this is one of the advantages that Redis data structures offer to developers: simplifying data modeling and reducing the transformational overhead required to convert the data in a format that can be mapped to the data store (thus reducing the so-called impedance mismatch).

There was a short gap between the first release and its adoption by Instagram and GitHub. If we try to dig into the reasons that made Redis so popular, we can mention a few, among which we count the speed and simplicity of deployment. Beyond the user experience, Redis is an act of dedication and passion, and as we read in Redis’s own manifesto, code is like poetry; it’s not just something we write to reach some practical result. People love beautiful stories and simplicity and everybody should fight against complexity.

What is surely true is that Redis is an idea to solve problems where relational databases, still tied to rigid paradigms, wouldn’t fit the purpose. It is the product of creativity, inspiration, and love for things done manually, where good design and craftsmanship intertwine to accomplish something that simply works. An intimate artwork. And we like to recall Salvatore’s words about the creative approach when writing Redis:

My wife claims I wrote it mostly while sitting on the WC for the first years, on a MacBook Air 11. Would be nice to tell her she is wrong, but she happens to be perfectly right about the matter.

From the most-used thinking room in Sicily to becoming the most-loved and used key-value database in the world, this is the story we have decided to tell in this book, and we are sure you will find the journey through the pages an exciting adventure.

One of the guiding principles behind Redis is being open source and driven by a community of enthusiast contributors. We’ll explore that in the next section.

You have been reading a chapter from
Redis Stack for Application Modernization
Published in: Dec 2023
Publisher: Packt
ISBN-13: 9781837638185
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image