Is there an elegant way to shutdown a Fantom process and restart it? I was thinking of something like this:
Start an external "restarter" process from the webserver process that we want to restart
Shutdown the webserver process
Start the webserver process
Exit the restarter process
Thoughts? Specifically I'm trying to make a simple script in SkySpark that will restart the server. I know I could have posted it on skyfoundry.com, but I felt this was good knowledge applicable to Fantom in general.
SlimerDudeSun 26 Oct 2014
Both draft and BedSheet do something similar, so you may want to check their code.
They start a simple proxy web app on port P which forwards all requests to the real web app on port P+1. The proxy then re-starts the real web app as it sees fit.
andyMon 27 Oct 2014
If its external to the actual JVM process - on Unix this is typically done with init scripts. There's some info on how to do this specific to Fantom here:
Jeremy Criquet Sat 25 Oct 2014
Is there an elegant way to shutdown a Fantom process and restart it? I was thinking of something like this:
Thoughts? Specifically I'm trying to make a simple script in SkySpark that will restart the server. I know I could have posted it on skyfoundry.com, but I felt this was good knowledge applicable to Fantom in general.
SlimerDude Sun 26 Oct 2014
Both draft and BedSheet do something similar, so you may want to check their code.
They start a simple proxy web app on port P which forwards all requests to the real web app on port P+1. The proxy then re-starts the real web app as it sees fit.
andy Mon 27 Oct 2014
If its external to the actual JVM process - on Unix this is typically done with init scripts. There's some info on how to do this specific to Fantom here:
https://bitbucket.org/afrankvt/fantomlinodeguide/src/tip/install-init.md