Step 2 - REPL (5 pts)
Closed this issue · 1 comments
The goal is now to create a process that will artificially modify the behavior of our system (in other words a fault injector). This process is therefore "outside" our system but will send messages to interact with the system processes. (Think that now the processes of the system must be able to read messages coming from different horizons). For the moment our REPL must be able to send the following commands:
SPEED
(low, medium, high) which will impact the execution speed of a process. In other words, there will now be a timer to slow down the speed of the various processes in the system.CRASH
which will simulate the death of a process. All the messages received will be ignored (except those of the REPL).START
which tells the clients that they can perform their requests from now on. Typically, this allows you to first specify the execution speed before starting the calculation.
This REPL should be implemented as a command prompt to enter commands with the syntax I let you define. As long as the conditions of your consensus are respected, the previous commands should not impact the results. Note that at any time we can run the previous commands (with the exception of START
which is run only once).
À faire :
- Parser Stdin
- Communication entre
Client
,Scheduler
,Worker
. Ça va nous être utile après et ça nous permettra aussi d'envoyer des ordres pour que la Node simule un crash dans REPL, ...- Créer des
NodeCard
et stocker les channels de communications dans une Map de list de struct.
- Créer des
- SPEED
-
Créer une fonction=>SendWithLatency
time.Sleep
entre chaque tick de la boucle de traitement de la note.
-
- CRASH
- Créer un attribut pour les nodes
IsCrashed
- Créer un attribut pour les nodes
- START
- Créer un attribut pour les nodes
IsStarted
- Créer un attribut pour les nodes