im going to use ajax/comet to create a chat. and i want to store the chat conversation.
every keypress will trigger an event that sends to backend.php that will store the letter. i wonder if i should store it directly in the database or in the textfile.
you dont have to consider the details for exactly how this chat's architecture will be. just that every letter pressed will be stored immediately.
i thought that if storing in mysql (im using php on a comet server) then there will be a lot of queries, just for one letter each. and if a lot of users are chatting, then it will be a heavy load with UPDATE and SELECT queries.
will storing the conversation in text files be easier for the server? just open it, append the letter and close it with php.
what do you think?