views:

110

answers:

2

Simple question, could I conceivably use redis instead of mysql for all sorts of web applications: social networks, geo-location services etc?

+1  A: 

Nothing is impossible in IT. But some things might get extremely complicated.

Using key-value storage for things like full-text search might be extremely painfull.

Also, as far as I see, it lack support for large, clustered databases: so on MySQL you have no problems if you grow over 100s of Gb in Database, and on Redis... Well, it will require more effort :-)

So use it for what it was developed for, storing simple things which just need to be retreived by id.

BarsMonster
how would I do something like get all keys starting with user ... where the value is less than 5?
Travis Glines
@Travis Glines, well it's opensource, so you can implement it :-D
BarsMonster
Travis Glines: to be able to make that query store your data in a format that allows you to do so (a sorted set should work for that purpose). if you want to be able to make general queries, use a relational database.
rpetrich
A: 

ACID compliance is a must, if data integrity is important. Medical records and financial transactions would be an example. Most of the NoSQL solutions, including Redis, are fast because they trade ACID properties for speed.

Sometimes data is simply more convenient to represent using a relational database and the queries are simpler.

Also, thanks to foreign relationships and constraints in relational databases, your data is more likely to be correct. Keeping data in sync in NoSQL solutions is more difficult.

So, no I don't think we can talk about full replacement. They are different tools for different jobs. I wouldn't trade my hammer for a screwdriver.

randomguy