title: Socket IO : When to use rooms and when to use namespace?
body: <p>I am building an Node.js application for collaboratively editing documents. Each document will have a separate private chat (which is build using Socket.IO).</p>
  
  <p>Now I am unclear on which is the correct method for restricting each chats to only the members currently editing that particular document.</p>
  
  <p>Should i be using separate rooms:
      <pre><code>io.sockets.on('connection', function (socket) {
        socket.join(documentId);
        socket.broadcast.to(documentId).emit('new member');
      });
      </code></pre></p>
  
  <p>or should i be dividing each document chat into new namespaces:
      <pre><code>var chat = io
      .of('/chat/' + documentId)
      .on('connection', function (socket) {...}</code></pre></p>
  
  <p>Or is there a 3rd method that better suits my need?</p>