Watch all RedisConf 2021 sessions on demand
A Newsletter About Everything Redis
Dateline: A hoodie, Edmonton, Alberta
While much of the northern hemisphere is still scorching hot, things are starting to cool down in my neck of the woods. It’s hoodie weather – the nights are cool and we’re starting to spend more time indoors. Days are getting shorter and the snow will be here in a couple of weeks. In the summer, we try to maximize the “good” weather and sunny days, and people often take time off to go on vacations (which are, ironically, tiring). This is all winding down now. As summer gasps its last, the day length descends and :yawn: we need more warm clothes. It’s naturally a time where I start sleeping a little more and :yawn: a nap sounds pretty good in the :yawn: afternoon. Redis, however, never rests – day and night, it’s pushing out data at a rapid clip. It’s enough to make you tired just thinking about it.
Redis Trivia: If key foo contains a number, say 123, when you GET foo, it will return a string. Sad face. If you want to return a number type in Redis, you can run INCRBY foo 0. Watch out though, it’s a write command, so it goes into the AOF.
Roberto Miranda goes over how he used Redis to prototype out a product (actually users/”fans”) discovery tool in Redis for Cookpad. This feature enables people to find things to cook faster, and, if you’re anything like me, a big meal makes me practically pass out – so, Redis enables users to cook, then eat, and finally take a nap… faster?
When I want to bring in data from a CSV file, I usually just hack together a 20-line script in Node or Python. But, for those tired of writing custom scripts every time, Datamelt put together a general purpose Awk script that will translate the CSV file into hashes in RESP and pipe it into Redis-CLI. One note, Uwe is old school and uses HMSET (you can just use a varadiac HSET now), otherwise this is really nice.
This is an ESP-32 Microcontroller-based greenhouse monitor that grabs data from Redis directly. Rest assured that your tomatoes don’t get too cool or too warm, thanks to Redis.
Erika Heidi extols the virtues of pipelining in Redis. For those of you who aren’t hip to pipelining, it’s a method of continuing to send commands to Redis, instead of your script counting sheep while waiting for Redis to respond.
Oh, the ease of calling FLUSHALL or FLUSHDB. Joshua Wood over at Honeybadger explores the disaster scenario of what would happen if Redis suddenly got emptied. He discovers the rename-command, and it’s not a snoozer as there is a twist to the story (actually, a twist specific to a particular service). You’ll have to read on to find out more.
You’ve been asleep at the wheel if you think Redis is just a cache. This article from PushRadar gives you a single hand of fingers/reasons for why you might want to use Redis as more than a cache.
Caching is serious business at Stack Overflow, as you can imagine. In this blog post, Nick Craver shares an overview of the current state of caching for all Stack* sites and explains how Redis handles it all, day and night. Bugs never sleep, so neither can Stack Overflow nor Redis.
This in-depth blog post explains how to write a video chat application with multiple rooms using SocketIO, WebRTC, Node.js and Redis. It’s so simple you can do it in your sleep.
Libraries & Tools
Cobra is a real-time messaging system that uses WebSockets for external connectivity and Redis Streams for storage and internal dispatch. The creator spoke at RedisConf19 about how tiring it can be at times to make other teams in your company adopt new tools. However, with the small integration surface of just a Redis client, and his addition of a SQL interface for filtering events, he was able to win the hearts and minds of all of his colleagues (or at least that’s what he told us). Just joking, great job Benjamin!
With OctoSQL, you can use SQL to filter and aggregate datasets saved in various formats. I bet you only dreamed of being able to do a left join between a CSV file, a few Redis Hashes and a Postgres table.
This Redis module lets you store, modify and query protocol buffer messages in Redis. Since protobuf messages are structured, a native understanding of their structure allows you to modify them in-place and read only a sub-path of the original message. Give this module (and RedisJSON) a shot, it’s way less tiring to manipulate nested structures this way, as opposed to using simple strings.
Smockron is a rate-limiting solution for NodeJS and Nginx that uses Redis as a back end. It’s a good way to ensure you can sleep soundly without worrying that bad actors might abuse your APIs overnight.
It’s sometimes annoying to have to embed Lua scripts in your programs, especially if you’re using a statically typed language. Why tire yourself by manually type-checking code when a tool can do it for you? RediSharp is a library that lets you transpile simple C# code to a Lua equivalent, so you can use Lua scripting in Redis without losing all the features that the IDE offers.
A Redis client for Perl, for Perl programmers, and for those who sleep-program in Perl at night.
The Caddy HTTP server can use a variety of mechanisms to store TLS information. Gamalan provides a tool that enables you to share the data via Redis. Why would you do this? Redis is far easier to set up versus other mechanisms. I guess you can sleepwalk right through the Redis setup process, so it’s easier.
A Redis driver for Nette. The GitHub page says it’s a framework for php. The webpage for Nette says don’t use frameworks. php is exhausting.
It is a pitty #redis PUNSUBSCRIBE command doesn’t subscribe the client to an endless list of puns
Getting my head around how HyperLogLog in #Redis works… clever stuff!
What do you use for background processing in #nodejs? We are have been using npm package #bull for our projects. #queue #redis
We haven’t been asleep at the wheel, oh no. We’ve been busy. Mr. Cro, specifically, published a couple of interesting blogs: The first one introduces OpenShift from the Redis perspective (Editor’s note: OpenShift is highly interesting, but descriptions often put me into a slumber – this one doesn’t!). Mr. Cro also gives you five tips to create a Redis Module. Finally, Sheryl wrote about using Redis Enterprise on Pivotal (VMWare?) Container Service – don’t hibernate through this top notch k8s tutorial.
|Questions? Feedback? Anything you want to share? Email or tweet me – I’m highly available 🙂
This newsletter was produced and distributed by Redis Labs, Inc.
© 2019 Redis Labs, Inc. 700 E El Camino Real, Suite 250, Mountain View, CA 94041