I’ve written a command line app in Go which I now want to put a web front end on. As the app can take up to 10 seconds to run, I don’t want to just merge the code into a web framework and call it when the user clicks go, I want to use some kind of call out to the code as a separate app/thread/routine/whatever and then let the user know when the job is done so they can come back and view the results.
There is obviously the chance that the app will be called multiple times so, to avoid overloading the server, I want to have some kind of worker queue that jobs get placed in so no more than X jobs can be ran at once.
I can think of a few ways to do this but was wondering if there was any kind of framework already created for doing this. Any suggestions?