Profiler for java-based web application? [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 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.

Related

Creating a server side for android 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
I'm currently making an android application that will be used by a certain number of clients. Each client will have an account and will access information from the server. This information is stored in a DB.
My question is what is the best way to create a server side that will, later on, be compatible with other platforms (iOS, Windows, etc.)?
Can I use sockets on different platforms? Or should I create a Web Service?
I found a certain tutorial that I think is explaining a similar thing, but I think it demands a certain amount of knowledge, and I'm totally new to this, and haven't learned this at faculty (I'm good with sockets but I never had much confidence in them, and the idea of sending HTTP requests to the server looks much better).
Can someone divert me to a tutorial or lectures of how this is supposed to be done?
Connection between Android and a server would most easily be done with http requests.
There are several libraries available who make this easy like Retrofit.
For server-side applications you can take a look at Jersey in combination with a tomcat server.
There are of course many applications who can do these... so it comes down to a matter of preference.
There are many web development frameworks that works on many platforms such as spring, vertx, play and many others to name. You can you create rest like api for this purpose. Give all the low level works to the framework. You should not worry about low level details as most off them are handled by frameworks today.

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.

Good Java Process Control Library [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 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.

Categories