Would it be possible to have 2 website users talking back and forth via a "private message" type system. Obviously that is possible but here is where AJAX comes in.. Would I be able to have a "message(0)" and then as soon as a user sends the person a message it changes to "messages(1)" or 2 messages.. "messages(2)"? All this being done in real time without a page refresh.
Or even better.. a Java type chat applet without using java and just using AJAX.
(btw please dont tell me AJAX is not a language I know its just type of style like XHTML).
That's difficult to say. Every message a user sends is an additional request that the server has to process so for a large number of users the number of requests can be very demanding on the server. The number of requests can be reduced if some form of buffering is implemented. In addition to this the script must poll the server in order to determine if there is a message waiting for the user.
In my opinion there is no reason why such a script would necessarily require a prohibitive amount of resources.
Whether or not it is reasonable to include a chat feature for your site depends on the number of users that are going to be using it, how well the script is implemented, and the load your server can handle.
Well here are lot of AJAX chat scripts and lot of people are using the scripts. I do not think so it will effect the speed of website. But for this you should confirm from any expertise.