4 ms·
"Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker" Lets draw the line somewhere the other
by shapefrog 4y ago
"Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker"
Lets draw the line somewhere the other side of applications that advertise themselves as having that function?
- Spivak 4y agoThe number of people that think that Redis is a KV store and nothing else is too damn high.
- skyde 4y agoRedis is not a database. it doesn’t have proper transaction support. it’s basically a cache with a fancy API so you can incrementally update data structure instead of having to constantly write the whole thing you are trying to cache.
- Spivak 4y agoSure it is! Redis is even fully ACID if you use the right persistence settings complete with transactions support and a WAL. You can even set up locking to abort/rollback transactions. In DB parlance Redis’ isolation level is strict serializability which is stronger than Postgres. If you mean “it doesn’t have every feature of Postgres” and behaves a little differently then sure but it absolutely is a database.
- skyde 4y agothe only way to do an "atomic increment operation" is to use the "Watch" command or to write stored procedure. Watch is a poor man transaction and stored procedure does not work when you need to read value interactively from somewhere else (user/filesystem/another database) while inside a transaction.
- Spivak 4y agoYou're literally describing INCR, it's atomic. But I know what you mean, you want atomic GET then SET which is done by WATCH. I don't disagree with you about WATCH being less powerful than PG transactions. SQLite data types are less powerful than PG types but it's still a database.