I have a server application that runs in an infinite loop, only reacting to SIGINT. It is put inside a
screen process. If I have to make any changes (reload configuration, add new plugins, etc) I simply restart the whole process so the changes are picked up during initialization.
I'd love to refactor the application so that I have two ways of interacting with it: A web UI, and a console interface.
For the web UI I use a small embedded HTTP server and can hook up the requests to my event loop. But I'm unsure how I should implement the cli. Is it advantageous to provide a separate cli process, accessing the same embedded server? Or would it be preferrable to make my own application wait for text input? In the latter case, I'm struggling with implementing the event loop to poll both the web requests as well as the console at the same time.