One summmer night I arrived at campus after a 30 minute drive, ready to remote in to home PC only to find that my VPN was unable to connect because my ISP had changed my home network's IP address (they will not give me a static IP). Suddenly I was at the mercy of my very not tech-savvy parents to determine my home network's new IP. This was not the first time this had happened, but I wanted to make sure it was the last time. And so, Deacon was born. Deacon started as a service that ran on my Debian server that texts me anytime my public IP changes, along with the new IP. Since then, Deacon has been expanded into a lightweight monitoring suite with a console front-end.
When Deacon enters version 1.0, I will make Deacon open-source and available for download!
- How should the data structure be set up for alert CRUD?
There are many ways to approach this; picking the correct one was difficult, especially because in the begining the scope of Deacon was changing everyday. I ended up using discriminated unions to handle alert storage. Unlike F# or Rust, C# does not have built-in support for discriminated unions, but similar functionality can be achieved using abstract
classes and JSON serialization. This is not a perfect solution, but this will have no issues scaling should I add new types of alerts in the future.
- Websockets or REST API?
This is something I still haven't decided upon as there are pros and cons to both. I am still not 100% about my vision for how Deacon's API will be set up.
This is an example of a CREATE wizard in Deacon. The command add sender prompts the user to enter the appropriate information with basic validation. Afterwards, Deacon displays the entered information in a table for the user to confirm.