@Override
    public void run() {
        
        /* First thing we are supposed to do is to broadcast a discovery message
         * to the cluster.
         */
        
        log.info("Starting cluster manager");
        
        try {
            broadcastDiscovery();
            Message discoveryResponse = comm.receive();
            
            
            /* If we are here, that means someone is already up and running, or
             * there was another discovery message broadcasted. This will be 
             * complicated. Will need to think through the solution to implement
             * simultanious braodcasts. For now, just implement the solution 
             * where no simultanious discovery broadcast happen
             */
            
            
            processMessage (discoveryResponse);
            
        } catch (SocketTimeoutException to) {
            /* Looks like I am the first one up. Initialize the table.
             */
            initTable();
        } catch (IOException ex) {
            log.severe("ClusterMgr exiting as the cluster discovery failed");
            ex.printStackTrace();
            return;
        } catch (IllegalStateException badState) {
            log.severe("ClusterMgr exiting due to inconsistent state");
            return;
        }
        
        
        AetherNode.setClusterRunning();
        /* We are here means our table is initialized and we are up and running.
         * Now keep on listening to the socket for any incoming messages
         */
        
        while (true) {
            Message m;
            try {
                m = comm.receive();
                processMessage (m);
            } catch (SocketTimeoutException to) {
                log.finer("Socket timeout");
                // nothing needs to be done here
            } catch (IOException ex) {
                log.severe("IOException while listening on socket");
                ex.printStackTrace();
                return;
            }
            
        }
    }