Ajax Chatrooms - Best Method?
Hello. Before I continue working on my chatroom project, I'd like to consult. My concerns are about the chat's speed and stability. I'd like to know what the ups and downs are of using mysql vs using xml to store the messages. & if there's anything else I should know, please advise. Thanks.
Of course, there's also bandwidth to worry about. Chatrooms have the potential to generate millions of server requests each hour.
When ajax sends instructions to the server to access a specified database or file and send back only a portion of information, I'm unsure of whether the size of the entire database table/file count toward your bandwidth, or just the information returned.
I guess nobody at WebDeveloper has any experience with Ajax chatrooms.
Originally Posted by okendoze
A few ideas out there for you. XML is certainly very fast, but it can become problematic as your chat session grows. XML isn't exactly fast for storing huge sets of data.
For instance, if you wanted to keep the chat logs of 2 users for an entire year, multipled by the number of users you have (as each user could end up speaking to each other users) you quickly have a very large data set.
I would use MySQL for this sort of thing, but why not have the best of both worlds?
As long as you design your chat program correctly you should be able to pull chat sessions out of MySQL or XML with ease. Just make sure your data layer is well thought out, and if you find out that MySQL or XML isn't the way it's easy to swap data sources.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread