public void dispatch() {
		// the following messages are processed by replicas
		if (this.msg instanceof UpdateMessage)
			new UpdateMessageHandler().handleMessage(this.msg);
		else if(this.msg instanceof QueryMessage)
			new QueryMessageHandler().handleMessage(this.msg);
		else if(this.msg instanceof GossipMessage)
			new GossipMessageHandler().handleMessage(this.msg);

		// the following messages are processed by clients
		else if (this.msg instanceof UpdateAckMessage)
			new UpdateAckMessageHandler().handleMessage(this.msg);
		else // if (this.msg instanceof QueryAckMessage)
			new QueryACKMessageHandler().handleMessage(this.msg);
	}