views:

219

answers:

5

I'm implementing a chat system.

What kind of database I should use for logging chat messages?

I need to do some queries to it. For example "give me all the links from user x between these dates"

I've heard some good things about MongoDB for this kind of stuff. How about other NoSQL solutions? Redis? Cassandra?

How about old SQL solutions? Although I'm very interested having experiences with NoSQL-databases, but I'm not going to it just sake of it :)

I need to be able to handle hundreds of active users.

A: 

I've used SQLite for this type of logging in the past and it's worked a treat.

Galwegian
Doesn't it suffer from write locks? Since in chat systems you'll be getting whole bunch of writes.
Epeli
A: 

I consider that you are not a google or a twitter ;) just use mysql, sqlite or any relational database. This should completely suffice for you, but if it don't then think about nosql solutions, not now.

Sebastian Brózda
Why? Are those easier or what? I have no problem learning new database systems. I would actually like to do so.
Epeli
nosql is a new trend it isn't complete examined. If you want just to do it for testing (on non-production environment) then go on.
Sebastian Brózda
You don't have to be twitter or google to use NoSQL solution.
jpartogi
A: 

I recommend document stores like CouchDB. Have a look at some NoSQL solutions here.

Exa
Can you argue why it would be good for this?
Epeli
+1  A: 

Ok. So basically NoSQL is not a panacea. You really have to know the sweet spot for each NoSQL to gain maximum benefit of it.

For your scenario I would recommend mongodb. Why? Because mongodb offer very rich query just as you would have in SQL database, unlike key-value store database. Mongodb is relatively fast in both write and read.

Unless you need massive scalability like facebook or twitter, cassandra is not for you.

jpartogi
A: 

I suggest Cassandra. I find it easier to develop for than even MySQL, though there is a little bit of learning curve. Dealing with schema changes is a real pain in production environments with MYSQL, IMO.

Sashi