Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks for chiming in, but now I'm confused. Antirez said:

  When there are this two levels, storing the first level as a Redis hash, and the second as JSON leads to very good memory usage performances, it is internally stored as a linear array.
I'm reading this to say that memory usage wouldn't be as good if the second level was stored as a hash instead of a JSON blob.

My specific question was: why store the comment as a JSON blob as opposed to a hash? I think Antirez answer was, in a nutshell: because a hash of hashes can't be stored as an array. For news items it doesn't matter because the hash couldn't be stored as an array anyway due to the (anticipated) large number of news items.

Are you saying this interpretation is wrong?



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

Search: