-
Notifications
You must be signed in to change notification settings - Fork 0
Home
SWATCHDOG is a Open Source project that provides a system service, a Windows service or UNIX Daemon depending on the OS that starts a given application and ensures that if, the application is terminated, the same application is restarted.
Multi-platform OS service to provide an application with an extra availability layer. The project ensures that an application is always running in the event of a crash.
The project concept is still ongoing.
The project depends on the OSAPI and OSAPI Plus libraries for the OS interface.
While the project is multi-platform it's dependent on the the availability of the OSAPI libraries and, in particular, the OSAPI C library which provides the OS API wrapping. The project doesn't provide the instructions on how to integrate the service with each OS Service Manager but such instructions are easily available in the internet.
The project deliverable is an executable that is intended to be configured as a system service. Upon starting up by the OS Service Manager, the service reads a configuration file to import a configuration. The configuration is used to:
- Plugin into the OS Log Service
- Plugin into the OS Service Manager
- Launch the managed application
- Wait for an event and depending on the event:
- Either restart the crashed managed application
- Terminate the application and itself
This service depends on the OSAPI libraries for OS interface wrapping.
After cloning the GIT repository to a local directory (let's use $HOME/repository/swatchdog for the example bellow):
- Add SWATCHDOG_DIR variable to your environment
-
Linux
SWATCHDOG_DIR=$HOME/repository/swatchdog; export SWATCHDOG_DIR
- Go to the Release directory
-
Linux
cd $SWATCHDOG_DIR/Release
- Execute make command
The resulting executable is placed in the Release directory.
The API documentation is still under development and will be placed under the project docs folder.
The detailed description for the project is here.
The support of different OS types and versions by the library is only limited by what is provided by the OS Wrapper API of the OSAPI (C) library. Check this last one for this information.
The library itself only imposes the requirement of the usage of the C++ Standard which is C++14.
- Linux
- GCC/Clang supporting C++14 is required (advise is to use the latest available)
- GNU Make version 4.2.1 or above (older versions may be supported but were not tested)
The project license is the MIT license which means that the project can be used as you wish. However, your contribution is welcome in order to develop it so that others (and yourself) reap the benefits.