I did some UI work with the guys who made Qunu. They used similar techniques for in-browser chat: Erlang, "binding" via AJAX long polling. It was pretty advanced stuff at the time (3-4 years ago) - I believe other in-browser chat services like Meebo used polling.