public boolean sendMutationRequest(Account account,
                                       MutationType mutationType, String objectId) throws Exception {
        List<Integer> servers = getAvailableServers(objectId);
        if (servers.size() < 2) {
            Logger.log("Unable to send mutation request because less than 2 servers are available", servers);
            return false;
        }

        PrimaryInfo info = getPrimaryServer(servers, objectId);
        if (info == null) {
            Logger.log("Unable to find the primary server", servers);
            return false;
        }


        //create a mutation request object
        String requestId = UUID.randomUUID().toString();
        MutationReq mutationReq = new MutationReq();
        mutationReq.setClientId(this.nodeId);
        mutationReq.setData(account);
        mutationReq.setObjectId(account.getId());
        mutationReq.setRequestId(requestId);
        mutationReq.setRequestType(mutationType);


        //send the mutation request to all the servers.
        List<Integer> successServers = new ArrayList<>();
        for (int serverId : servers) {
            mutationReq.setServerId(serverId);
            String toBeSent = MessageParser.createWrapper(mutationReq, MessageType.MUTATION_REQ);
            Socket socket = sendMessage(toBeSent, serverId, false);
            if (socket == null) {
                continue;
            }
            DataInputStream dis = new DataInputStream(socket.getInputStream());
            if (MessageParser.parseMessageJSON(dis.readUTF()).getMessageType() == MessageType.MUTATION_ACK) {
                successServers.add(serverId);
            }
        }

        if (successServers.size() < 2) {
            Logger.log("Less than 2 servers acknowledged the mutation request", successServers);
            return false;
        }

        //send mutation write req to the primary.
        MutationWriteReq writeReq = new MutationWriteReq(requestId,
                this.nodeId, new ArrayList<String>(), account.getId());
        String toBeSent = MessageParser.createWrapper(writeReq, MessageType.MUTATION_WRITE_REQ);
        Socket socket = sendMessage(toBeSent, info.getPrimaryId(), false);
        if (socket == null) {
            Logger.log("Unable to complete mutation write");
            return false;
        }

        DataInputStream dis = new DataInputStream(socket.getInputStream());
        WrapperMessage wrapper = MessageParser.parseMessageJSON(dis.readUTF());
        if (wrapper.getMessageType() == MessageType.MUTATION_WRITE_ACK) {
            Logger.log("Mutation process completed");
            return true;
        } else {
            Logger.log("Mutation process failed");
            return false;
        }
    }