News for hackers. Stuff that matters.
Re:Lua scripts in Redis within Node.js by ilya-pi on Friday September 19, 2014 @10:52AM (#8340760)
Author here. Would love to here any feedback on the topic if anybody is doing anything similiar
Re:Lua scripts in Redis within Node.js by rakoo on Friday September 19, 2014 @05:25PM (#8342576)
Very interesting -- it seems redis is used more and more for of its data mangling capacity.

I have 2 questions, although I don't use redis in prod I'm interested in it:

- Why use key -> json ? There are a decode and an encode to be done on each operation. The naive way to do it would be hashes (http://redis.io/commands#hash) with the likes of HSET and HMSET, and a structure like 'a' -> 'spend' -> 3. which not only make operations faster but should also take less space thanks to memory optimization of similar keys in a hash.

- What do you do for persistance ? Which one did you choose ? Are you okay with the slight delay ? Or do you just make it all in-memory ?

Re:Lua scripts in Redis within Node.js by wink on Saturday September 20, 2014 @10:44AM (#8344591)
Sounds a bit like reinventing Stored Procedures for Redis to me :|