I have developed a Flash based chat client that displays messages posted by users belonging to a group along with their username and time of writing. The data is stored in a mysql database with the group id, user id and message so that it persists beyond chat sessions and allows users logging in at a later time to see the discussions, less of a chat, more of a notice board. When a user writes a message I want the chat clients to update instantly an appear to be real time chat. My solution so far has been to include an interval in my flash code that calls a PHP page which queries the database for new comments and return this to Flash.
I think from what Ive read that this approach is called long polling? is that right? Is this robust enough for volume? Would I be better looking at pushing the data to the client when there are changes? How do I detect these changes? I have looked at APE for example but I dont think that this stores the messages in a database.
Any suggestions?