Archive for June, 2005

JavaONE – Jerry Cantrell

Thursday, June 30th, 2005

I thought the most exciting thing this evening was hearing a presentation on Maven version 2. Instead I got to watch “Camp Freddy” perform at the “After Dark Bash”. What I didn’t know beforehand was that “Camp Freddy” is an allstar band with artists from Incubus, Sex Pistols, the Donnas, and one of my childhood favorites, Jerry Cantrell of Alice In Chains. Back like 13 years ago I remember watching Alice In Chains during their “Dirt” tour in Seattle. (we’re all getting old, I know)

The band played covers all night – that was until the crowd demanded an encore performance. Jerry and company returned to thrill the crowd with “Man in the box”. I was up in front and have no clue if I was one of the only people who got excited, but considering I’m amongst 10,000 software geeks I don’t really give a shit about how my peers viewed me. The man even gave me five – I failed the Java programming contest, but Jerry Cantrell high fived me… money well spent by my employer. :)

Dennis Miller was as expected – a little forced, but clever and entertaining. The funniest part was that he offended people, who got up and left (French people mostly). My only regret tonight is that I lost one of my 2 free drink tickets.

Tomorrow I’ll write about Maven 2 and how our solutions delivery group will be forced to completely rewrite their build process as it’ll be unsupported by year’s end – oops!!!

JavaONE – Wednesday

Wednesday, June 29th, 2005

Last night I attended the famous Collection Connection BOF hosted by Joshua Bloch. As he was the original author of most of the Java collections framework, it was really interesting to hear him discuss the lineage of the packages. There was a quick overview of new collection features in Tiger (1.5.x) and much more detail on material in Mustang (1.6.x) and even some peeks at Dolphin (1.7.x.). One common trend in collection evolution is with Exceptions. By Mustang, a new set of collection interfaces will be introduced, most of which have 2 sets of accessor method pairs: one set would throw an exception, while the other would return a special return type. Think of it like this:

someMapType.get("foo"); //throws an exception is there's no key "foo"
someMapType.retrieve("foo"); //returns null, 0, etc.

Today is all about JMX. I’ve already attended one session and have 2 more on the subject. Some really new patterns proposed, but these guys are mostly discussing “Dolphin”, which is optimistically 5 years in the future before our appserver vendors will certify against them.

Developing Scalable JMX
Given that we normally think of monitoring when we think of JMX, this session was a refreshing surprise. The discussion was centered around using JMX for actual “management” of an application. This includes deployment, configuration and life cycle control (think of MNAD’s control node).

Here’s the problems that drove this work:

  • vast componentization, each with config to manage
  • scaling of components in a distributed topology
  • separate development and deployment environments (develop on 2 tier, deploy to 5 etc.)
  • increase dev cycle speed
  • achieve better code reuse

    The solution was to employ open MBeans. Writing these manually is very tedious compared with standard MBeans, as an entire interface must be implemented. Today the most practical approach is to use Xdoclet. In newer JDK versions, annotations are standard that support this.

    Some short falls of the current JMX API:

  • no enforced naming convention
  • component lifecycle
  • no index of available MBeans
  • no error reporting (FooMBean is offline)
  • no means to invoke a remote JVM
  • synch or asynch lookup?
  • startup order or services (TSN, OSN, etc.)
  • attribute lookup or naming?

    By leveraging JMX for compent configuration it was possible to “clone” similar execution environments. Imagine taking an installed system and propogating from DEV to UAT to Production using JMX. Using management hierachries, like or connected components are categorized and updated accordingly. That allows the deployment team to identify similarities at the business level and export those configurations to other environments.

    Basically this is a java standards based approached to a problem many teams in our organization have sought to solve. Obviously the huge downside is the need to instrument nearly every single component in our system.

    Themes:

    Managability is key to scale

  • self documenting components
  • automated lookups
  • variations (environment configuration deltas)
  • Managability speeds the development cycle

  • visualize architecture and topology
  • easily deploy new code
  • automate testing
  • I’ll follow up with reviews on the remaining events later.

    JavaONE – midday Tuesday

    Tuesday, June 28th, 2005

    J2EE Connectors Demystified
    This was an overview of using resource adaptors as an alternative to JMS destinations. They covered both inbound and outbound implementations. The “inbound” patterns were much more familiar to me, as they involved MDBs processing messages (like our OSN).

    An outbound connection is a mechanism to connect to external systems. There’s a great deal of connection management: pooling, creation etc. It’s possible to export transaction contextas well as export a security context to an EIS.

    An inbound connection is a mechanism to consume external messages. It’s able to import a transaction context from a remote EIS. There is not importing of secutiry context for inbound connections in the spec.

    There was a lot of time spent on XML descriptors and other details which I found tedious during the presentation. Someone with a strong JMS background may have got more from this. The presenters did provide a URL for further reading:

    http://genericjmsra.dev.java.net

    JVM Support for Aspect Weaving
    This presentation was hosted by BEA’s JRockit team and the founder of Aspectwerkz. It was a very interesting area of research. The went over various approaches to AOP, describing pros and cons for each.

    There are 3 basic approaches to instrumenting AOP:
    1) statically: source or byte code level (think build time) – but has dependency issues for late binding types
    2) load time: this is achieved using classloader magic
    3) run time: byte code level, redefine a class on the fly – hotwap the definition (could make a mess of the JVM’s permanent generation memory if you ask me)

    The solution proposed by the speakers was to handle all this at the JVM level. The main benefits to this are:
    1) more efficient, as the amount of “bookkeeping” is reduced significantly
    2) multiple AOP agents may safely coexist, else they could re-instrument each other’s aspects

    Other:
    Class loader security – your Aspect subscriptions can only work in *your* class loader. To fake this out, I believe you can just inject at the bootclasspath loader and have free roam of the entire JVM. I’ve requested they email me when a JRockit prototype is available in the coming weeks.

    Clustering Consistency and Caching
    Anyone who’s studied caching in an academic setting probably knows the fundamentals for this. The part that I paid attention to was how a clustered application (weblogic) can broadcast its cache in over multicast. Like many things, there’s a balance. You can trade off between consistency of data or application performance.

    For futher reading google the following:

    Butler Lampson
    Paxos Made Simple
    Distributed Algorithms in Java
    

    Java Platform Clustering
    I bailed out of this on early. It’s not J2EE or application clustering, rather “beowulf” style clustering. They want a single logical JVM running across physical machines. I’m badly in need of fresh air and caffeine, so am going for a walk through the city.

    JavaOne – Monday Summary

    Tuesday, June 28th, 2005

    I’m in a rush, but here’s the days takeaways.

    Web Services in the real world by eBay
    This was a shameless plug for their API business. Basically they want developers to drive traffic to them

    Chasing 9s
    Very theoretical, statistical based explanations of “what is availability” and how to measure it and other factors.

    Availability = MeanTimeToFailure / (MeanTimeToFailure + MeanTimeToRecovery)

    They also suggest that a higher MTTF will compensate for a lower MTTR. Not sure I completely agree. I guess math can’t perfectly model real world failures as much as the presenters would’ve liked.

    Continuous Integration with JFCUnit, CVSNT etc.
    I had to walk out of this one early. I can get over the Swing/Windows aspects of the presentation, but over 30 minutes were spent convering the installation of windows tools. It turns out his development team consisted of 5 developers. I asked him some questions on how this model would scale with a larger project and he wasn’t sure. His team even employed timing hacks to test SWING GUI applications (repeat a test until it passes or a timeout is reached)….

    javadoc JSR 260
    If you want to watch a live flamewar, attend a JSR debate. I didn’t stay for the entire Q&A as I had to walk a few blocks to my next presentation. A big item of debate was doc inheritence. Apparently some developers wanted to avoid rewriting docs when they extended a class. The trouble was, there are other contexts where something is inherited, such as implementing interfaces, abstract classes etc.

    I stood up and made a comment that there should be no default doc inheritence, since an incorrect assumption could be worse than no docs at all. I can elaborate later.

    Ensuring 100% J2EE portability

    Debu Panda is the man – makes me want to give Oracle more money (almost). I’ll definitely give a brown bag at work for this, but here are some highlights:

    Challenges when ported across J2EE servers:
    1) dev env. may differ from exec. env
    2) some platforms get neglected during test
    3) vendor cert. of 3rd party components
    4) no consistent class loading behavior in J2EE spec.

    Tips:
    1) check out AVK, which validates for J2EE compliance – could be done at build time perhaps
    2) avoid hardcoding vendor lookup mechanism (BEA’s t3://)
    3) avoid hardcoding XML parsers (use JAXP)
    4) don’t depend on class loading behavior of a particular server
    5) tuning params are NOT part of J2EE
    6) to solve the CMP descriptor portability problem, hurry up and wait for EJB 3.0

    I need to run and stand in line to hear Scott McNealy rant about something entertaining. Later…

    JavaOne – just arrived

    Monday, June 27th, 2005

    I haven’t even checked into my hotel, but I have walked around the conference floor. It reminds me of Comdex during the late 1990s – tons of free junk, like T-shirts and toys. The only serious conversation I had with any exhibitor was at the BEA booth, where I spent some time chatting with a Weblogic developer. Looks like WLS 9 will have tons of cool features that we could use at work. Specifically things along the lines of JMX and “tracer bullet” logging. I told him it’d be at best a couple years before we could seriously consider using WLS 9. His reaction to that was laughter. “Half of the customers complain that we’re not implementing the new specifications fast enough, the rest take their time evaluating and testing”. I never really thought of that being a paradox before. Anyhow, I’m back to my room to offload a second backup worth of loot.