Archive for October, 2003

Sequence Diagram Generation with Spring

I've been doing some mucking around with the AOP part of the href="http://www.springframework.org">Spring Framework. It's quite nice
- fairly similar to Nanning, as
has been noted elsewhere.

Inspired by Crazybob's href="http://crazybob.org/roller/page/crazybob/20030105"> jAdvise SEQUENCE
tool, I've created a similar utility for Spring based applications
(actually, I think it would go close to working with anything that
implements the AOPAlliance
interfaces but I haven't tested that, yet). Currently it produces a Gantt chart
of the method timings, and a sequence diagram of their execution.


      

Comments

Archive.org carries daily news

Maybe this is old news, but I just noticed that The Internet Archive now
carries weekly (I think?) half hour summaries of news from around the world (especially the middle east) in quick time format.

The list of the programs
appears to have some gaps, though – unless I'm missing them somewhere.

Comments

Java Web Hosting

I find it amazing how expensive Java based website hosting is. I'm currently paying $20 Canadian/month, for my own VM
and Tomcat instance, plus MySQL. That's not too bad, but it is a lot more than the US$5/month I was paying for Perl/PHP/MySQL
hosting previously. I realize that Java Servlet hosting takes more memory than Perl/PHP, but I'm surprised that the difference
can be justified. I think it might be a lack of competition in the Servlet hosting market.

Ideally, a hosting provider would have:

  • JDK1.4.2
  • Tomcat
  • MySQL
  • Access to the Apache<->webapp mappings
  • An easy domain management system
  • Decent uptime and storage limits

Comments

Sound Card Sonar

This is pretty interesting – creating a Sonar device
with your computer sound card.

He has software available to download, but I haven't tried it yet.

Comments

HotSwap Client Tool

I just discovered Sun's HotSwap Client Tool – a tool for
dynamically updating classes while they are running. This uses the same features of the 1.4.x VMs which Eclipse and other IDEs
use to Hotswap running code while debugging.

Sun's tool is at least partly targeted at updating deployed applications however. It has some nice features like:

  • Get the list of classes currently loaded by the VM
  • Find which classes have changed
  • Compare the source code for the versions

It's under a BSD licence, too, so you are free to use it in your own apps. I'd be interested to hear what
people think of it.

Comments

jvmstat

As href="http://www.mackmo.com/nick/blog/java/?permalink=AJUG-ECPerf.txt">menti
oned yesterday, I've been playing with href="http://developers.sun.com/dev/coolstuff/jvmstat/">jvmstat. It
allows you to visually watch garbage collection going on in your
application. It's quite fascinating to watch the difference as you try
different garbage collection algorithms. For instance, using the href="http://java.sun.com/docs/hotspot/gc1.4.2/#4.2.2.%20AggressiveHeap|outl
ine">-XX:+AggressiveHeap algorithm makes a huge difference to the amount
of GC Time (or at least it did in my benchmark).

It's also very helpful in understanding how the various garbage
collection algorithms work – something I've always glossed over in the
past.

Below are some traces from JBoss being hit pretty hard by an increasing
number of clients. The first image shows it just starting up – note that
there has been little memory reclaimed by the old generation garbage
collector. In the second image you can see the saw tooth pattern in the old
generation memory usage. It is also interesting to see the copying of object
between the two survivor generations.

jvmstat Graph
jvmstat Graph

The third image shows the use of the AggressiveHeap garbage collector.
Note that most of the objects don't even make it out of the Eden pool. My
hypothesis is that this shows that most of my objects are short lived. A lot less time is
spent doing GC, too – compare the occasional spikes in the GC time graph to the almost continual GC in
the previous example.

Some useful links:

  • Tuning Garbage
    Collection with the 1.4.2 JavaTM Virtual Machine
  • href="http://java.sun.com/docs/hotspot/gc1.4.2/example.html">Diagnosing a
    Garbage Collection problem
  • Frequently
    Asked Questions about Garbage Collection in the HotspotTM JavaTM Virtual
    Machine
  • Comments

    ECPerf & SPECJAppServer

    At Monday's AJUG-Adelaide meeting we were fortunate to have Sun's
    Tom Daly give us
    a presentation on the ECPerf & SPECJAppServer benchmarks.

    It was a very good presentation – reasonably technical, but lots of
    interesting anecdotes, too. I'm sure if I was using Oracle on Solaris/Linux
    I'd have got even more out of it.

    Some of the things I took out of it were:

  • SPECJAppServer2003 (which may be called something different) will
    have a significant webservice component.
  • JDK1.4.2 is much, much faster on Linux & Solaris than JDK1.4.
  • The ability to scale J2EE by running it on more powerful hardware is
    important to Sun. To paraphrase Tom: The massive transactional benchmark
    numbers J2EE can get by running on large servers are important because J2EE
    CAN run on those servers (unlike .NET)
  • CMP in EJB app servers is good because server vendors have gone to
    extreme lengths to optimise its performance.
  • Intrigued by the potential performance benefits of JDK1.4.2, I spent some
    time today doing some benchmarking. In my simple client app->JBoss 3.2 test
    I'm finding roughly 5-10% increase in performance. This is under windows,
    with both the client & JBoss on the same machine, in separate VMs (512 M
    memory, but lots of stuff running).

    I also had a better look at jvmstat,
    which is very nice. It does non-intrusive GC monitoring of your Java apps. You don't
    need to enable any java debugging options for it to work, so it doesn't slow
    down your app at all while you monitor it.

    Comments

    Pluto Released

    Pluto, the JSR168 (Portlets) Reference Implemenation has been released.
    I can't find a source archive for download, so I suspect you might need to pull it out of CVS.

    Comments