Really, a browser-based answer to this kind of thing is *NOT* the best solution.
What you really want is the capability to PUSH messages to particular individuals, and HTTP cannot do that.
Having said all that: Your long-timeout solution using AJAX isn't a bad one, but I'm not sure, then, that PHP Is the right choice for your server-side code. Likely a better choice would, again, be Java Servlets for the server-side coding.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.