I got a question for you all. What would be more effiecient for datastoring that is going to be constantly extracted like in a chat application? a MySQL database? or a Flat text file?
Well, the most effiecient would be the memory :) With some socket programming it should be possible to create a connection to each client - and a server show sent out the incoming messages to the clients.
But flat file vs. mysql. I would prefer MySQL - it is fast, it can handle a lot of request. If you use flatfile, you need to do some checking for the if the file is open already - so only one client at the time can write to the file - if can be very slow if a lot of users is on the chat at the same time and write a lot of messages - cause the whole file need to be locked every time a single user write a message.
So in my opinion, you should do some socket client and a server - or use a database :)
-- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php