BY MARKUS SPRUNCK
The new version of YACA-Monitor brings simplified handling, better performance and many further improvements.
A) Yaca-Agent is now a webserver for the Yaca-Monitor complete application
B) direct interaction with Yaca-Agent, like reset model, black/white lists,
C) improved performance,
D) support for OS X,
E) black and white lists and
F) Java 8 support
ours with finding out how your own code and 3rd-party libraries interact. Some parts of the desperately needed information can be obtained by reading the code, some views of your development environment and/or documentation. The genuine problem, is to find out how all the classes are actually interacting during runtime.
Static dependencies and dynamic call dependencies between classes and/or methods, are two sides of the same coin. For the first one modern development environments help developers to analyze the static call dependencies and also inheritance relations. The second one is rarely supported by tools.
However, modern Java code uses often late binding based on the inversion of control pattern. This is especially true for all spring framework bases applications and modern Java EE based enterprise applications. Here many dependencies are dynamically created at startup and/or determined during runtime. To make all this worse, these approaches excessively use proxies, which make the call hierarchies even longer and more intransparent. No wonder that we as developers spend so much time with the dynamic analysis of source code, frameworks and medium level design.
The only way to get a deeper understanding of the dynamic call dependencies is the old fashioned debugging. Set some break-points, run your application and read the call stack to find your way across all the classes, proxies and components of the program. Debugging is an extremely time consuming task. Ergo I asked myself if there would be an easier way to find required information more quickly.
This is exactly what I have automated with Yet Another Call-graph Analysis (YACA) Monitor - it connects to the Java virtual machine, collects continuously call stack data and provides a human friendly visualization.
Find the haystacks! - The first version of YACA-Monitor combined static code analysis data and dynamic code analysis to provide a holistic view to the software. In principle this was a good approach for small programs, but a call graph with thousands of nodes and links is just a nice picture, especially with a pure 2-dimensional visualization.
Find the right haystack! - The second version introduced a 3-dimensional rendering based on WebGL and tried to give better visualization of the graph based on Barnes-Hut N-Body-Simulation algorithm. Additionally working with the first version showed, that with static analysis comes a lot of non needed information. So, I decided to remove the static analysis in this version. But trying to show everything what happens in a program was still not efficient enough.
Jump into the haystack and find the needle! - The third version of YACA-Monitor focused on Java EE Applications and a better filtering of the relevant information. All has been implemented in a single web archive. Just deploy the war file into your application server and start the analysis. In this version I also experimented with a complete new visualization based on Oculus Rift (DK2). For this I had to develop the complete user interface which is renderable for VR settings. The result was a nice Chrome Experiment (see https://www.chromeexperiments.com/experiment/oculus-rift-gui) and some experiences about „how to design software for virtual reality“. This includes opportunities as well as limitations of VR software.
Stop with the haystacks and start to harvest grapes! - YACA-Monitor 4.0 combines now the best of version 2 and 3 in a solution for standalone Java 8 SE applications. A further simplified user interface and improved the performance. Now you may click through the call stack and filter what you like to see.
You may fork the complete project with source code and a test client on GitHub or just download the zipped project (see https://github.com/MarkusSprunck/yaca-monitor.git).
In the project, you will find in the folder <Project_Home>/dist the start scripts (start.sh or start.cmd). Just set in the start scripts the path to your Java 1.8 SDK, ensure that you have a standard Chrome installation add execute. In the case you prefer an other browser change the scrip or open the URL http://localhost:8082/monitor to see something like the following:
The test client YacaAgentTestClient is a simple spring based application that executes different search algorithms. The Yaca-Monitor shows what happens inside the application
I hope you like the new YACA-Monitor 4.0. Please feel free to send me feedback.