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 ?
rakoo|11 years ago
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 ?