KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
There are 1 on 1 live chat. Two solutions: 1) I store every message into database and with jQuery's help I check if there is a new message in database every second. Of course I use cache either. If there is, we give that message. 2) I store every message in one html file and every second through jQuery that file is shown over and over again. What is better? Or there is third option? And in general, what is better, mysql or file for this kinda project? Thank you very much. P.S. The most important question is: what is more efficient and what way will eat less resources! Edit: And is it, nowadays, very bad for many chats (let's say 2,500 chats, that means 5,000 users) to use long polling and check when file was edited every second through javascript? I use very similiar methods like this chat: http://css-tricks.com/jquery-php-chat/ Will it kill my hosting?
Tags (comma-separated)
Save Edits
Cancel