The Programmability of Redis Stack
In this chapter, we’ll explore Redis Stack’s programmability features and show you how they can be used in different situations. For quite a while, software engineers and database administrators have been making the most of stored procedures in relational databases. There are several good reasons for that: managing SQL procedures all in one place, easily troubleshooting procedure flows, staying separate from the chosen client library, and, most importantly, getting things done quickly.
Redis started off by allowing users to write Lua scripts and run them locally, giving them a taste of this capability. But with Redis Stack, server-side programming has been taken to a whole new level. You can now write intricate business logic in either Lua or JavaScript and execute it as close to your data as possible. There is no need for back-and-forth trips to a distant server.
In this chapter, we’ll show you how to implement complex...