The time has come to describe the project that I’ll be working on for the next few (10?) weeks. I’ve named it Sentry, and here’s the brief description (yes, I’m lazy and it’s a copy-paste from the GitHub):
Define “health checks” for your applications, resources and infrastructure. Keep your sentry on the watch.
It will be (hopefully) rather simple and easy to use library (published as the beloved NuGet package), that will have one, main responsibility: as the programmer, you’ll be able to define a set of rules and what I’m calling now as the “watchers”, that will perform health-check on a given resources (which could be a website, API, database etc.). Then you will just invoke the main method that’s going to execute all of the checks and report what happened (for example by throwing some very friendly exception and crashing your application).
Basically, the flow would go like this:
- Install the Sentry package into your project (console application, windows service, web application, you name it).
- Configure the Sentry, add “watchers” for observed resources, initalize hooks (callbacks) if needed.
- Call the main Sentry method and voilà, your work is done here.
It will be written in the .NET Framework using C# language, and here are some of the main features that I’m planning to implement:
- Fluent API
- Seriously, Fluent API (aka self-descriptive methods)
- Simplicity & extensibility – just a few base interfaces containing one or two methods (easy to ovveride, test and extend with custom code)
- Asynchrony (still thinking about the additional “fallback” to handle the good, old fashioned synchronous calls)
- Built-in “watchers” (as external dependencies) for website, API, database, etc.
- Integration (as external dependencies) with services that will help to notify system administrators when the resource is not alive (literally dead), e.g. email and SMS senders
- No external dependencies (featherweight)
- Hardly any comments in code
- Some fancy logo
I will do my best to make that code as efficient as possible and provide some useful examples in code on how to use it along with the documentation (as long as the README.md file formatted with Markdown can act like one). And yes, there will be also automated tests (unit, integration, end-to-end) + maybe a build server.