public void insertReplication(IInsertDeleteReplicationRequest req) throws RemoteException {
		String key = req.getKey().trim();
		String value = (String)req.getValue();
    	int serverId = getServer(key);
		// drop the package, if the request is visited all servers 
		if(req.getProbe().contains(this.myId)){
			handleMessage(req, "insertReplication: machine " + this.myId + " - drop package: request " + req.getRequestId() + ". Request visited all servers.", true);
			// we are the the master server, so both replications are not updated, 
			// mark the insert as a dirty to be synced with replication servers when they join the ring 
			if(serverId == this.myId){
				handleMessage(req, "insertReplication: machine " + this.myId + " - Mark dirty insert : request " + req.getRequestId() + ".", true);
				insertToCache(this.dirtyInsertCache, key, value);
			}
			handleMessage(req, "-------------------", true);
			return; 
		}

    	synchronized (replications) {
    		ReplicationStorage rep = getReplicationStorage(serverId);
    		if(rep != null && serverId == rep.getId()){
    			// local server contains the replication
    			handleMessage(req, "insertReplication: machine " + this.myId + " - request " + req.getRequestId() + " from machine " + req.getMachineId() + " with <" + key + " , " + req.getValue() + ">  is inserted.", true);
    			if(req.isDirty())
    				handleMessage(req, "insertReplication: machine " + this.myId + " - request " + req.getRequestId() + " Mark dirty insert replication", true);
    			handleMessage(req, "+++++++", true);
    			req.incrementUpdateCount();
    			rep.insert(key, value, req.isDirty());
    			// drop the package, if both replication servers are updated
    			if(req.getUpdateCount() == MaxServersToConnect){
    				handleMessage(req, "insertReplication: machine " + this.myId + " - drop package: request " + req.getRequestId() + ". Both replication servers are updated.\n-------------------", true);
    				return;
    			}
        	}
		}
    	
    	// send the update replication to the next machine
    	Map.Entry<Integer, String> repMachine = getNextLiveMachine();
    	req.updateProbe(this.myId);
		try {
        	handleMessage(req, "insertReplication: machine " + this.myId + " - " + req.printRequest() + " routting to machine address " + repMachine.getValue(), true);
			IDistributedHashTable dhtNextMachine = (IDistributedHashTable) 
					Naming.lookup("rmi://localhost:" + repMachine.getValue() + "/DistributedHashTable");
	        dhtNextMachine.insertReplication(req);
		} catch (Exception e) {
			handleMessage(req, "Error-insertReplication: machine " + this.myId + " " +  e.getMessage(), true);
		}
    }