I am trying to design a new application but am a little stuck on the best way to do it.
What I want to be able to do is have a bot connected to an irc channel which is gathering information from the chat messages and then I want to have an HTTP endpoint where I can get results from the information gathered so far.
I have a bot running that gathers the information I want and I can create endpoints but how do I architecture this into 1 application? Do I have 2 applications? 1 that outputs to a file and the endpoint just reads the file and outputs that? I would prefer it in 1 application but haven't been able to find a solution like this so far.
I am using DotNet core 2.0 currently and deploying to a Raspberry Pi.
It depends of workload. If app gathering information doing it periodically and do nothing rest of the time I would suggest start this as a ASP.NET service:
Install all dependencies for you current console app (this will work). To gather data you can use HangFire. It library to run background jobs. To run background job reccurence register job like this: