3 ms·
Lua scripting! Once people figure out what Redis' Lua scripting is good for, and it gets in a stable release, it's going to set the world on fire. In a good way
by pjscott 15y ago
Lua scripting! Once people figure out what Redis' Lua scripting is good for, and it gets in a stable release, it's going to set the world on fire. In a good way.
When one of the services I work on was having huge performance problems, and nothing I did seemed to make it fast enough, I realized that the main data-manipulation logic -- previously a combination of Python and SQL -- could be rewritten as a Lua script in Redis. I learned the basics of Lua in about an hour, migrated the data over to Redis, made the necessary changes to the code, and everything worked beautifully. Months of crippling speed problems vanished in a single long day.
Redis 2.6 saved my ass. Now, when I need to store data, it's always one of the first things to come to mind, since I know I can count on it to be fast, solid, and flexible enough to do all sorts of things.
- burke 15y agoLua scripting is really exciting. I wrote a library to simplify using Redis' lua scripting facility from inside a rails app: http://shopify.github.com/wolverine/ http://shopify.github.com/wolverine/. We've been using it at Shopify for inventory management, and it's let us do a lot of cool stuff, faster than ever. Disclaimer: I built it before I understood what the KEYS arguments were supposed to be used for, so it won't play nice with clustering, yet.
- dagw 15y agoLua scripting in Redis is a game changer. I've been using it quite a bit lately and it lets you do amazingly powerful queries and data manipulation really really quickly with very little code.