2 ms·
I don't know, I don't think it should be compared (or considered as an alternative to) MongoDB, and certainly never SQL. I use it to store cached keys, session
by StavrosK 13y ago
I don't know, I don't think it should be compared (or considered as an alternative to) MongoDB, and certainly never SQL. I use it to store cached keys, session data and similar other data that I can always regenerate. I've also had great success using it as a message queue on multiple projects.
What was your use case, and what was your experience with it?
- meritt 13y agoAgreed. If Redis is an acceptable alternative to MongoDB you're using one of the two very incorrectly.
- lmm 13y agoUse case: I want to store some json values against some string keys. Which would be very incorrect to use for this?
- StavrosK 13y agoIf the data is critical and you must keep them, both. If not, either.
- jjirsa 13y agoHow often are you updating the json values? 10/s? 100/s? 1M/s? How many string keys? Millions? Billions? What happens if you lose an update? Redis great for lots of rapid reads and moderate write speed for data that fits on a single server or can be manually sharded well (if it's straight k=>v, as you describe, that basically means your json fits in RAM; if you're using larger objects like sets/zsets/etc, it becomes a slightly different discussion), as long as your application can lose a few seconds without killing you (BGSAVE isn't instantaneous, of course).
- webtrill 13y agoMongoDB is not significantly better at any particular thing so yes, Redis can be used as an alternative for the things I may use MongoDB for. Keep a close eye on http://www.amisalabs.com http://www.amisalabs.com
- swah 13y agoRedis people think it could be used instead of SQL for some designs: http://redis.io/topics/twitter-clone http://redis.io/topics/twitter-clone I want to use it in a small project so I can learn the design patterns associated with key-value stores. I'm sure there are good and bad things about using Redis vs Postgres. But it has to hold my data, so... does it hold my data or not? I'm talking about single box stuff here, of course. (Of course, I'll just use it and find out myself).
- StavrosK 13y agoThat's supposed to showcase redis' features, not to tell you that you should dump Postgres for redis.
- bsg75 13y agoWhich is a mistake a lot of developers make - trying to replace one data store for another wholesale, and then being surprised when problems arise.
- swah 13y agoBut why not? Is all data in a database that important? Maybe alternative databses would generate new webapp patterns, like dynamic languages do.