• Post Reply Bookmark Topic Watch Topic
  • New Topic

Start/Stop java app remotely  RSS feed

 
takaya treschi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a system composed by 5 standalone java applications, each of them is important for the good behavior of the system. Basically the output of one application is used as input for the next application until the final result. Now in order to monitor and manage such system I would like to build a web app that show me the status of each java application (running/blocked/dead etc.) and the possibility to start/stop/restart each of them remotely. I searched in google and I found solutions at level of microservices (my applications are not microservices) but nothing generic. I also explored the APM applications but it seems they are more oriented to the monitoring and preserving data.
Probably JMX can help in some way but I would like to start from something at higher level and possibly open-sorce. I saw a tool called "glu" but it seems it is going to be deprecated. Do you have some advice or do you can address me to some article or full examples?

Thanks for the help
  
 
Tim Moores
Saloon Keeper
Posts: 4036
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Micro-services are much hyped these days, but are applicable in a lot less cases than one would assume from merely reading the trade press. So IMO you're right to be wary of them.

I don't know what APM or glu are, but for management issues of this kind I almost always consider JMX first. If the code you want to monitor runs inside a servlet container, Jolokia provides a REST API to access JMX easily via HTTP and JSON, so you can automate those interactions in any way you want.
 
takaya treschi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick answer, do you have some links of nice articles or examples where such approach is used, more oriented to the management of standalone java app than the monitoring of web server performances?

Thank s again
 
Tim Holloway
Saloon Keeper
Posts: 18800
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, unless one or more of these apps is really heavy-duty, I'd consider putting them in a container such as Apache Karaf or servicemix. That way the start/stop/control functions are provided as part of the container framework. Also, if I don't have my products confused, servicemix can also contain lightweight web serving, so potentially that solves all the issues as long as you can make some adaptations to the app code.

JMX is definitely an option, although you cannot use it to start a standalone Java app, since you need a running JVM to send the JMX to. I'd consider it as "open source" in that it's part of standard Java.

There really isn't anything I can think of that's truly open-source that could do what you want with unmodified apps. There are quite a few service managers, but they tend to be tied to specific environments and/or platforms. The Windows Service Manager, for example. Or Linux systemd, or sysV. The only "write once/run anywhere" options are things like Java containers.

I use ServiceMix in a Docker container and it's mostly something I put together and forgot about. It Just Works, although some better docs would have helped. One of the apps scans my email queue, rips out useless items from select postings, then re-posts the filtered results to my inbox every morning. I also had one to digest National Hurricane Center products, although that one's not being used at the moment.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!