I am making a site where users will be able to chat with each other in person-to-person chats and group chats like on facebook, and I would like to ask a few questions before I actually dig in and start coding.
I thought about creating the chat application with javascript, ajax and php, and the conversations will be saved with mysql (PDO with prepared statements connecting to the database). Are these good for doing an application like this, or are there some languages more fitting for this?
Secondly, I fear that if many users would be logged in at the same time, it would make the site slower. Is mySQL really a good RDBMS when there are many users on a site, and are there some methods like PDO but that are intended to do querys faster?
Your suggested solution with AJAX, PHP, MySQL and PDO is totally fine (as Michael Rice already said). But if you want a real chat that updates immediately, the disadvantage is that you need to constantly poll from the server (via ajax). Maybe you could take a look at WebSockets (link to js api spec, link to protocol spec). That would allow you to instantly update when a user says something in the chat. Then you would not even need to store the conversation server-side!