Monday, June 1, 2009

CommunityOne first impressions

I arrive about an hour before CommunityOne officially started, there wasn't as much buzz in the air as years past, I remember CommunityOne 2006, it seemed to be something more exciting than this year.
Once I got checked in, I swung by the OSTK booth, we have a booth this year at JavaOne, only to find that the company that was to have custom panels installed hadn't done it yet. I hope it's all good by this afternoon.
I'm now at the general session for CommunityOne, it's in the main conference hall, where the JavaOne general session is held, except this year, the room is turned sideways, much wider and not as deep. I like this format better, everyone can feel closer to the stage. BTW, I'm in the second row, right behind the Sun executives. I wonder how this will compare to WWDC next week.
First up is Dave Douglas, SVP of Cloud Computing @ SUN. He is talking about how his team is new, only been together for about a year. Then he touched on the changes since last year, aka: Oracle bought us :-) Instead he is talking about the economy, Obama, etc. There is a new book coming out Citizen Engineering, looks like the cover of Mythical Man Month. Dave is now talking about 20th Century initiatives vs. 21st Century, top down vs. community based. Sounds a lot like what Thomas Friedman discusses in the World is Flat (great book btw). Dave's challenge, think about "what can I do to help". A little plug for OpenOffice, "available in 80 languages btw, more than Office".
Sun has a campus ambassador program at hundreds of campuses around the world. On the stage four students, we all speak "open source" around the world. There goes the Brazil cheer from the audience. "We are at an important time with community, we need to take this ideas and spread them out". Up next is cloud computing.
Lew Tucker, Sun Cloud CTO. Cloud computing is everywhere, the government is even looking into using this. With a credit card and a few minutes you can have your own computer network. The economics of cloud computing are very attractive, you can turn it on and then turn it off. If you are a start-up, or any company, you can quickly and cheaply have your infrastructure up and running. Two main parts of Cloud Computing, Compute Service and Storage Service, in the middle is open APIs and Services. Lew is using a Mac and Safari for his demo. Lew is showing a drag and drop network configuration tool to set up your cloud computing infrastructure, looks great. The idea is any developer can setup their own cloud so they have the infrastructure you need. The idea behind what Dave and Lew are showing is how an individual can create and manage a large scale system without the need for your own data center.
Not to bead a dead horse, but all this cloud computing infrastructure is enabling the flat world platform. To make more sense of this statement, you need to read Thomas Friedman's The World is Flat.
Dave is now talking about security, what does the cloud have for security. Sun has been working with Center for Internet Security on creating a secure virtual machine and today Sun deployed a secure virtual machine to Amazon. One of the biggest uses of the cloud is for a development and test environment. One open source community that has taken this idea to heart is Yahoo! and Hadoop. What used to run on a 1,000 machines and only be known by two scientists in the world is now available to you and me. BTW, the Yahoo Hadoop cloud has 4,000 nodes.
Up next is opensolaris. At least Sun has a sense of humor, the lead of opensolaris is pretending to be a news anchor, very funny. He's also using this to give us an update on how opensolaris is being used. They are now talking about DTrace and how it's been around for about five years now and can help you analyze your application across all levels OS to application. Now we are talking about JavaFX and how easy it is. In just four lines of code, they were able to add reflection to a full-motion video (a clip of UP btw).
How has virtualization changed networking? Traditionally, you have switches between the FW and the server, now SUN has created a virtual switch to virtually support virtual FWs and virtual Servers. They are now talking about xbow, pronounced cross-bow, and how you can define a virtual network on anything from your laptop (the demo we are seeing now) to your server grade systems. xbow lets you simulate how your system may work under different loads from a fully functional system to a constrained network load allowing you to test you environment in many different modes. Networking rewritten for the virtual environment. Networking has always been complex but with opensolaris, xbow, and DTrace you can really examine what's happening.
ZFS, what is it? A discussion on what ZFS is and what it can do for you. ZFS takes away all the limits that were imposed on the file-system. They skipped the 64bit fs and went to a 128bit fs. They also showed one of the big features of ZFS, the ability to move through snapshots of your file-system over time.
Flash based storage is the first new storage technology in about 50 years. Not only does it support more io ops per second than a 15K HD, it takes less power. This is redefining the way storage is put together today. ZFS is the only file-system that supports flash storage natively.

Thursday, March 19, 2009

Maven Meet Up at Sonatype part II

Brian is now talking about Nexus. There are three types of repositories in Nexus:
  • Hosted - the repo lives on disk
  • Proxy - this is a proxy to another repository
  • Virtual - this allows you to convert between repository formats, say M1 is hosted, you can create a Virtual proxy that converts M1 to M2

You can schedule tasks like cleaning up snapshots. There are RSS feeds for most of the things Nexus does so you know the state of your repo. It will download remote repo indexes. There is no database required for Nexus. Nexus provides a full set of REST APIs to all its features.

The only time you use a repository URL directly in Nexus is when you want to deploy an artifact. With staging & promotion you don't even need to use a repo URL to deploy your artifacts. Why have a stating & promotion strategy? What if you want to test something before actually release it? Enter Nexus stating & promotion. All release deployments occur against a single REST URL in Nexus. The URL can be set once in the corp-pom for all projects, regardless of repository. With templates you can define how Nexus creates this new stating repo. Currently, you can only stage your binary artifacts but not your site artifacts. If you stage something many times and decide only to keep the last build, you'll need to manually remove all but the last site's you generated (this assumes that you don't overwrite your existing site with each release). Since all of Nexus is controlled by REST URLs, you can build your own work flow to control when a repo is promoted or not.

Next up is procurement, how to control what artifacts are available to your projects. Procurement is effectively a firewall that separates the users from another repository (or repo group) in the system. By default, everything is denied.

Sonatype is planning on multiple versions of Nexus: Nexus (open source version, free), Nexus Pro, Nexus Enterprise (HA, Federation, etc.) and Nexus Compliance (legal, etc.).

Maven Meet Up at Sonatype part I

Maven 3.0 will be fixing what we've learned in Maven 1.0 and 2.0. Layered repository, at the command line there is really only one repo, but in an env like Eclipse there are many repositories, other projects, so Maven 3.0 will have the concept of layered repositories. Jason said they have a lot of integration tests to ensure the backwards compatibility of Maven 3.0 with Maven 2.0. Personally, I hope it goes better than the Maven 2.0.8 to Maven 2.0.9 transition.

Plugin extension points, something borrowed from Eclipse, plugins will have extension points. This way you can extend a plugin without having to hack it. Plugins will also be able to tell Maven, here are my output directories, this way in Eclipse Maven will not need to run all the plugins to get their generated source dirs. This would be a big improvement.

Mercury is the new repository and transport layer for Maven. Why Mercury? Maven 2 has inaccurate conflict resolution, based on custom graph walking algorithm, hard to replace, API is too complex. The resolution mechanism is too coupled to Plexus, cannot use it from other environments. Mercury is a general purpose library for artifact and repository management. ArtifactMetadata - artifact comprehension info, not only do you need GAV (GroupId, ArtifactId, Version) but you also need classifier, type, etc. Mercury repos can be local or remote, readable or read/write, this helps optimize Mercury. It also supports global exclusions.

Mercury has it's own metadata cache to cache metadata for remove repositories. The new transport layer is a Jetty client, supports connection multiplexing (NIO), concurrent connections, SSL support. Webtide added stream verification , proxy support and authentication.

Oleg is now talking about Sonatype Proviso, a tool for updating binaries (e.g. Maven). Mercury Runner is a side project for Oleg, it gives you a way to run an application without defining a classpath. Attribute based resolution, we don't just care about a JAR, or it's version, we actually want to know about it's quality, etc. Like this:


Monday, February 16, 2009

SLC Tattoo Convention 2009

On Saturday night, my wife and I went to the SLC Tattoo Convention. It was a great way to spend Valentines day and Nicole said it was a great date. We saw a lot of amazing art and we were both inspired to spend more time on our art. As a result, I'm going to try and spend at least an hour a day for a year, or something close to that, on art.

My Dad was a professional artist and drawing was always a part of my childhood. That said, I haven't done much since. One of my boys loves to draw and he and I sometimes draw together, so I'm hoping he and my wife will join me on my 365 days of art.

So here it is, the first of at least 364 more drawings. I won't post them all here ;-)

Thursday, November 6, 2008

More Maven Best Practices @ ApacheCon by Brett Porter

Here are my notes from Brett's talk about Maven.
More Apache Maven Best Practices, by Brett Porter General Principles from last years presentation
  • Set up your environment in advance
  • A repository manager is a must (e.g. Archiva)
  • Keep your POM simple, write your build like you write code
  • Keep the build portable
  • Avoid hard coding
  • Make artifacts portable and minimize resource filtering 
  • Keep db config out of the project 
  • Make sure the build is reproducible
  • Lock down versions, lock down environmental variations (don't rely on getting the latest, use version numbers)
  • Use the Enforcer plugin (
  • Use this plugin to ensure other modules do not use automatic versions like latest and latestRelease
  • Release your project early and often
Dependency Management
  • Transitive dependencies are a big part of Maven, however sometimes dependencies get messed up, use mvn dependency:tree to analyze your dependencies. 
  • Use enforcer plugin to ban specific dependencies and then you can use global exclusions to keep that dependency out of the project
  • Specify only what you need, specify scope, USE dependencyManagement
  • Use dependency:analyze, find out what you're using but not declaring, find out what you're declaring but not using
Integration Testing
  • Unfortunately, an afterthought in Maven 2.0.x, at least in lifecycle
  • Tests in a separate module, tests in same project, you'll most likely need to use profiles
  • In Maven, plugin ITs are in the project
  • Using a separate project, most common pattern in Maven. If you're testing multiple modules put tests in another module
  • create a parallel module, use the regular src/test/java directory, add a dependency on the module being tested, you will typically put this in a profile to control when it's run (e.g. in your CI env)
  • If you are testing in the same project (e.g. a plugin or framework example), use another source dir, like src/it or use the src/test/java path and exclude a package from the general test so they can be used during integration testing (this is the easiest approach)
Maven sites and reporting
  • There are two technologies working here, reporting and rendering, they are not the same thing!
  • Site tips, avoid reports and documentation sites, some minimal project reports, like mailing lists, source repository may be relevant
  • use site inheritance, just like in your pom, you can break down the site.xml file, they sit along side your pom.xml file
  • Use versioning in the URL
  • Include release notes in the versioned usage documentation
  • Report tips
    • Set up what you'll use! Don't create reports with thousands of issues
    • It won't be used if, too much information or there is irrelevant information
    • Don't settle for the default settings
  • Use active checks, not passive reports, fail the build
  • Use profiles to control reports, you don't need to run the reports all the time
Plugin Development
  • Sometimes it is easier to use a script for short, one-off, customizations, e.g. antrun plugin, jrubygroovy plugin, etc.
  • If you might use it twice, consider writing a plugin
  • Writing a plugin isn't a big deal, you can write it in Java, Ruby, Groovy, etc.
  • Write your functionality in components, with the Mojo as a "wrapper"
  • Minimize Maven API dependencies and component exposure, e.g. use maven-artifact, not maven-core (be aware of your dependencies, only use what you need)
  • Do as we say, not as we do. Maven fails to implement many of these practices in various projects. Maven commiters learned the hard way!
You can get Brett's slides here.

Friday, August 8, 2008

Seam and Maven

A while back I mentioned that I'd post a Maven project that would make building Seam applications with Maven a little easier. Here it is, I've got three projects actually. For the impatient, you can see all the projects over here on Google code. The three projects I created are:
  1. basic-settings, this is a parent pom project to define the JBoss repository, set your compiler to Java SE 5 (Maven defaults to Java SE 1.3), and sets some defaults for the Maven eclipse plugin.
  2. seam-dependencies this project defines all your Seam dependencies. You will use this as a dependency in your Seam project. This defines the Hibernate and Seam JARs you need to get your Seam application working.
  3. seam-example this is a sample application that uses both basic-settings and seam-dependencies, to illustrate how to put it all together. This application is a simplified version of the JPA-booking example that comes with Seam.
These projects do not use Java EE in any way, so there isn't even a JBoss embedded dependency. My reason for doing this was to make building and deploying an application as easy as possible. To get to the projects, you need to download the the source from my Google code project, which you can find here, once at the project page, click the "Project" tab and that will tell you how to check out the code. Now that you've got the code checked out, run mvn install for these projects:
  1. basic-settings
  2. seam-dependencies
With everything installed, you can try out the seam-example project. To run the project, use the Maven Jetty plugin, like this:
cd seam-example
mvn jetty:run
You can access the app from port 9090, using this URL: http://localhost:9090/seam-example I also did a Seam presentation at the July 2008 UJUG meeting. You can see the presentation here.

Wednesday, April 2, 2008

Accepted into the iPhone Developer Program

I was surprised last night with an email from Apple letting me know that my application to join the iPhone Developer Program had been accepted. I started my career as a NEXTSTEP developer so coming back to Mac OS X should be a lot of fun. I have a couple of ideas for iPhone apps, now if I could only change time like Dubya and get 30 hours in a day :-) Stay tuned, I'll post info on the apps I attempt to create here.

Thursday, March 6, 2008

iPhone SDK now available

I totally forgot that today Apple had an iPhone event scheduled for today. I'm currently watching the session while I write this. I just signed up for the iPhone SDK and cannot wait to get back into Objective-C. I used to be a NeXT (predecessor to Mac OS X) developer so seeing some of the familiar API's and language will be great. The best part is the Exchange integration that will be coming in June, finally I will be able to get my work email on my iPhone (wait, is that something I really want?). So are you going to build your own iPhone apps? As I start to develop some apps, I'll post my experiences here asap.

Sunday, March 2, 2008

JavaPosse Roundup 2008

I'm off to the JavaPosse Roundup 2008 tomorrow morning (Monday March 3, 2008). Three of us from are going together. It should be a real blast. Late last year, James Ward of Adobe came out to speak at the November UJUG meeting about Flex. After the meeting we were out at a local pub called, Red Rock and James said if there was one conference you were going to go to in 2008, the Java Posse Roundup 2008 should be it. So I'll be there tomorrow afternoon, and cannot wait to meet everyone and to go skiing at Crested Butte. I also put together a collection of past Posse episodes for the drive down, here they are: See you there!

Update on my dad

A quick update on my dad. After having a stroke on January 31, 2008, and a good family friend passing away a few days later, I'm happy to say that my dad has come home. After being in the hospital for about three weeks and catching the virus that caused the hospital to be locked down (meaning that he had no visitors for 10 days right after Bill K passed away), he was discharged because the virus had another breakout. Last weekend was a little scary, his blood sugar levels were way up, and his blood pressure was too high. My mom tried to reach a doctor but no one was available (the Canadian health care system for you). My folks finally got to a doctor on Wednesday and it turns out that he had the wrong prescription for his diabetes. Once the prescription was straightened out, he started to feel better. It will take several weeks for him to really feel the full impact of the medication but I can hear it in his voice already. He is starting to do much better. One more good thing, he can talk like his old self, fortunately the stroke only affected his balance which he is working on correcting. To everyone that contacted me, thank you very much for your thoughts, concerns, and comments. Dad - its great to have you back home, I love you very much!