Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Start/Stop java app remotely

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
 
Saloon Keeper
Posts: 7224
169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 24812
172
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic