Pusher/PubNub alternative using node.js on Heroku

I would like to build my own multiplayer game server using node.js and deploy the code on Heroku. My question is, if what I describe is possible like that :)

I want players from an Android game to be able to connect to a very fast (not necessarily real-time) game server. The game server should be able to group them into rooms (channels) and when they are in rooms, they should be able to publish and subscribe. That means, I want the players to exchange game information via the node.js server.

On the server, node.js with ws shall be used to have a WebSocket server listen for client events like this:

var WebSocketServer = require('ws').Server;
var wss = new WebSocketServer({ port: 8080 });
var clientList = {};

wss.on('connection', function(ws) {

    ws['AUTH'] = getGUID();
    clientList[ws['AUTH']] = ws; // ws['AUTH'] has joined the server

    ws.on('message', function(message) {
        for (var clientID in clientList) {
            clientList[clientID].send(message);
        }
    });

    ws.on('close', function() {
        delete clientList[ws['AUTH']]; // ws['AUTH'] has left the server
    }

    ws.send('something');

});

function getGUID() {
    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
        var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
        return v.toString(16);
    });   
}

On client side, I would like to use autobahn.ws (which part? WAMP? PubSub or RPC?) to communicate with this game server.

If this works, this is a few lines to have a very basic version of what services like Pusher and PubNub offer, right? One would have to add channels, authentication, etc.

If this is possible in with the code above, will it also work on Heroku?

  1. What about having multiple dynos? Do they share common memory (clientList) or do I have to sync between them? How? Using the cluster API?
  2. What number of clients do you roughly expect to work on a single dyno? Is 100 concurrent users per dyno expecting too much?

If you want to use WAMP (via one of the Autobahn libs or others) then you could check out wamp.io - a nodejs WAMP implementation.