Good Java Process Control Library [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Java process control is notoriously bad - primarily due to inadequate support by the Java VM/JDK classes (e.g. java.lang.Process).
I am wondering, are there any good open source libraries out there that are reliable.
The requirements would be:
OSS
Start/Stop processes
Manage STDIN and STDOUT
cross platform (at least Linux,
Windows, Solaris, HP, and IBM in
that order)
(optional) restartable
(desirable) mature

How about Apache Commons Exec?

Java Service Wrapper might be what you're looking for. It's cross-platform, can be used to start things as a Windows service, capture IO, and generally completely manage any java app. It's very light weight and well designed. Atlassian uses it to wrap their products (Jira, Bamboo, etc), so it's battle tested.

One more requirement... cross platform support for killing of an orphaned process. With java.lang.Process (and Apache Commons Exec), there is no way to kill external processes when the Java application does a hard stop (kill -9). I'd really like to find a library that can handle the problem better.
One solution may be to store PIDs in some resource on disk, and then kill the processes on restart of the Java application. Of course, this would be platform dependent, so good a cross platform library would be fantastic.

Related

A Simple utility to monitor web application performance [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
My system setup is like: Application A takes requests from outside world and communicates with the backend REST apis. REST api also communicates with mysql database.
My requirement is to have a tool from which I can just monitor the resource usage and may be the performance of the web server. I want to have graphs for the resource usage which means I need historical data otherwise I would have just used the windows task manager to see the resource usage.
This means I do not need any load generator(that will be done by the Application A) just a resource monitor.
I googled and found tools like appdynamics, Nagios, munin but not sure if they are what I need. I haven't done performance testing earlier so there's lot of confusion.
Just looking for some guidance.
Thanks
If we are talking about "run tool-get result" the best option - Java Mission Control. It's free in test environment. You need to pay only for some features in production. It's much better than old VisualVM.
You can write a data to file using Flight Recorder. You can setup start point and duration. You just need to start your application like this:
-XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=duration=60s,filename=myrecording.jfr

Is there a java analog to supervisord [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am writing a distributed system in which jobs (processes) will be run on multiple nodes (LINUX machines).
I want to be able to launch job on these machines, terminate a job (kill), monitor what is running on each machine.
I am looking for a framework (preferably in Java) which I can use to implement this solution.
I have looked at using the underlying components that frameworks like Hadoop or Akka use but have not come up with anything satisfactory.
A few additional constraints on what I'm looking for:
It should have reasonable proliferation into production grade projects
It should allow me to launch UNIX processes written in arbitrary languages
It should be open source
It should be lightweight -- An answerer has suggested I look at agent based frameworks -- though these satisfy the requirements I've posted -- I've found them to be very heavy weight. I'm looking for something that really fulfills the stated requirements and does not require me to adopt a more comprehensive methodology.
Thanks.
It's called multi-agent system and there are several frameworks available that you can use:
JADE
Janus
Ascape
Cougar
JIAC
Boris
Swarm

Which is the prefered CGI technology? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to develop a CGI application that has to run under Windows and Linux (IIS and Apache)
What is the best technology to do that?
I would prefer Java, but I am not sure if there is a problem with Java in an IIS.
Any experiences?
Completely depends on your application what
What load are you expecting
How complex will it be.
Where will you store the data
How secure does it need to be
How skilled are you or your developers.
What languages are you familiar with.
For a simple web app its hard to beat Vanilla php, using the LAMP stack with sqlite. As php will let you do almost anthing almost anywhere you need to be disciplined about how you structure your code -- but otherwise its a good solid working environment.
At the other end of the scale are the J2EE behemoths Weblogic and Websphere. These are monsters in terms of complexity and learning curve but if you are planning on 100s of transactions per second, in a secure environment with bullet proof reliability -- and you have deep pockets -- nothing will beat it.
The only sure answer form you post is IIS, ActiveScript .NET is out of the picture if you want to deploy under *nix or anything other than windows.
For plain CGI, Java's startup time is going to be a killer when the process forks. It'll be frustrating even for the low loads you're expecting.
I would, honestly, recommend you use Python for this instead as it will have the right balance of startup / execution speed and "batteries included" features for CGI development.
Here's a link if you're intersted: http://docs.python.org/library/cgi.html
java and CGI is not a good match! If I really had to do a CGI then I would go wit Perl CGI module. Perl should work with IIS too, but I cannot confirm this.

Implementing extensible code in C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am currently busy with a project where the main focus of the application is to be extensible (allow 3rd party developers to write plugins / their own implementations of interfaces).
Until now, I have been using Java, and built the application on the NetBeans platform. This has works perfectly fine and is quite easy to implement.
However, the program is quite computationally intense, and must be run on a grid of computers. I think C++ might be better suited for massive computations like I need.
What I would like to know. Is there any libraries like the NetBeans platform for C++. Or would I have to implement everything from scratch (not that I mind, I just wat to know)? Also, how easy is it to write extensible code with C++ and implement something like an update center? This is stuff you get for free with the NetBeans platform. My experience with the using the platform is that it allows you to write very modular code, which is something I like. New modules can be installed independantly, while the platform provides discovery of services to find all the installed plugins / impementations.
Can this be done similarly in C++?
Thanks!
I recommend that you have a look at the Qt framework. They offer a mechanism to create plugins. Have a look at this free online book about Qt. Plugins are discussed in chapter 21.
For modularity on binary level Boost.Extension might be a good choice.
For autoupdate there is for example Google's Omaha (Windows) or Update Engine (OS X)

Profiler for java-based web application? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
There are a number of questions related to profiling a java application, but I'm wondering if these recommendations also apply to profiling a web-based (tomcat) java application?
Are there specific tools that a better than others? Or is the assumption that most java applications these days are web-based, and the existing questions/recommendations apply to web based applications?
You can start with jvisualvm in the Sun 6 JDK which allows you to attach to a running JVM and gather basic memory and cpu profiling data. This allows you to get a rough idea of what is going on, and if better profiilng tools are necessary.
I have used JProfiler, JProbe, and DynaTrace. DynaTrace is the most expensive choice but I found it as the most useful one so far. They also have a DynaTrace Ajax Client that's free and lets you profile on the front end side (java script execution, ajax calls, rendering time, etc). You can also use Fiddler to capture execution times.
I've tried JAMon, App Dynamics Lite, and JavaMelody and found JavaMelody to be the best and most compatible of each of them. It is easy to install and provides all the data you need to find the slow web requests, jsp pages, errors, and sql queries. It provides great summary data and charts. It also has very little overhead so it could be used in production instances. It will show you your cpu, ram, and thread utilization. You can't drill down to the nitty gritty per-line profiling like other tools, but it can point you in the right direction to find bottlenecks.

Categories