couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From howard chen <howac...@gmail.com>
Subject Use couchdb as the data store for real-time chat room
Date Sat, 14 Mar 2009 10:20:58 GMT
Hi all,


Currently we have a quite large scale online chat-room, using MySQL /
Memcached for data store. Chat room message is refreshed every 2 - 10
sec (adaptive, depends on "chat rate", using Ajax).

Each user message is stored in MySQL as the as rows containing the
fields such as { User_Name, Message, Add_Time }, users send a request
to server with { Last_Time } - which indicating the last messages
fetched time, and all rows between Add_Time to  Last_Time will be
returned using JSON.


For performance reason, I added Memcached in front to do some caching.
The system currently is running quite well except bottom neck is in
MySQL if chat room get more and more traffic.


Now I am considering to try couchdb, but before that, maybe you guy
can comments on my usage to see if feasible to try couchdb.


1. I know couchdb is good for simple key-value query, but is couchdb
fast for range requests ? E.g. I want to get all message in between
Add_Time -  Last_Time? How does it compare with MySQL range query on
index?

2. Is Memcached useless if I am using couchdb?



Thanks.

Mime
View raw message