Skip to content

Client \(\leftrightarrow\) Server communication

Preparations

Prior to initiating a training session, numerous preparation steps need to be carried out:

Create Actor: This involves setting up the individual account that will be managing the training. This could refer to an individual or a collective group who are responsible for the training. The actor might also be seen as the steward and coordinator of the training as well as its outcomes.

Create Participants: This involves identifying or setting up the individuals that will be participating in the training. Ultimately, the participants are characterized by HTTP(S) endpoints, i.e., access points to the server, which are addressed through notifications. These endpoints simply need to respond appropriately and relay their results back to the server.

Create Model: This involves providing a model that will be used during the training. This could mean selecting a pre-existing model or creating a new one.

Create Training: This involves consolidating the earlier discussed elements into a training object. The actual training process incorporates the actor, the participants, and the model to be trained. It's worth noting that an actor can also serve as a participant simultaneously. Additionally, key training parameters are established at this point. These parameters might include the aggregation method to be employed and the total number of global epochs for the entire training.

Start Training: This is the final step, where the actual training begins. The actor gives the start signal and all participants receive a corresponding notification.

Training Procedure

Once a training session is initiated, the server will independently manage the training with the assistance of the participants (or their endpoints).

In this process, the server manages all operations through notifications. Each notification is sent individually to each client via an HTTP(S) request. The most crucial notifications and a high-level overview of the notification-based training procedure are as follows:

uml diagram
Training process notifications
Primary Types of Notifications and their Associated Body Contents

In the following is a comprehensive overview of the most significant Notifications, including their HTTP(S) body contents, that a client would receive from the server throughout the course of a training session.

Training Start Notification - TRAINING_START

Notification that a new training is about to start.

{
    "notification_type": "TRAINING_START",
    "training_uuid": "string",
    "body": {
        "global_model_uuid": "string"
    }
}
Training Round Start Notification - UPDATE_ROUND_START

Notification that a new trainings round or the next global epoch starts.

{
    "notification_type": "UPDATE_ROUND_START",
    "training_uuid": "string",
    "body": {
        "round": "number",
        "global_model_uuid": "string"
    }
}
Training Model Test Notification - MODEL_TEST_ROUND

Notification that the latest global model should be evaluated.

{
    "notification_type": "MODEL_TEST_ROUND",
    "training_uuid": "string",
    "body": {
        "round": "number",
        "global_model_uuid": "string"
    }
}
Training Finished Notification - TRAINING_FINISHED

Notification that indicats the completion of a training process.

{
    "notification_type": "TRAINING_FINISHED",
    "training_uuid": "string",
    "body": {
        "global_model_uuid": "string"
    }
}

A more detailed perspective of the entire training process, including the communication between the server and clients as well as their primary tasks, can be visualized in the subsequent diagram.

uml diagram