Hacker Newsnew | past | comments | ask | show | jobs | submit | rizach's commentslogin

Shouldn't storing a json as a string be better performance for redis? All the extra jobb to find subkeys put extra work for redis. While pulling out the str and parse it in application would minimize the time spent in redis. This gets more true as the number of applications against one redis grow.


If you're serializing and saving the entire object always - you don't need this extension.

But if you're storing say, a 1K user profile, and most of the time you just want to update the access time, or get some auth token - this both allows atomicity and speeds up what you are doing.

The bigger the JSON object is vs. the how small a piece you want to retrieve or manipulate - the more efficient this becomes.

Also, manipulating a field in a JSON object atomically is currently possible only with Lua scripts - and even then, Lua will have to parse, manipulate and serialize the entire object. Where as in this case, if you are just updating something - there is zero parsing and zero serialization going on in the module.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: