Create a configuration for a Harbour¶
Currently, the harbours are static and after they start, none harbour can create additional agents. They can only replicate an agent.
To configure the Harbour, we need to write a YAML file which configures one Harbour.
This tutorial explains how to create these files.
To see how to use this configuration file, please see the guides: Usage and Run experiments
Main architecture of the file¶
The configuration file is divided into two parts:
- The first is about the Harbour itself and contains some information like its capacity, the network port, etc...
- The second contains the initial list of the agents.
Hence, a configuration file looks like this:
agents:
LULU-0:
actions: migration.RandomMigrate,replication.ReplicateToReachRGAggregate,evals.Logger,algorithm.migration.LeaderBased
class: SKD
data: LULU-0
failureDetectionAfter: 5
messageDelayInBuffer: 14400
rg: 3
size: 3
sleepForBeforeMigrate: 4
stopSendingAfter: 900
timer_RandomMigrate: 10000
probabilityCrash: 0
capacity: 90
gui: true
name: Harbour0
port: 8000
Configuration of the Harbour itself¶
Currently, there re five parameters for the harbour:
agents: it's the list of agents initially created on this Harbour (see below for the configuration of one agent).capacity: it's the maximal size of the agents on this Harbour. The current size is the sum of the variable size of each agent hosted.gui: it's a boolean which controls the presence of the Jade GUI (useful to debug but not in experiment).name: it's a unique name that identifies the Harbour.port: it's the network port used to communicate with other Harbours.
Configuration of the agents¶
The configuration of an agent looks like the following:
LULU-0:
actions: migration.RandomMigrate,replication.ReplicateToReachRGAggregate,evals.Logger,algorithm.migration.LeaderBased
class: SKD
data: LULU-0
failureDetectionAfter: 5
messageDelayInBuffer: 14400
rg: 3
size: 3
sleepForBeforeMigrate: 4
timer_RandomMigrate: 10000
probabilityCrash: 0.0
The first parameters are mandatory:
actions: the list of behaviours of the agent (see How to create a behaviour)class: the class name of the agent (see How to create an agent)data: a string which corresponds to the datafailureDetectionAfter: the delay before considering a family member that does not answer as deadmessageDelayInBuffer: the time (in s) a message can be in the buffer without ACKedrg: the replication goal of the familysize: the size of the agentsleepForBeforeMigrate: the minimal time between two migrations
Then, we have different parameters which customize the behaviours. Here:
time_RandomMigrate: the delay between two migrationsprobabilityCrash: a double corresponding to the probability that an agent fails