I'm thinking of writing a book about redis

(Marc Cooper) #1

I’m no stranger to writing. I’ve published a couple of tech books, and I’ve a novel being edited, so I know the idiocy of writing a book. No need to go there.

redis, imo, is one of the great technical tools of the last decade[0]. Outside of a small percentage of projects (e.g. big data proper), I believe that postgres and redis are all you’ll ever need for your data. Yet, wherever I go, I see folk using redis as a kind of memcached+ (usually implemented in a painfully tortuous way). It’s often regarded as a caching tool and not a blazingly fast db with a phenomenally diverse range of data types providing hereto unforeseen solutions. Madness! redis rocks! Have you actually used expire?

So, I started sketching the outline of a book about redis aimed at developers[1]. The only things I’ve settled on, so far, are that I want to consider redis’ operations in their discrete groups. i.e. strings, hashes, sets, geo, hyperloglog, etc., and I want it to provide some sort of reference.

Beyond that, I’d really appreciate ideas, thoughts and suggestions from folk here.


[0] The others are git and ruby, and I’d wager on elixir being in the same category.

[1] I’m considering Leanpub for publication. (I rejected them in the past because they only support dropbox (which I won’t touch) and github (which doesn’t work for me).

(Andy Wootton) #2

What is your objection to DropBox @auxbuss? That’s what I use but I’ve considered moving to github to get version control (and to make me practice my git)

(Matt Machell) #3

Sounds like a worthwhile topic.

We’ve been using Redis at work since, er, 2009 or so. Mostly for memcached on steroids reasons, with occasional dabbling in other bits.

I think if you took time to show how it’s various features combine and might be applied in useful scenarios, it’d be a book I don’t think exists right now.

(Marc Cooper) #4

dropbox appointed Condoleezza Rice to their board. That’s enough for me, but it also signalled dubious connections and unsavoury goings on. I certainly wouldn’t use their closed source client on my own machines.

For what you want to do, it’ll be fine.

(Marc Cooper) #5

Thanks, Matt.

In my head, I have a similar idea, though I don’t know what that would look like yet. Not a cookbook, more a bunch of ingredients, which, as I suggested, I’ll group by related functions.

I’ve started pulling the format together by drafting a couple of chapters and things are a little clearer.

(Matt Machell) #6

It’s definitely worth doing an outline to get a feel for the structure; slice up the different aspects into related chunks and so on.

I’ve found Scrivener is a good tool for managing the process of putting a manuscript together, especially if you have associated related notes that don’t fit into a normal word processing file: https://www.literatureandlatte.com/scrivener.php

(Marc Cooper) #7

Scrivener is exactly where I’m throwing things together :slight_smile: I used it for my novel, and I have no idea how I would have managed without it.

(I also have scapple and aeon timeline 2, both by the same bunch. They’re fascinating bits of software that I enjoy using for things they weren’t intended for.)

(Steve Jalim) #8

Write it. I’ll buy it.

Also, happy to chat about my (positive) leanpub experience if you want

(Stuart Langridge) #9

The thing I think is interesting about redis is how to use its operations creatively to do things that stock key/value stores such as memcache can’t do. I built a thing once which needed to record counts of incoming pings and send an alert if the total was too high in the previous 24 hours, and with some careful thinking about how the incoming pings were recorded and some judicious use of zunionstore and zrangebyscore I could do all the calculations in a single operation. I mention this partially because I was terribly proud of it when I thought it up :sunglasses: but also because it’s stuff like that that makes redis be… well, redis; it’s the reason to use redis rather than memcache, because you get these immensely powerful single-shot operations which can do amazing things if you put some thought into your data structures. Just chucking everything into a zset essentially means that you might as well use some other key/value store; I’d like to see a book which brings out that power and teaches people to use it.

(Marc Cooper) #10

I have a customer \o/ Thanks, Steve. I’ve heard your +ve vibes about Leanpub before. It’s one of the reasons I thought I’d give them a go.

(Marc Cooper) #11

Exactly that, @sil. When I go to places, the devs often don’t consider imaginative solutions that involve redis. 9 times out of 10, redis is regarded as a “cache”. Indeed, a lot of folk call it a cache, which reinforces the idea (and can be a little dangerous should someone decide to flush it).

It’s that next step beyond knowing the range of redis functions that I plan to focus on.

(Greg Robson) #12

I recently checked and Leanpub supports BitBucket as well now. Is that of any use?