使用nodejs + socket.io和mysql聊天

So I want to develop a chat system based on nodejs and socket.io, I have made a prototype and it works, the only thing that is stuck in my mind is how to store the chat messages in the database.

I guess is not a good idea to store a message when a user hits the enter button, because this is live chat you could have 1000 just from a user in 30-60 min.

The question is WHEN to store the data in the database, because I don't think that storing right away when the user hits enter will work on the long term?

The chat works on the same idea as facebook.

查看全部
dongliao9018
dongliao9018
2013/08/07 14:21
  • node.js
  • socket.io
  • php
  • mysql
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复