I'm designing a software platform in automation that is responsible of many different tasks like:
- Core functions
- Driver interface for machines
- UDP listener for machine messages from PLC
- UDP listener for other software components messages (other port)
- Internal control Web Service used by external components of platform, such as administration client
- Other things...
My idea is to create a single Windows Service that is developed in a modular way, so that there is more or less a module for each of the above listed functions, so that you can enable/disable each module independently, and at the same time, being able to start all the modules with the start of the service.
Now, my main doubts are 2:
- Is it a valid architecture? Or is it preferable to separate the modules into individual services or components of some kind? In this case, how can I achieve to have the total management of all the modules?
- If the architecture that I thought can be good, how can I implement the start up and management of the different modules within the Windows Service?
I have already read several articles explaining how to develop a Windows Service with C# and VS 2017 (using Topshelf to make debugging easier) that hosts one self-hosted Web API Web Service or one .NET Core Web Service. I think that could be the way for me and I'm very attracted to the idea of using .NET Core for API, .NET Standard for shared function libraries and a Windows Service. But I don't know how to implement the scaffolding for a Windows Service that hosts all those different components.