This addresses just part of your problem, but I suggest taking a look at "Web Sockets":
http://en.wikipedia.org/wiki/Web_Sockets
Web Sockets is a technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket, designed to be implemented in web browsers and web servers. The Web Sockets API is being standardized by the W3C and the Web Socket protocol is being standardized by the IETF.
Within a few years all of this will be standard in every major browser, and until then there are a number of (JS) libraries providing client-side support.