We are now, simply, Redis
A Newsletter About Everything Redis
Dateline: Sometime in the past.
Nostalgia is powerful. The sheer volume of TV series (“Mad Men,” “The Goldbergs”, “Stranger Things,” etc.) that harken back to bygone eras prove the point that you can even sell new things in advertisements during a show about old things. Totally strange.
Of course, Redis doesn’t evoke a sense of nostalgia yet—it’s too young. Presenting at a conference last week, I explained how Redis worked to an attendee and this person remarked that it’s not that Redis uses anything particularly new, but rather it leverages the best of well-known, tried-and-true patterns and structures in the right way. I like that.
Remember the days when one or two people in a garage could create an internet company? Why was it always garages, anyway? Couldn’t they use an attic or a spare room? I digress. In this tech stack overview you can see what Listen Notes, a podcast-search engine, uses to power a one-man operation. Guess what is included?
Geoff Cowin is giving a talk at EEConf next month about using Redis with ExpressionEngine. ExpressionEngine grew out of software called pMachine that had a 1.0 in 2002. I vaguely remember evaluating pMachine when I started my first blog. Glad to see ExpressionEngine is still kicking and, with the help of Redis, kicking quickly.
Who isn’t nostalgic for their uni days? Walking across the quad, learning new things, buying eye-wateringly expensive textbooks, shared washrooms… well maybe on those last two. If you went to school in the last 15 years, odds are you ran into Moodle as a virtual classroom extension. Well, now you can make it faster by using Redis as a session store and application cache.
Good old database transactions. As much as the world might change, we’ll never get rid of them (except maybe, you know, in the zombie apocalypse). In this blog post, Fabio Concina explains how to use Python Redis’ MULTI/EXEC in combination with WATCH.
This is a Redis client for Haskell. I am now bound by tradition to try and explain to you what a Monad is, so here we go: A Monad is… just kidding, but there is something interesting about this library that is enabled by Haskell’s lazy computational modell: hedis is able to automatically perform pipelining without the user asking for it explicitly.
SAP is renovating and moving into the new millennium. This article explains how to integrate your SAP Cloud applications with Redis.
A talk from the Strange Loop about a new allocator that can significantly reduce memory fragmentation, with tests that showed great improvements in Redis and Firefox. Allocators are an old-school idea and it’s amazing that there’s still new improvements to make in that regard.
Apparently it’s not 1999 anymore and Moore’s Law can’t carry us to a better future much longer. It’s time to improve the performance of our programs instead of waiting for more transistors to rain from the sky. In this post you’ll learn how to tune the performance of your Redis server.
The age-old problem of enforcing a single user to a single resource is explored by Mario Tacke. Mario combines the old friends WebSockets (via Socket.io) and Redis to lock a user from creating multiple connections. His simple/clever approach uses the Redis SET command and the numerous modifier arguments as well as Sockets.io’s Ping signals.
Microsoft might have opened itself to open source software in recent years, but the company has never lost its love for creating ecosystems ripe with obscure configuration options and sub-optimal defaults. In this article, Ben Chartrand explains how they fixed performance problems encountered after moving from Cloud App Services to Azure Web Apps.
The Inter-Planetary File System has a goal so ambitious it almost seems to in the Blade Runner universe. The IPFS project is divided into various smaller projects, including an interplanetary test framework that switched from Consul to Redis to keep track of the tests. Not sure if it will help you with your day-to-day job, but it’s an interesting read.
Libraries and Tools
The most up-to-date Redis client for Racket gets an update. For those of you aren’t in the know, Racket is a general-purpose language in the Lisp family. I love how weird and yet downright ubiquitous Lisp languages are when you dig a bit. Basically, every piece of machinery designed since the mid-1980s has an indirect debt to Lisp,since it’s a core component of AutoCAD.
An interesting project by Luc Perkins (of Seven Databases in Seven Weeks fame) that uses Redis as one of the swappable backends for an all-in-one “data service” in a microservices environment. If you want to go old school, you can use a spinning disk as a backing service instead of Redis. Either way, the interface stays the same. Neat.
A tool from Alibaba for migrating data from one Redis database to another. It requires you to know about RDB files and the sync/psync commands, but sometimes knowing the details and doing things the old way pays off, even if the new way includes shiny black-box tools that manage everything for you.
A Redis module that implements HyperMinHash, an improvement over MinHash that makes it viable as a HyperLogLog alternative. Both MinHash and HyperLogLog are old probabilistic data structures, and even as the general ideas stand the test of time, improvements in the details keep coming.
Why use a graphical interface when you can make your command-line utilities more interactive? This library is ipython but for redis-cli. In other words, it’s a redis-cli that supports more auto-completion features and sports a status bar at the bottom that shows the asymptotic complexity of the command you’re typing. Very interesting Python project!
It’s the oldest rule of software engineering: to fix (almost) any problem, just add an extra layer of abstraction. In this case, the problem is that you want to migrate from one Redis instance to another, but you don’t want to have a service discontinuity. The solution is to add a proxy in front of Redis that will gradually move the data based on the client’s usage patterns. Clever!
An implementation of RedLock for PHP. It’s been a while since it was first formulated, so here’s a TO;DR (too old; don’t remember): RedLock is a distributed locking mechanism that uses multiple independent Redis instances to ensure a good level of resilience in case of failures.
Ready your bubblegum, skateboard, and leather jacket, we’re going h4ck1ng! This script tries to abuse a given Redis server. You can use it to test if a publicly accessible Redis instance is vulnerable or not, but be careful, the script can be destructive. Don’t use it in production.
The folks over at microlink.io share an interesting Node.js implementation of a rate-limiter using a Sorted Set. Be careful though, you’ve got to have a super up-to-date version of Redis—the docs are careful to point out that it requires Redis 2.6.12 or above! So, if the last time you updated your Redis instance was during the Harlem Shake craze, you might want to check that version.
Tony Messias implements RESP in PHP. I know PHP has come along way since my days of hacking together an e-commerce store in a computer lab at university circa 2001, but every time I see a PHP project I instantly think of opening and closing <!?PHP tags so I can inject it into some sweet, sweet HTML 3. Thankfully, this project is far more moder— great job Tony! Now, please give me a RESP interface to wordpress: WP.ADDPOST anyone?
RESP3 “Streamed Strings” format updated, they no longer use EOF (why is explained in the new version of the specification), but chunked encoding instead. Check it out here:https://github.com/antirez/RESP3/blob/master/spec.md#streamed-strings
Just read about streams in Redis 5.0. This looks like exactly what I need to build a multiplayer game: https://redis.io/topics/streams-intro
“Harbor has a Redis, so you know it’s doing big stuff.”
We had millions of SQL queries to one table on one of our endpoint at GreenJinn. By using redis this is close to 0 now. I love how the chart reacted today:
“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” from Seven Databases in Seven Weeks, by @lucperkins #springone
We’re keeping busy around here! Between Oracle Open World and getting ready to return to Jolly O’London for a Redis Day we’re still finding time to pump out a few blog posts. My old friend Roshan goes over how Redis Enterprise manages growing data: this is not new news, but rather a great summary of what happens inside the cluster. Loris Cro covers a must learn of 2019: the basics of Async/Await with Python and Redis: it’s hard to imagine a time before this critical asynchronous syntax. Finally, a few years ago I went to QCon—not only were the talks great but I have fond memories of a Nerf fight with someone from Pivotal. If you happen to go this year, don’t miss Jane Paek going over Enterprise performance.
|Questions? Feedback? Anything you want to share? Email or tweet me – I’m highly available 🙂
This newsletter was produced and distributed by Redis, Inc.
© 2019 Redis, Inc. 700 E El Camino Real, Suite 250, Mountain View, CA 94041