<antirez>

Redis 2.6 is out!

▼
antirez 5140 days ago.
Redis 2.6 is finally out and I think that now that we reached this point we'll start to see how the advantages of a release that was already exploited in production by few, will turn into a big advantage for the rest of the community.

Scripting, bitops, and all the big features are good additions but my feeling is that Redis 2.6 is especially significative as a step forward in the maturity of the Redis implementation. This does not mean that's bug free, it's new code and we'll likely discover bugs especially in the early days as with every new release that starts to be adopted more and more.

Github: where you see how cool humanity can be.

▼
antirez 5141 days ago.
You are there in the morning with your coffee in front of you, scanning pull requests and bug reports, then you see a conversation around a commit among a few guys that modified the code to make it better, than there is another one suggesting to improve it in another way. You click in the account names and you see this people with their transparent eyes and your trust in humanity is restored.

Mission accomplished: videos talks for Redis Conf...

▼
antirez 5144 days ago.
Takeaways:

1) Making videos is in some way harder than doing a talk live.
2) Screen Flow is awesome, but could be improved with more video editing capabilities, apparently you can't "cut" the video.
3) The problem is to upload files when they are big and you have normal ADSL connection :-)

But it feels good to be able to send the video talks a few days in advance, so the conf organizers will be able to perform editing, filter audio if needed, whatever.

Today is the day...

▼
antirez 5145 days ago.
of the final recording of the videos I'll send to the Redis Conf. That was hard! The timing of the conf was not excellent for my attending, but producing the video was also less trivial than I thought, but finally I've the slides, an idea about what to say, and the ScreenFlow skills ;) Maybe after this experience I'll produce some video tutorial of Redis new features as I introduce it, in order to accelerate the adoption of new things in our community.

Now back to work...

Almost 1000 followers for @redisfeed in a couple of days

▼
antirez 5145 days ago.
On twitter I read a few concerns about inability to read what I think about tech non-redis topics. First of all, thanks to everybody interested in my thoughts :) Second, this blog is exactly the place where I'll post everything like that.

So:

@redisfeed -> Redis news, mostly low traffic, high signal.
@antirez -> Will be converted into my personal account, mostly italian language, non work related.
@zeritna -> Will be simply dismissed.
This blog -> Everything about day by day Redis development, personal opinion about sexism, sky driving, shit eating and japanese food.

Next days...

▼
antirez 5146 days ago.
I'm going to be a bit away from Redis code and this blog as I need to freaking focus on finishing the video talks for the Redis Conference that is very near at this point...

I'm also tuning and testing the final bits into 2.6 to make sure to release it ASAP :-)

See you in a couple of days.

p.s. also my wife feels contraction since a few hours, so maybe Greta is going to birth in a few... (!!!)

New 2.6 MONITOR behaviour with transactions

▼
antirez 5146 days ago.
The commit message says it all:

    Fix MULTI / EXEC rendering in MONITOR output.
    
    Before of this commit it used to be like this:
    
    MULTI
    EXEC
    ... actual commands of the transaction ...
    
    Because after all that is the natural order of things. Transaction
    commands are queued and executed *only after* EXEC is called.
    
    However this makes debugging with MONITOR a mess, so the code was
    modified to provide a coherent output.
    
    What happens is that MULTI is rendered in the MONITOR output as far as

Random victim on Twitter

▼
antirez 5146 days ago.
These are the real victims of flamewars:

"After the recent affair with @antirez's blogpost, I'm seriously considering forgoing further usage of #Redis in all my projects." (@nathell)

Obvious considerations:

1) Somebody will be happy about this as there was definitely a force trying to resonate as much as possible what was happening in the worst way.
2) The guy should read my blog post seriously.

But this is how it goes, you write a blog post that is a point of view about how to handle sexism (focusing on its effects, not the cause that anyway at the most subtle level, for instance a wrong promotion, can simply be denied by the author of the sexism), and the net result thanks to a number of people in part evil, in part simply bigot as hell, is that I'm sexist.

Ask your questions on Stack Overflow if you wish

▼
antirez 5146 days ago.
Hey, since I'm no longer active on Twitter, that was a channel where from time to time I replied to requests from users, I'm now making sure I reply to a few questions on Stack Overflow every day, lurking on the "Redis" tag:

http://stackoverflow.com/questions/tagged/redis

I can't ensure you that I'll reply to your question, but I can ensure you I'll be there often to reply to a few questions a day, and together we can create a Redis ecosystem in one of the best places on the internet where to give or receive help, that is Stack Overflow.

New site look improved a bit.

▼
antirez 5147 days ago.
Now it's like a mix between a twitter timeline and a blog. I fixed the RSS feed, but still could be generated better than that. Well the point is that as far as I've the min needed to improve it in the future will be easy and fun.

p.s. yes the layout and fonts are a bit of a mess, but it's not going to be too hard to fix it. For now I focused more on what it should display.

Warning: I forgot to increment the js version counter so it takes a few hard reloads of the page to get the right CSS.

Welcome to the new site!

▼
antirez 5147 days ago.
Hi visitor! This blog was conceived for low traffic blogging. Now that I plan to don't use my Twitter accounts the old blog engine was not good enough.

The simplest thing to do was to take Lamer News and create a quick modified version that could be used as a blog engine... that's the result, for now. I hope to evolve it, but the point here is, I can write both long posts and very small ones that can be read directly from the home page.

It is also possible to write just short titles linking to external site, that is a feature I plan to use as well to link to interesting Google Groups comments and stuff like that.

Pizzeria I Sapori, Trecastagni

▼
antirez 4941 days ago.
La Pizzeria "I Sapori" a Trecastagni e' la mia pizzeria preferita: la pizza e' buona, a lievitazione naturale (davvero molto digeribile), e me la portano a casa fino a San Giovanni la Punta dove abito (c'e' un bel po' di strada). Cosa volere di piu'? Hanno solo un problema, se li cerchi su Google non li trovi, per cui ogni volta che devo fare un ordine mi tocca andare a pescare numero e menu da una foto che ho fatto col cellulare. Per cui, eccoli, per me stesso e per chiunque li cerchi su Google:

Game Over

▼
antirez 5146 days ago.
Yesterday I wrote a blog post about sexism. In the blog post I expressed a few of the ideas I've about this matter, as a private citizen in his blog should be able to do.

The blog post, and my tweets about this subject, received an extreme reaction including tons of rage and insults. Somebody will say, welcome, you understand at 35 that there are people that it is not worth having an exchange with? Not at all, I'm not very positive about humanity in general, but even it the worst mailing list thread, or in the hottest flame war on usenet, I never have never seen what I saw yesterday.

A different take on sexism in IT

▼
antirez 5148 days ago.
More than ten years ago I started to understand that sexism in IT was not an easy topic. Talking with my female coworkers I discovered they were deeply upset and offended by other women that were too easy to ask for respect using sexism as a flag. At first I was a bit shocked about that, but then I realised how obvious it is.

As a woman you want respect because you are capable and smart. Not because you are a woman.

In the course of my life I started to develop an higher and higher intolerance for topics like politically correctness and protection of minorities unless this was clearly put in general terms. If you are an human being you need to be respected because you deserve respect like any other. I don't care if you are black, white, yellow or woman, you are an individual.

Reply to an open minded reader

▼
antirez 5153 days ago.
Today I was at the hospital for the usual Greta heartbeat trace that is used to monitor the baby's status when the birth is near (all ok btw): my sole escape from the boringness of the hospital and its deep disorganisation was my iPhone that I was using to read the twitter timeline for the "Redis" search, when I stumbled upon an article written by @soveran about Redis used as a data store, an open minded reader.

Redis 2.6 RC8 is out

▼
antirez 5156 days ago.
I just released Redis 2.6.0-RC8 that is likely our latest RC release. Plans are to release 2.6.0 before the end of October.

There are a few new things in RC8 that are worth mentioning.

SRANDMEMBER <count>
The first is the SRANDMEMBER command that now accepts an optional argument to return multiple random elements.

If you want non-repeating elements, use a positive count:

    redis 127.0.0.1:6379> sadd myset 1 2 3 4 5 6 7 8 9 10

An update about Redis 2.6 and Sentinel

▼
antirez 5199 days ago.
I'm back to work after two good weeks of vacations, and I hope you enjoyed your time as well during your days of rest. It's a bit hard to start after many days of pause, but at the same time it feels good to work again at Redis 2.6 and Redis Sentinel. This blog post is an update about the state of this two projects.

 Redis 2.6 ETA 
The time at which Redis 2.6 will ship as a stable release is one of the most frequently asked questions in the Redis community recently. Actually there is no ETA about Redis 2.6 stable because the idea is to do a stable release only when the test coverage will improve, and once a few more known bugs are fixed.

Redis Sentinel beta released

▼
antirez 5230 days ago.
June 5th I started writing the first line of code for Redis Sentinel, and after more or less six weeks I'm happy to release the first public beta. This has been a fun programming sprint where I did something a bit unusual in the Redis development history: to focus on just one aspect of Redis for a number of weeks, almost ignoring everything else was not an important bug report. The reason for following this new methodology was very simple: Redis missed a failover solution in a desperate way, users needed it, VMware encouraged me to go along this path (thanks), so the only possibility to go from zero to something working was to focus on doing just that, enough time to reach a beta that we, as the Redis Community, I'm sure will be able to push forward to production quality in a very short time.

Sentinel and slaves in INFO output

▼
antirez 5257 days ago.
As every Redis user patient enough to follow me on twitter knows, my focus is all on implementing Redis Sentinel lately, and I'm making good progresses. What we have right now is Sentinel implemented as a special mode of the normal Redis server (invoked using redis-server --sentinel or simply renaming redis-server executable into redis-sentinel), so I'm reusing everything was inside Redis, that's a big advantage in terms of development time, code reuse, stability.

The Redis Community Survey

▼
antirez 5270 days ago.
I'm a fan of mood-driven development. Among all the stuff I can work to, in order to improve Redis, I tend to favor things that for some reason make me excited more than others: because they are interesting to implement, or because I think the user base needs those new features or fixes a lot, or because I would love to have such features as an user.

Mood-driven development is cool because when you do what you think makes sense, what you like, you are, simply, 10 times better at it. Fortunately my mood is not too lunatic, but is instead influenced by one thing more than everything else: the needs of the Redis community. I love that Redis is used more and more, this makes me feel well because there are other programmers that are trying to build things on top of Redis, so my work is not useless.

Redis persistence demystified

▼
antirez 5349 days ago.
Part of my work on Redis is reading blog posts, forum messages, and the twitter time line for the "Redis" search. It is very important for a developer to have a feeling about what the community of users, and the community of non users, think about the product he is developing. And my feeling is that there is no Redis feature that is as misunderstood as its persistence.

In this blog post I'll do an effort to be truly impartial: no advertising of Redis, no attempt to skip the details that may put Redis in a bad light. All I want is simply to provide a clear, understandable picture of how Redis persistence works, how much reliable is, and how it compares to other database systems.

Redis reliable queues with Lua scripting

▼
antirez 5357 days ago.
Redis 2.6 support for Lua scripting opens a lot of possibilities, basically because you can do atomically a lot of things that before required to pay a big performance hit. Now the price is much cheaper, so why don't abuse our power?

Even more important is that, before scripting, in order to turn non atomic primitives into atomic primitives you required help of the Redis WATCH command, that is a check and set style primitive. Being it an optimistic locking when there is high contention, like in the example of a queue with multiple workers (with many clients accessing a single key with WATCH), performances may be pretty bad.

Redis 2.6 is near, and a few more updates

▼
antirez 5380 days ago.
Redis 2.6 was expected to go live in the first weeks of 2012, but today is 24th of February and there are still no 2.6-rc1 tags around, what happened to it you may ask!?

Well, for one time, a delay is not a signal that something is wrong. What happened is simply that we put a lot more than expected inside this release, so without further delays here is a list of new features:

• Server side Lua scripting, probably the most exciting and big news, with built-in support for fast json JSON and MessagePack encoding and decoding.

How my todo list works

▼
antirez 5397 days ago.
There is a constant in my life for 335 days a year (let's assume that 30 days of vacation are a bit more relaxing): I've tons of things to do every day. Most are about my work, many are about handling home, health, family, and so forth.

I'm not the kind of guy that is good at remembering that I need to do this and that, usually I wake up, do a breakfast, sit in front of my computer and start to write code, read issues, reply to emails, and so forth. So to get pending things done I absolutely need some form of todo list, and in the course of the years I tried different things.

Redis Moka Awards 2011

▼
antirez 5438 days ago.
The Redis community is something special for me... it is full of great guys trying to participate in the development providing ideas, help, fixes and support.

However there are a few users that clearly go the extra mile helping the project in a special way: by making the code more robust. Doing heroic debugging sessions, reviewing the code I commit pointing at bugs, suggesting the adoption of some new idea or library to make Redis better, that turns out to be the right idea.

Don't get me wrong, all the other efforts are very appreciated, like the work done in the Redis Group trying to help newcomers or to come up with a solid design to attack a new problem with Redis, but I feel a need to recognize in a special way the efforts having a direct effect in the code quality.

Testing the new Redis AOF rewrite

▼
antirez 5453 days ago.
Redis 2.4 introduced variadic versions of many Redis commands, including SADD, ZADD, LPUSH, RPUSH. HMSET was already available in Redis 2.2. So for every Redis data type, we know have a way to add multiple items in a single command, for example:
• LPUSH mylist item1 item2 item3
• SADD myset A B C
• ZADD myzset 1 first 2 second 3 third
• HMSET myhash name foo surname bar
However this feature was not used when rewriting the AOF log (operation now performed automatically since Redis 2.4, but that the user can still trigger using the BGREWRITEAOF, even if the server is not configured to use AOF).

Redis for win32 and the Microsoft patch

▼
antirez 5457 days ago.
A few days ago Microsoft released a patch to compile Redis under win32. The team working on this project used the already existing win32/win64 port as a reference, and used the libuv library that powers the node.js project.

Yesterday the story hit Hacker News as I discovered a few hours later (I was away from the computer since December 8th is an holiday here in Italy), and as usually when you mix Microsoft, Open Source, and a news site, the result is some friction inside comments.

Short term Redis plans

▼
antirez 5488 days ago.
Users often ask me what is the Redis development roadmap, so it is probably time to write a blog post about our short/mid term plans, with the most important points.

There are two major features that we are pushing forward: scripting and cluster, so let's start from this two.

Scripting
Scripting implements Lua scripting support for Redis. We already have detailed documentation for this feature that describes what is already implemented and what will likely go inside the first stable release of Redis featuring scripting. The only part you should consider outdated both in the doc and the implementation is how scripts running for too much time are handled (this topic was extensively covered in the Redis google group).

On cryptography and dogmas

▼
antirez 5506 days ago.
Yesterday I finally released the initial public release of Lamer News, that is both a real world Redis programming example in the form of an Hacker News style site, and a project to run a completely independent (with a consortium) programming news site.

The project was well received, and was in the top page of HN for some time. Thanks for providing your feedbacks.

After the release of the code I got a few requests about changing the hash function I was using in order to hash passwords in the database:

What's wrong with the iPhone 4s, and why Jobs is not my hero

▼
antirez 5520 days ago.
The iPhone 4s is out, and apparently for the first time it disappointed many of the most addicted Apple fan boys, especially the ones that Apple grown in the latest decade in a sort of semi religious way, using bold statements like this changes everything, again.

Apparently for many, the 4s did not changed everything enough: they probably expected some kind of tangible change like a bigger display, a redesign, or who knows... maybe a portable holodeck.

Why the MBA 11 is now my sole computer

▼
antirez 5527 days ago.
(Since I received a few questions about how I feel writing code with the MBA I'm posting this blog post.)

I work from a number of different places. Mainly from home and from an office where I've a room for me, here in Catania, together with other friends of mine also writing code for another company.

This way I'm sure I'll not spend the whole day at home, and when I've an interesting problem I've a few friends to share ideas with in front of a coffee. So usually I work at home in the morning, then go to the office for lunch, and stay at the office till the end of the working day.

Everything about Redis 2.4

▼
antirez 5590 days ago.
A few months ago I realized that the cluster support for Redis, currently in development in the unstable branch, was going to require some time to be shipped into a stable release, and required significant changes in the Redis core.

At the same time I and Pieter already had a number of good things not related to cluster in our development code: delaying everything for the cluster stable release was not acceptable. So I took a different path, forking 2.2 into 2.4, and merging my and Pieter's developments (at least the ones compatible with the 2.2 code base) into this new branch. In other words 2.4 was possible because git rules.

Redis Documentation Fiesta 2

▼
antirez 5590 days ago.
A few months ago I asked my twitter followers to tell me something that could be improved in the Redis Documentation, with the promise to fix the problem in the next couple of days. This was a good thing as I received good suggestions and spent some time just writing doc, that is a fundamental part of any software project.

So I'm trying it again. Tomorrow I"ll post a blog post about the improvements of Redis 2.4. A the same time Redis 2.4 tar.gz will appear on Redis.io download section. I'll be spending the rest of the day and part of the weekend writing documentation.

Redis new test engine

▼
antirez 5607 days ago.
If you used to follow the advice that Redis displays after you build it, that is, to run make test, then you know that our test was not the fastest in the world, actually taking several minutes to complete in a not so fast computer.

One reason the test used to be so slow is that we do a lot of Fuzz Testing. Almost all the bugs we discovered thanks to the test suite were discovered thanks to fuzz tests and very very rarely thanks to regression tests and unit tests. This is I guess pretty obvious since if you try to write correct code it is a bit unlikely you do trivial errors. More likely errors will arise from interactions you are not vulcan enough to spot while coding.

How to take advantage of Redis just adding it to your stack

▼
antirez 5621 days ago.
Redis is different than other database solutions in many ways: it uses memory as main storage support and disk only for persistence, the data model is pretty unique, it is single threaded and so forth. I think that another big difference is that in order to take advantage of Redis in your production environment you don't need to switch to Redis. You can just use it in order to do new things that were not possible before, or in order to fix old problems.

Switching to Redis is of course an option, and many users are using Redis as primary database since they need features or write speed or latency or some other feature, but as you can guess switching is a big step if you have an already running application in production. Also for some other kind of applications Redis may not be the right database: for instance a Redis data set can't be bigger than available memory, so if you have some big data application and a mostly-reads access pattern, Redis is not the right pick.

An update on Redis and Lua

▼
antirez 5667 days ago.
I released the scripting branch just two weeks ago, but it is already a super hot topic: people are hacking with it, using it in production, dropping forked versions of Redis with C implemented specific commands in favor of simple Lua scripts. I was very in doubt about the opportunity of adding scripting to Redis, it was clear that the benefit was huge, but was the downside huge as well?

Apparently the way scripting is added is the key factor. I think we got the API right, this was already a good start, but there is more than that. A big question is, should you be able to interact with the external world from Redis scripts, like writing files, require libs, and so forth? I think this is not the case. Scripting should just allow users to do client side using EVAL what usually was previously possible only creating specialized commands in C. Also in the previous blog post I explained how the lack of side effects is crucial for the correctness of AOF and Replication in a scripted environment.

Scripting branch released

▼
antirez 5678 days ago.
Warning: the scripting API was modified in recent versions of 'scripting' and '2.2-scripting' branch. Now Lua can call Redis commands using Redis.call('get',...) instead of Redis('get',...). Also the EVALSHA command is now available in both branches.
As expected I did not resisted to the temptation of implementing a branch with Lua scripting support for Redis, and this weekend was the right moment to attack the problem, regardless of the fact that in Italy 1th of May is the "International Workers' Day" and everybody is supposed to don't work. But I actually had a lot of fun coding, and managed to attend a concert, to play at bowling, drink some good vodka, and watch the "Source Code" movie, so I'll call this a busy weekend :)

Redis and scripting

▼
antirez 5683 days ago.
Before doing Redis I was completely addicted with one thing: implementing scripting languages. I implemented a number of languages, for instance I wrote three implementations of the Tcl language (one is currently actively used), Scheme interpreters, interpreters for stack based languages similar to FORTH, an interpreter for the Joy language written in Tcl, a macro system for Tcl, and read the source code of Ruby, Python, and many other dynamic language implementations. When I said addicted I meant addicted.

Backporting into Redis 2.4 and other news

▼
antirez 5692 days ago.
I think I should write more about Redis development... lately I was so focused on writing the code and the Redis Book that finding the time to blog about Redis was really hard, but I'll try to improve in the next weeks. However today I want to provide some fresh news to Redis users: to have some insight into the near future of a project can be very interesting for developers planning to start a new project with Redis.

Currently we have three development branches of development: 2.2, 2.4, Redis Cluster (unstable branch).

On the web server scalability and speed are almost the same thing

▼
antirez 5709 days ago.
Today I complained on twitter that the obvious way to start writing an application with Ruby and Sinatra is too slow by default. Substituting a template calling the

    erb :index

takes a few milliseconds (just substituting "hello" in toy template). Benchmarking it with apache benchmark shows how a similar hello world app written in PHP serves 1500 requests per second, while using erb this trivial substitution can handle 250 requests per second (both benchmarks ran on my MBA 11").

Probably there is some lame reason why this happens, like opening the template file again and again or alike (excluding the template the method dispatch of Sinatra + Mongrel is able to serve 600 requests per second, so it is the template substitution).
: