RSS RSS feed | Atom Atom feed

JavaOne Rant

I have one major complaint with JavaOne. The wireless network is HORRIBLE. Its hit or miss everywhere and from time to time, my browser is redirected to hotspot error pages. Its like there is some proxy application that we have to be redirected to in order to authenticate. I would suggest that the author of that application attend some sessions instead of playing network cop as this is becomming more and more annoying as each day passes.

Okay, I feel better now!

JavaOne Hotspot error page

Tags :

Monitoring and Management in Java

Monitoring and Management in Java 2 Platform, Standard Edition 1.5 Technology

Sanjay Radia, Sun Microsystems
Mandy Chung, Sun Microsystems

JSR 3, 163
Use JMX MBeans. When you use MBeans, they are deployed to a Platform MBeans Server and are then avialable for interrogation. Normally you connect via RMI over SSL via the JMX Management Application. JConsole is an example of this kind of application and is available out of the box with JDK 1.5(actually 5.0 with the new naming scheme). You could also plug LDAP in as a client of the Platform MBean server and have it manage permissions and authentication of the MBeans Server data.

In a nutshell, the MBeans Server acts as a container for the MBeans(abstract datasource) and JConsole is a front end for this datasource. Optionally you could plug in LDAP to act as a kind of controller to allow/disallow access to management data.

MXBeans allow Richer types(primitive types, Enum, List, Map, Classes with getters) than MBeans.

Tags :

Apple vs Sun Hockey Game

The hockey game was a quite interesting event. I was expecting lighthearted play and lots of camaraderie. What I saw didn’t hold up to my expectations. There were several heated skirmishes amongst players. I thought Sun’s team was quite a bit better than Apple and the 7-1 score reflected that. The goalie that played for Sun looked like he came from the NHL. I wonder where Dominik Hasek is right now? He stopped everything that was a reasonable save and some that were ever better than that. It took apple until late in the third period to break the shutout. The goal came with 17 seconds left in the 3rd period on a tic tac toe play resulting in a top shelf goal. The play was impressive. Unfortunately for Apple, that was about the only upside the entire night. Sun’s Chairman and CEO, Scott McNealy, started the game and played right wing. He didn’t have a goal but he made a nice play to setup a goal and got the first assist in the 3rd period. I wonder how many financial incentives were on the line if Sun lost the game.

Chairman and CEO of Sun Microsystems, Scott McNealy
Scott McNealy of Sun

Apple Player warming up
Apple Hockey Player

Tags :

A Practical Guide to Jini Network Technology

Brian Murphy, Senior Staff Engineer was a fantastic speaker and got more information across in his 1 hr timeframe than any other presentation so far. He has worked on the Jini project since it's inception. He started off with an overview of what Jini is. He also stressed that local objects are different than remote and should be treated accordingly. The decision to make a given object local or remote should be determined early in the development process. All and all, Jini is something that I'm very interested in and I need to do a sample app to get a grasp on how I could use it.

What is Jini Technology

  • Service based architecture for building networked systems that can adapt to change
  • set of specifications
  • a programming model
  • Contributed implementations(Jini Technology Starter Kit)
  • A Community

Summary
Jini technology is a programming model
Jini technology places the agreement in the interface, not the protocol
Jini technology security model extends the java security model, it doesn't reinvent the wheel
Think of development and deployment as separate activities
develop with deployment in mind
always 'security ready'

Links
Jini.org
Presentation

http://www.jini.org http://www.jini.org/meetings/seventh/Murphy.long.pdf

Tags :

Sharing the virtual machine

This was an interesting session. Many details about how to increase performance and reduce the memory footprint were discussed. An example would be a single computer with multiple virtual machine's each running their own application. Each VM loading java.lang.String is wasteful and could be made better if multiple applications could run inside an MVM(Multitasking Virtual Machine). This concept is very similar to Operating System processes and threads. i.e. Creating a new process is an expensive, costly unit of work. Creating a thread within a process is relatively inexpensive unit of work. So the parallel is that a single MVM running multiple apps is more efficient like a multi-threaded operating system process. The downside to this is that if one app were to puke(warning: graphic technical term), it would take down the other apps with it. The presenter discounted this argument based on all the VM enhancements that are occuring. He did say that collocation could be achieved by running multiple MVM's on a single machine. This is a special case though.

Tags :

Developing with Java Technology on Mac OS X

This is the first session that I left early. I really didn't learn much more from this session than a handout from marketing could have conveyed. In a nutshell, the high points were the following.

  • Apple Ships multiple VM's on every machine
  • Apple is Open and Standards based like Java
  • Ant, Tomcat, Jboss, and Eclipse all run on OS X
  • Apple supports the JCP

Tags :

Java Blogger Meetup at the Thirsty Bear

Last night a large group of geeks got together for a beer and some socializing at the Thirsty Bear. I think the event was set up by Simon Phipps, but many java bloggers attended. Heck, even Jonathan Schwartz, President and Chief Operating Officer of Sun Microsystem's showed up. Apparently, he has a blog as well.

As a side note, I would like to thank the guys from Atlassian for the java.blogs tshirt. The tshirt says, "More People read this tshirt than my blog" or something to that affect. Tshirts are top notch and have high geek appeal.

I got to meet Simon Brown and Sam Dalton while at the meetup. Although, I didn't get to buy Simon the beer I promised him. So Simon, if we meet up again, first beer is on me.

At the end of the night, Andrew and I spoke with Erik Hatcher for sometime about Struts and it's problems. Erik strongly suggests Tapestry so we may have to give it a test drive soon. I saw Erik's talk on Tapestry at the 2004 NoFluffJustStuff Gateway Java Symposium and I have to admin I was impressed. The question is, is it worth learning another framework that most people are comfortable. Regardless, a test drive is not out of the questions. If nothing else, it's a learning experience.

Multithreading Made Simpler

Concurrency Utilities in JDK Software Version 1.5: Multithreading Made Simpler

David Holmes
Brian Goetz

This was a very informative session about changes coming forth to the java.util.concurrent package. Having written very few multi-threaded applications in Java, some of this presentation went over my head. The overall theme was that things that used to be impossible are now possible and things that used to be hard are now managable. The API looked pretty clean and backward compatibility was a priority. Listed below are some bullet points of the presentation.

Why JSR 166
  Primitives like wait(), notify(), and synchronized are primitive
  Hard to use correctly
  easy to use incorrectly
  specified at too low a level for most apps
  can lead to poor performance if used incorrectly
  too much wheel reinventing

Goals for JSR 166
  Do for concurrency what the collections framework did for data structures

The Improvements to Tiger should:
  Make some problems trivial to solve by everyone
  Make some problems easier to solve by concurrent programmers
  Make some problems possible to solve by concurrency experts

Based mainly on package EDU.oswego.cs.dl.util.concurrent from http://gee.cs.oswego.edu by Doug Lea
  APIs refactored based on 4+ years of usage
  APIs enhanced to use generics

Tags :

Java Platform performance

Java Platform performance

Tim Cramer, David Dagastine, Ben Kim
Sun Microsystems

Focus: Understand how to measure performance.
Should performance be added as a step to the development process?

Why taking the average when using benchmarks doesn't work
2 runs score 24 and 26 vs. score of 1 and 49.
Both average 25

Beware Microbenchmarks!

Student's T-Test
Determine confidence between 2 data sets
Want 95% or higher confidence level, p-value 0.05

Modern Java Virtual Machine(JVM) Software Microbenchmark Negating Characteristics
Warmup period for Dynamic compilation
on-stack replacement
separate compile thread
disk cache
  On by default on on-solaris x86 OS-based systems
  Off by default on Solaris x86 OS-based systems

Statistical Gathering
  Monomorphic call transformation
  branch targets
  execution frequency

Background Compilation
  -Xbatch

Compiler Optimizations
  Dead code removal
  Inlining

Tips and Tricks
JVM Software Performance Tuning, pre 1.5
  Java hotspot VM is highly tunable

Select Server compiler with -server flag
Correctly size the overall heap
set min/max of heap to same value to minimize resizing
  +AggressiveHeap flag
    size of initial heap based on avail memory MIN(1/2 RAM, RAM-160M)
    flag can change at anytime!

Monitor JVM software using JVMstat tools

New garbage collectors
  Default
  Incremental
  Throughput

New Features of JDK 1.5
Smart Tuning
  Provide good out of the box performance without hand tuning
  examine host machine and configure hotspot appropriately
  dynamically adjust java hotspot VM software at runtime
  adaptive heap sizing policy during life of application.

client performance
  Class data sharing
    faster classload = faster startup time
    shared class archive, reduce footprint
    JFC/Swing and Java 2D API improvements

Overall
  know how to write a microbenchmark before doing so
  upgrade to jdk 1.5
  understand OS and hardware

http://java.sun.com/docs/performance

Tags :

Wall Street, Grid Computing and Jini Network Technology

Wall Street, Grid Computing and Jini Network Technology

Van Simmons
Director, Fixed Income Development
Invesco http://www.invesco.com

Observations
Software architecture is THE bottleneck
Too many systems rely on Moore's law to solve scaling and performance problems
Use of Excel considered harmful(except at presentation layer)

What Does Grid Computing Mean?
It describes a state of being, not an activity. Imparting meaning to the phrase requires a clear specification of the processes involved.
Service Oriented Architecture(SOA) emerges from the fog of jargon

The backbone of continuously available services that emerges is "THE GRID"

Our Jini Technology Implementation
Master /Worker pattern
Bootstrapping
GridApps
Worklets and a Worklet Container
Single sign-on
GridManager
Administrator

Master putting together set of tasks to be done, puts it in the javaspace, worker then calculates the answer and puts it back in the javaspace.

Tuple space-based approach known to jini Koolaid drinkers as standard pattern
First thing in all the books seems quite intuitive pretty much where we started
Things that get left out of the books
Security
Management/monitoring
Reliability
Deployment/multi-purposing of the grid

Deutsch's 8 Fallacies
1. The network is reliable
2. Latency is zero
3. Bandwidth is infinite
4. The network is secure
5. Topology doesn't change
6. There is one administrator
7. Transport cost is zero
8. The network is homogeneous

The Future: Federation No single points of failure

Tags :

JavaOne Keynote

Java One Keynote
Java One Keynote

Im sitting here attempting to blog about the presentation, but the WiFi access is pretty bad. Im dropping on and off the network like a blind bird on a wire. Java in Action is being played as the presentation is beginning. It is an overview of all the various niche markets Java is being used in. Embedded systems are a accentuated.

Gosling is actually online here at the Keynote, I can see him via Rendevous on iChat. How cool is that!
Java One Keynote iChat

The JavaOne Keynote is being presented by
Jonathan Schwartz, President and Chief Operating Officer of Sun Microsystems.

Topic: Everything and everyone connected to the network.
Global Vision: Network is growing.

  • 1 Billion computers attached to the network
  • Appliances/Toys 11 Million
  • Handhelds 2600 Million
  • Entertainment 1300 Million
  • Industrial/Automotive 400 Million

RFID are being used everywhere. From Pfizer tracking drugs, to Gillet tracking razors. Use java card to access the building and network. Java is everwhere TODAY.

350 Million Java Handsets in the marketplace. Driven by JavaCard. 600 million have been shipped to date. The desktop is coming back due to Java. 650 Million PC's have shipped with the java runtime.

100 million jdk downloads to date.

1.5 million downloads of j2ee 1.4

2.2 Billion in java app servers, 110B in related IT spending.

4 Million Java Developers, last year was 3 million. Stretch goal is 10 Million.

Java economies are thriving. More and more devices are getting java. Embedded systems are becoming more and more everyday.

MedicTouch. Wristband that measures telimetry off your body. Uses bluetooth to display readout on cell phone. Showing pulse on telephone. Give this to someone and data mine medical data. Java is used to monitor human beings. Company was started by a bunch of doctors so doctors could get statistics without the patient coming into the hospital.

Clients are back. Market was pretty slow and really owned by 1 company.

Qnext, truly connected. Instant messaging software. video and voice messaging. Basically a rip off of ichat. Not overly impressed as I have had this technology on my Powerbook for sometime now.

Tiger is here.

Automobile industry is next to be revolutionized with Java. Automobiles are going to talk to the network. All the seat back LCD's are going to connect to the network in some way.
Dr Roland Busch CEO Siemens VDO Automotive AG. Brought in BMW Z4, Java based entertainment system. Gets driving directions via the Navigation System.

John Loiacono Executive Vice President, Sun Software, Sun Microsystems.
The Client is back. Says, he is hearing Java needs to be easier for the developers. Sun Developer Tool Portfolio. Bringing more developers to java. Visual, simple, fast and familiar. Sun Java Studio Creator, visual development tool. RAD, Complete solution, 100% Java, built on Netbeans IDE. Sun Creator is releasing today. The Creator demo looks a lot like drag and drop visual basic applications. Except Creator is a GUI builder for Web Applications. Pages are wired together through drag and drop.

Sun Java Studio Creator, 40, 000 Users, 1000 Companies. Creator is priced effectivly at Free. You can subscribe to the Sun Developer Netork. Forum's, chat, and example apps. Special for Today. $49.95 for for SDN and throwing in a book Java Studio Creator Field Guide.

Project Kitty Hawk - Service Oriented Architecture.
What Developers Need? Tools, code samples, runtimes, and tutorials. How much would you pay for that? Throw in a wicked fast computer. Should we put this package on ebay to determine what people will pay for such a package.

Back to Jonathan.
Theres a new market emerging. How to push the free software, fast hardware, with updates out to the consumers. Java.com, Java is all about community.
Project Looking Glass, should we open source it. Open source Java 3D is now available at java.net. Demo of project looking glass was lots of hype wioth the ability to flip windows upside down, on their sides, or turning them around. How useful is this. In my opinnion, it is vast overkill and that Apple's Expose Feature is more productive.

The bottom line is that Java = Opportunity now and in the future.

Tags :

JavaOne Welcome Reception

The welcome reception was really not a reception at all. It was a large space occupied by video games, air hockey, and geeks galore. Did I mention I beat Andrew 5-1 in air hockey? Oh nevermind!

At the reception, Andrew and I met a couple guys from St. Louis. Scott Delap and Lance Finney joined us for free beer at the reception and then again afterwards at a local establishment. After having a couple Guinness, Lance suggested that we order "Guinness Floats". Yes, thats right, Guiness beer along with vanilla ice crean. Andrew and Scott resisted but I gave in. It was actually a rather nice drink/dessert. Can't say that I had ever thought of it before, but it was suprisingly good.

Guinness Floats
Guiness Floats

St. Louis Group
St. Louis Group

San Francisco Apple Store

Holy cow, the San Francisco Apple Store blows the St. Louis West County store out of the water. The San Francisco store is two levels containing a lab, small auditorium, and the genius bar on the upper level. The lower level contains all the high quality merchandise that you would expect. If you are in town for the JavaOne Conference or Apple's WWDC, you should drop by.

Outside of the store
San Francisco Apple Store

Genius Bar
San Francisco Apple Store Genius Bar

Upper level auditorium
San Francisco Apple Store Auditorium

Java One First Glance

I must say, my first impression of Java One is that this thing is bigger than I expected. The area that the conference is housed in at The Moscone Center is as big as a community college. It is massive.

Here are a couple pictures of the outside of the Moscone Center
Moscone Center
Moscone Center

This is a picture of the underground passage that connects the north side of the Moscone Center with the south side
Moscone Center Underground tunnel

The following shot was taken from the escalator as we approached the underground section. It's a pretty cool sight.
JavaOne Wall

This is the line where we picked up our official JavaOne registration materials containing a laptop sized shoulder bag, t-shirt, and conference documentation.
JavaOne Registration

Tags :

New owner of a 20gig iPod

Last weekend, my wife and I picked up a new 20 Gig iPod at the West County Apple Store. To accent the new device we also purchased the iTrip FM Transmitter. Unfortunately, the iTrip offers terrible reception in my car. I wonder if Belkin's device is as bad? Maybe, I should just make a trip back and exchange it for something else, possibly the cassette adapter.

Tags :

Java Blogger Meetup - JavaOne

The Java Blogs Meetup is scheduled at 6:30pm in the back of the Thirsty Bear Monday night. I plan on attending!

Read more...

Tags :

Warning: Bad data leads to unmaintainable code

I have been working on a handful of web applications for over 3 years now. Over the course of this timeframe, business rules have changed, technologies have changed, and bugs have manifested their way into the production environment from time to time. All of these reasons have, at one time or another, led to unclean data entering the persistence layer. Our data model for these web applications is highly normalized. Unfortunately, the proper constraints are not present in some cases to enforce referential integrity. Over time, this has led to data issues where something is halfway input or halfway deleted. Not to mention, bugs that have sometimes allowed for invalid inputs. All in all, our data is not as clean as it should be. Shame on us I know! After looking over a section of code, I see us checking for null values in many places, checking for the presence of certain data and the absence of other data. This defensive code is spackled from the web layer to the EJB layer and back. Much of this code was written as a work around for unclean data. If we would have mandated good data from day 1, I wonder how much smaller our code base would be now.

The difficulty solving this type of problem is that what was once a clean data model can be tainted when business rules change. An easy example of this is when a field that allows null values suddenly doesn't allow them anymore. You can't change the database to require this field since many rows of data do not currently have it populated. Sure you could update the table and insert a surrogate value, but isn't this the very thing that we are trying to avoid. The easy fix for this problem is to throw a null check into the application code but leave the database as is allowing null. This is step one to bad data and unmaintainable code. Unfortunately this problem never seems to get better, only worse.

Tags :

JavaOne Here I Come!

Last week I found out that a friend of mine from work and myself would be attending JavaOne in San Francisco. Neither of us have attended in the past so we are eager to see what it is like. Earlier this year we attended the No Fluff Just Stuff Gateway Java Symposium in St louis. I thought this was a fantastic learning experience and a needed spark to keep me learning new things throughout the year.

If you have attended JavaOne in the past and have recommendations, please feel free to post them. I'm open to suggestions good and bad.

Tour De Cure

Yesterday I had the pleasure of participating in the Tour De Cure bike ride to help raise money for diabetes and lower my self esteem. I say that because I was wiped after doing the 50 mile ride. It was a great time and I look forward to next years ride. I would also like to thank Envision for the fantastic jersey's that they supplied. My only gripe was that I wasn't able to hang around after the ride at Raging Rivers.

Id also like to say thanks to everyone that made donations to the diabetes foundation in my name. It's a worthwhile cause and I really appreciate the help. My team, Velocity, raised over $4K dollars.

Tags :

Waterfall Methodology

Weiqi said.. link to this blog entry. It's a fantastic mockery of the waterfall methodology. I don't see any mention of crashing into the rocks below though!