A background service that stops contracts expiring quietly
A cross-platform C# Worker Service and a companion crawler, built during my professional internship at Prológica.
- When
- March to July 2021
- Where
- Prológica, Lisbon
- My part
- Shared with one colleague
- Outcome
- Internship graded 19/20
The problem
Contracts and proposals have end dates, and nobody notices an end date until it has passed. The company needed something that watched those dates and warned the responsible person early enough to act, running unattended, on both the Windows and the Linux boxes they had.
The Worker Service
A .NET Worker Service, which is a long-running background process with no interface. It wakes on a schedule, checks what is about to expire, and emails advance notice. Building it for both platforms from one codebase was the part that taught me the most. Service lifetime, logging and file paths all behave differently once you leave Windows, and the differences only show up when the thing has been running unattended for a week.
The crawler
The second piece pulled data we needed out of an external web application that had no API. A C# crawler walked its HTML and CSS and extracted the fields with regular expressions, so the data could be filtered and brought into our own system.
Regex over HTML is a blunt instrument and it is brittle by nature, because when the source markup changes it breaks. Knowing that up front, the extraction patterns were kept isolated and easy to adjust rather than scattered through the code.
Also during this internship
- Syslog, research into how it works on Windows and on Linux, and what that means for collecting logs off both.
- Bootstrap templates for the company's own web application.
What I took from it
- Software nobody watches has to fail loudly, or it fails silently forever.
- Cross-platform is a claim you only earn by running it on both.
- When you have to build something brittle, at least make it cheap to repair.