title: Multiple chat rooms - Is using ports the only way ? What if there are hundreds of rooms?
body: <p>Need some direction on this.
  I'm writing a chat room browser-application, however there is a subtle difference.</p>
  
  <p>These are collaboration chats where one person types and the other person can see <code>live</code> <strong>ever keystroke entered by the other person as they type</strong>.  </p>
  
  <p>Also the the chat space is not a single line but a textarea space, like the one here (SO) to enter a question. </p>
  
  <p>All keystrokes including tabs/spaces/enter should be visible live to the other person. And only one person can type at one time (I guess locking should be trivial)  </p>
  
  <p>I haven't written a multiple chatroom application. A simple client/server where both are communicatiing over a port is something I've written.  </p>
  
  <p><strong>So here are the questions</strong><br>
  1.) How is a multiple chatroom application written ? Is it also port based ?<br>
  2.) Showing the other persons every keystroke as they type is I guess possible through ajax. Is there any other mechanism available ?</p>
  
  <p>Note : I'm going to use a python framework (web2py) but I don't think framework would matter here.</p>
  
  <p>Any suggestions are welcome, thanks !</p>