June 2019 – Edition #77
A Newsletter About Everything Redis
Dateline: A dusty basement. Edmonton, Alberta, Canada
I look up at the window, high on the basement wall, I see a piece of machinery pass by outside at ground level. The machine doesn’t look too destructive – about the size of a lawnmower. Then it starts moving the mechanism to pound the earth into compaction. My teeth rattle in my head, the art on the wall goes cockeyed. Then, the unmistakable sound of a table saw begins. The blade gnawing through the dead tree plank, just a few feet above me, one floor up. Yes, the sounds of industry are soon joined by a fine plume of dust that escapes from the open window above my make-shift office, landing in neat little conical piles. My dog begins to howl, joining in the chorus of sounds that vibrate my eardrums in a ceaseless non-melody. Yes, there comes a time in one’s life where the sentence “I’m going to remodel my house” sounds like a perfectly rational next step. After 23 months of various contractors hacking away at my house, the first phase of the journey is coming to a close. By the end of the month, my house will be “done” until the next project. Will I sweep up the dust, plop down in my favourite chair and take it all in? Of course not. I’ll be doing something even more rewarding: I’ll be attending Redis Day New York June 27th. Will you join me? Either way, keep reading.
The end result – I’m very proud:
Redis Trivia: Redis Cluster uses an implementation of CRC16 based on the (in)famous BBS modem file transfer protocol, XMODEM. Just imagine a 2400 baud modem squelch every time you run SET. I sure do.
Here’s a nice tutorial on how to get started using Redis with Spring Boot. This article will guide you from the first setup steps up to writing a functioning movie library demo application. You know, demo applications are a little like the first room you renovate – you try things out, figure out where things work and don’t – like the door I “repaired” that will only close three weeks out of the year. Demos help you figure things out. If you’re already familiar with the repository pattern, this article will sound particularly familiar, and if you don’t, then this is a good opportunity to learn it and build up your library of common design patterns.
It’s not uncommon to occasionally need to do some processing outside of the context of an HTTP request. Say, for example, that the user is requesting a PDF file that you plan to render dynamically, but what if it takes too long to do the job, causing an inevitable HTTP timeout? This is where Celery and other job queue systems come into play. I wish I had Celery to manage my contractors – I swear if I have to reschedule the electrician one more time because the plumber is delayed I will lose my mind. LOSE MY MIND. Anyway, this tutorial will guide you through setting up Celery with Redis for asynchronously computing image thumbnails inside your Django application. If you’ve never heard about asynchronous job queues, I’m sure you’ll want to renew one or two of your Django applications after reading this article.
Mark Paluch of Pivotal Labs has a great video on Redis Streams. He goes over the basic commands from the CLI and then shows you how to use them in a Java application. The toughest part of showing Streams to someone is showing how data passes back-and-forth. In a lot of demos you just open up two terminal windows, but Mark built a small app and had the audience vote. It’s a bit like seeing a sketch from your landscape designer or a model with tiny fluffy trees. The tiny fluffy trees are compelling. So, we saw a really nice real-time app using Redis streams. He also does a quick Q&A and answers the question, “why Redis Streams?”
Mule is an integration platform for connecting all sorts of data and apps together. It’s a really great program for jumpstarting your dev process and not having to build all this integration/plumbing (no one likes plumbing, hire a plumber…always). What I like about their site is that they have an excellent knowledge base. This particular article is short but good. It gives you simple, easy instructions, tells you about a common pitfall, gets you up-and-running and even gives you the code to download.
Libraries & Tools
If you’re a JetBrains customer and need some good tooling for Redis and Lua, there’s a great plugin in their Plugin Repository called Iedis. The tool works really well and if you like the swiss-army knife IDE, I think you’re really going to enjoy this. It has support for Lua, Lua debugger, auto-complete and has support for the Redis console. The only issue that I can see with this plugin is that it’s not free. That’s not a problem itself, the problem comes with the fact that the plugin site doesn’t tell you there’s a price to use this, not that this is the developer’s fault. I think a lot of people are put off by that; I had a concrete contractor that didn’t tell me a price. Guess what? It wasn’t free. Anyway, the price for the plugin is $70 USD and you get a 7-day trial. A lot cheaper than fixing my driveway, if you ask me.
Securing the last mile: Happy to announce that @LettuceDriver has now TLS support for #Redis Sentinel
Today we reached a milestone: a rather complex distributed system running at scale. We use #docker #Kubernetes #aws, #documentdb #postgres #elasticsearch #redis #rabbitmq #Kafka #nodejs #prometheus and a lot more…
While the hammer swinging has (momentarily) stopped at the Redis Labs HQ, we’re still banging out good stuff for your reading/watching/reviewing pleasure. Personally, I like to charge into projects without prior knowledge (ask about my adventures in plumbing!) but if you’re the type that likes to learn first, well, consider signing up for a course over at RedisU – you can start Introduction to Redis Data Structures, RediSearch (hosted by yours truly), or Redis Streams until the 28th but you have until July 5th to start Redis for Java Developers.
If you’re building a structure (for your Stream, that is), check out Roshan’s blog about Redis Streams and Apache Spark. When I’m doing a project, I have at least two credit card transactions with Home Depot, coincidentally, I recently wrote two pieces about Redis transactions: Redis Clustering Best Practices with Keys and On Types and Transactions. On other fronts, Mr. Cianflone, who I understand is also going through the fun of home renovations, can walk you through the first baby steps on RedisAI which is a way more fascinating read than CSA C22.1 Canadian Electrical Code (my current bedtime reading material).
Release candidates are a bit like inviting your friends over to take a look at your freshly refreshed house, speaking of that you can take a look at RedisBloom 2.0 RC1, which adds on CountMinSketch and Top-K. RedisTimeSeries also which just reached 1.0 RC1 – if you’re interested in the TimeSeries thing, take a look at a recent webinar I did on the subject or tune in for my interview with Danni, the developer of RedisTimeSeries.
Finally (and for the last time), If you’re in New York, please join us for Redis Day New York, June 27th!
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