So it turns out that the mind behind that awesome piece of open source called Redis, an open source, advanced key-value store, is italian, and he’s developing it from a small city in Sicily. I had a chance to interview him, and here is what I learned.
Hi Salvatore, could you please tell us a bit about yourself?
My name is Salvatore Sanfilippo, I’m 33 years old, live in Sicily, Italy and I spent a great amount of my life writing programs. Currently I’m working for VMware, where I develop an open source database called Redis. In the past I worked in the field of security, embedded systems, system programming, and web applications. I wrote the hpingsecurity utility and invented the idle scan. A few years ago I wrote one of the first few web 2.0 applications that appeared in Italy, Oknotizie and Segnalo, and did a partnership with Matrix.
I’m also advisor and shareholder of a small company based in Sicily that is called Kiurma, specialized in writing iPhone and iPad applications.
Awesome, so I see you have a mix of startup experience, open-source development and large-company employment. Which one do you prefer and which one would you suggest to a young CS graduate?
I think that a lot has to do with your temper, but it is really a shame to miss the startup opportunity.
It’s hard for me to argue on the large-company employment since VMware is like the dream job, since I’m free to develop Redis full time, pretty freely, and with the support of some seriously smart guy inside of VMware if I need some hint. But I guess not every corporate job is like this.
I guess that as long as the corporate job is cool, you learn new things and do something that seems useful not just to the management but also to yourself, then it can be a good thing. Otherwise, especially if you are able to bet on yourself (that is, you can manage to live without a fixed income for some time without too much trouble since you are young enough, or with some savings in your bank account), the startup experience could be very rewarding and exciting, I mean, even if the startup will not be a success.
Your path is pretty different from the traditional italian CS graduate, why do you think most people just try to get a boring job in consulting and don’t try to just build cool stuff?
I think that in Italy for cultural traits we tend to do the boring-but-sure path. From what I understand from chatting with people, only a few of them are willing to do extra work for long term rewarding opportunities. People should probably start to shift their mindset. After all what is worse than doing something you don’t care about? Especially in Italy where your IT company is not exactly an exciting place like VMware, or Twitter or Google.
Also in our country many times programmers are payed too little for their work in a company, so it is not so hard to get more earnings even from your single-man-band business.
But there is to admit that startups need an fresh economy and a modern state, to grow up well, without bureaucracy and this is not what I see if I look at the Italian economic environment.
Do you think it’s harder to succeed while living in Italy, and Sicily in particular?
If your target is the world, being here is not a big limit for a programmer. Most of the interesting things are going on the internet anyway. I mean, here or in Paris is almost the same. What could do a difference is instead here or in the bay area.
But if you plan to do a startup that targets your region or country, Italy, and Sicily, are not the best places to stay for sure. For instance the company I advice, Kiurma, is located in Sicily but focused on customers in the north Italy, Europe, and US.
Could you tell us more about Redis? How was it born, why is it awesome, and why should we use it in our applications?
The web application of lloogg was an ajax app to show the site traffic in real time. So what I needed was a DB handling fast writes, and fast ”get latest N items” operation.
If you are a programmer, you know how a linked list can solve this kind of problems, so I started wondering, why on the earth is so hard to model this with MySQL with decent performance? Why there is no database that is able to natively handle natural ordering of items, that is, I put things inside with this order, so it should be fast to get the latest N items. After this considerations I started coding a prototype of the system, and shared the first beta on Hacker News, receiving good feedbacks.
Why should you use it? For two reasons I think. One is that for the right use cases Redis is really a game changer performance wise. If your data are in size the kind of order of magnitude that can fit in memory you can scale to an incredible number of users with just one database box. This means lower costs, less problems.
Another reason for using Redis is the following. In the field of programming languages there is a motto: A programming language is worth learning if it is different enough from all you already know to change your mind, exposing you to new abstractions. Well I think Redis definitely is a really different database, and will change the way you think at your data.
Actually VMware contacted me! And in a very interesting way… one of the smartest guys I know at VMware started contacting me about the design of Redis internals, with very compelling technical arguments. Our discussion simply evolved into the hiring process. At the time I had offers from a few companies, but I wanted to join VMware because in my opinion this was the best “home” for Redis: a company with high technical value inside, with a focus in cloud technologies, and I think that after a year I can say that this was the best pick.
Francesco Sullo asks: Given the awesome performance of Redis, did you ever plan a persistent mode for the future? I know that Redis was born to manage processes in-memory, but a db version, even if seriously limited, could be a great alternative in many cases.
Our main focus is in the in-memory backend, but actually we already have a disk backend that is called Virtual Memory and is something like the swap file of Redis, where values rarely used are swapped out in order to reclaim memory. This feature is present in both Redis 2.0 and the upcoming 2.2 but I’m not happy with the implementation, so the new focus is on the “diskstore” feature. Diskstore is a combination of an on disk key value store and an in-memory object cache. So in this special mode Redis takes everything on disk but loads the “working set” (the keys you use more often) on memory. When a key changes it gets asynchronously flushed on disk by another thread. All this is currently implemented in the “unstable” branch of Redis on github. The next version of Redis, 2.4, will drop support for Virtual Memory and will instead just support diskstore.
Salvatore, thanks so much for taking the time to answer this questions. I hope, and I’m sure, they’ll inspire someone to take your path.
Thanks Stefano, I had fun replying to your questions, thank you.