Running apps as services: Is there a standard?
I was tired of trying to keep track of things in Windows service manager, and of people trying to start duplicate instances of services... so I whipped up a tiny service manager program: It works, but it's not pretty lol
The idea was to start desired programs as a child process, store PIDs, check for duplicate instances of services, and pass start/stop/status type messages using a buffer file
The Main Question:
Is there an actual standard, open-source way of managing and tracking java apps running as services? Or is rolling your own launcher/manager expected?
Edit: I am very aware of systemd/initd/systemctl; but I can't always win the "we should run this on linux" argument 🤷
Posted Mar 11, 2022, 4:35 PM UTC · edited
On linux you would use systemd/initd.
On windows things get a bit more complicated, because the executable must implement service interface. To solve that there's winsw, nssm, which permit running arbitrary applications as services.
As for your main question, as a devops, i'd rather see your application running as a service, rather than hacked together via some launcher scripts. That way I can just hook into service manager and see what's down when I get a message in the middle of the night that some page that's the first time I'm hearing about is down.