logoalt Hacker News

jdw64yesterday at 3:59 PM1 replyview on HN

It feels like Redis is becoming a small database, which seems to make it more convenient to use. Could you add more examples that clarify where the boundary should be?


Replies

antirezyesterday at 4:04 PM

Well, Redis is a data structures server, and has very complicated and edgy data structures like the HyperLogLog, so I have very little doubts that a fundamental data type like the Array will fit :) Also the actual complexity added is mostly two C files that are quite commented and understandable.

    wc -l t_array.c sparsearray.c
        2012 t_array.c
        2063 sparsearray.c
        4075 total (including comments)
Sure there are also the AOF / RDB glues, the tests, the vendored TRE library for ARGREP. But all in all it's self contained complexity with little interactions with the rest of the server.

A quick note: if we focus only on that part of the implementation, skipping tests and persistence code which is not huge, 4075 lines in 4 months are an average of 33 lines per day, which is quite low.

show 1 reply