Klikk på tall for å vise stripe
Toon 1Toon 2Toon 3Toon 4Toon 5Toon 6Toon 7Toon 8Toon 9Toon 10 JavaZone JavaZone

Building the Big Brother of the Java Virtual Machine

d659be83-3c94-46a7-8bbe-a06c141da474
View video  Presentation
Abstract
Did you ever want to be the Big Brother of the Java Virtual Machine? Being able to do non intrusive monitoring of method calls without access to the source code, performing this in a production environment without a noticeable performance hit?
Do you want to know who is doing what to whom, that is, who invokes what method in context of which principal? Making certain that memory consumption is dynamically adjusted to avoid out of memory situations? Would you also like to use it in your legacy applications running pre Java 5 as well as utilize the new Java agent interface of the newer JVMs?
You know you have to collect vast amount of data and process it effectively and in real time. Finally you figure out that the amount of data exceeds the capabilities of a traditional data model and you decide that the only solution is a dimensional data model, using MDX for multi dimensional analysis.
There are numerous tools available for profiling and measuring your Java programs. However these tools are either: a) aimed at profiling or measuring your code in a development environment; b) expensive; c) not open source; d) requires a Ph.D. in debugging and profiling e) any combination of the above :-)
Usemon (usemon.org) attempts to alleviate this by providing an open source tool which is easy to use, collects data from environments based upon Java 1.4 through 6, has a flexible dimensional data model stored in a SQL database and attempts to be non-intrusive.
Usemon hooks into the Java virtual machine through a modified class loader on older JVMs or via the Java Agent Interface from version 5 and up. It automatically monitors Java EE components (EJBs, Servlets, MDBs, Queues, SQL Statements, etc), but can be configured to inspect any class in your JVM. Data is multicasted from agents to one or more collectors and stored in the DBMS of your choice. Usemon comes with a complete configuration for MySQL.
The overhead of running Usemon is negligible and thus you may collect run-time statistics around the clock all year, which is rather fascinating, given that you have enough disk space.
Usemon was developed for large Java EE environments at Telenor, which is one of the worlds largest telco to fulfill these requirements. You may utilize it in any environment in which you have control over the Java Virtual Machine start up parameters. For example Java EE applications, Spring based Web applications or simply your own home grown web application packaged in a .war file.
Outline
  • Introduction
  • What sets Usemon apart from other profiling and performance measurement tools?
  • Modifiying the class loader using byte code manipulation
  • Architecture and extension points
    • Using Soft references in the Agent to reduce memory consumption dynamically and letting the garbage collector (GC) to the job for you.
    • Living in the Java virtual machine without affecting the production environment
    • Collection of statistics and transmittal to the collector(s) using multicasting
    • Receiving the collected data and insertion into a dimensional data model
  • Extending Usemon to your liking
    • Usemon Live; A cool visualization app using the Processing (processing.org) framework and physics simulation model to show you what is happening in real time
    • Dimensional data analysis, JasperServer to the rescue!
  • Q&A
Expected audience
Hard core developers with interest in performance and run time dependencies.
  • Paul René Jørgensen
    Paul René started his coding career on the C64, but was really hooked when participating in the demo scene on the Amiga writing graphical presentations in assembly code. He has worked as a senior consultant at Telenor in Norway for the past 8 year and been part of establishing the Metro middleware. He loves to code, and do whatever it takes to get the opportunity to write code, whether it is at his desk, on the bus or in bed. Usemon has been developed on and off for the past 3 years, but got extra momentum when Steinar joined the project in Q3, 2007.
  • Steinar Cook
    Steinar wrote his first program back in 1979 and has been trying to convince his family that programming is work and not fun ever since. He takes special interest in software engineering methods, design patterns and SQL databases. After establishing the DBMS vendor Informix in Norway in the late 90's, which was later sold to IBM, Steinar founded his second company focusing on CRM software. He is currently involved with his 3rd startup, focusing on a new SaaS solution for the Scandinavian SMB market.