The purpose of this project is to practice implementing the Heartbeat architectural tactic with passive redundancy and fault recovery. This tactic aims to improve the availability of a system by monitoring the status of a crtical component to ensure that it is alive and running. In this example, I have modeled a pacemaker system. I identified the critical component of this system as being the sensor which detects heart pulses sent by a simulated heart. I inject an error to make the component crash on purpose and make sure that the system is recovering from the crash.
This application was created with JDK 8 and Eclipse
-
Clone or copy this repository to your local machine
-
Open up Eclipse, and import this project
File > Import... > General > Existing Projects into Workspace > PATH TO PROJECT
-
Run PacemakerController
-
Run HeartSimulator
-
Thats it! A GUI should pop up and show you that the pacemaker is running.
-
Clone or copy this repository to your local machine
-
Open up command line client
-
Change directory to
...PATH/TO/HeartbeatTactic/bin -
Run PacemakerController with the following command:
java pacemaker.PacemakerController -
Open a second command line client
-
Change working directory to same as before (
...PATH/TO/HeartbeatTactic/bin) -
Run HeartSimulator with the following command:
java pacemaker.HeartSimulator -
Thats it! A GUI should pop up and show you that the pacemaker is running.
