I have a server (Sinatra) that I want to use to run and monitor a scheduled ruby script. That script needs to be able to provide status updates back to the server script, and the server needs to be able to execute that child script with arguments.
Aside from fully implementing the code from the child script into the server script, the only way I could think of doing this would be the use of global variables. But I'm concerned as this could get very messy if I keep doing this type of setup across multiple server scripts, and I know global variables are frowned upon.
What is the best way to handle this situation? I haven't really used modules but I don't see how I could use modules when I need the child to send updates back to the parent..