Friday, December 21, 2007

Spring 2.5 Upgrade

I upgraded out platform infrastructure to Spring 2.5 this morning. It was pretty straight-forward, although I had one painful issue. For any of our tests that use Hibernate, I was getting the following error:

Caused by: org.hibernate.HibernateException: saveOrUpdate is not valid without active transaction
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:297)
at $Proxy39.saveOrUpdate(Unknown Source)


After a bit of digging, I realized we had the following Hibernate property set:

<prop key="hibernate.current_session_context_class">org.hibernate.context.ThreadLocalSessionContext</prop>

Basically, this was preventing Spring from managing the transaction context correctly. Once I removed it, all of our tests passed. I wonder if this is the reason why we've had some problems with NOT_SUPPORTED and SUPPORTS previously. This will require some additional testing...

Thursday, December 20, 2007

Spore

I stumbled across a new PC game today entitled Spore. It's not GA yet, but it looks extremely interesting. It looks like Civilization meets The Sims. Spore was created by Will Wright, the creator of The Sims. Here's the video I watched. You start as a single-celled organism and you evolve your species all the way up to an advanced spaced-based civilization.

Saturday, December 15, 2007

Desktop Matters (TSE Day 4)

In the second session of the morning, I decided to attend the talk entitled Desktop Matters by Jim Moore. I didn't learn much in this presentation. He walked through the history of computers from a UI perpsective: mainframe to client server to web. He then went into UI technologies that are available today to build rich applications: Flex, Apollo, Silverlight, GWT, WebStart, etc. He had a couple of bullets points for each, but he didn't get into much detail in terms of what each does. I would've liked to have seen more in the way of the positives vs. negatives of each and some recommendations.

Architecture Enforcement with AspectJ (TSE Day 4)

I just attended an extremely interesting session entitled Architecture Enforcement with AspectJ and Other Tools given by Alef Arendsen and Ramnivas Laddad. They first showed Structure101, which gives you a visual representation of your architecture, including displaying package structure, cyclic dependencies, etc. I hadn't heard of Structure101 previously. It looks like there are several versions including both free and for-fee.

They next showed several examples of using AspectJ to enforce architecture rules both at compile-time and runtime. This included rules like:

- don't use straight JDBC, instead use Spring JDBC
- don't return null Collections
- ensure that non-thread safe objects are never accessed by multiple threads simultaneously

It was all AspectJ plus Java. Very cool! The compile-time errors show up as standard compile errors in Eclipse and the runtime errors can be exceptions or some type of log message using Log4j or similar. This presents some very interesting options if you're working on a medium to large-sized team and want to enforce a clean architecture. I can already think of a number of places that this would help us immensely. It sounds like it's well worth the investment. Obviously you'll still want to have a Software Architecture document, but this gives you a way to enforce what's in the document.

I am a little concerned about the runtime overhead of AspectJ for the enforcement of the runtime rules, but it's worth experimenting with to see how much overhead is actually involved. I asked the speakers about this and I'm not sure they understood the question, but they mentioned the overhead was minimal. I'm worried about the case where you wind up with hundreds (or even thousands) of runtime rules and the overhead that is introduced.

Friday, December 14, 2007

GigaSpaces - The Spring Experience Day 3 Afternoon

I just finished attending the session presented by Nati Shalom from GigaSpaces. It reinforced a lot of the ideas I've been reading about in his various white papers and blog entries. I'm extremely impressed with the GigaSpaces technology. If you're not familiar with GigaSpaces, I'd highly recommend taking a look at it if you are writing a mid-size or large-scale application. Basically, it's a grid platform for messaging, processing and data. One interesting thing I learned is that they're holding an OpenSpaces Developer Challenge that officially started on December 10th. Final submissions are required by April 2nd, 2008. First prize is a $10,000 gift card from Amazon, Best Buy, Circuit City and Apple. That's a lot of toys for any geek to have in their hand!

Practical Enterprise Concurrency

In the second session of the morning, I attended a talk by Rob Harrop on Practical Enterprise Concurrency. It's a highly technical topic and Rob did a great job of presenting it. It's obvious he knows what he's talking about. He covered a variety of topics including:

- The Java Memory Model
- Common Bug Patterns
- JDK Concurrency Utilities
- Testing Concurrent Applications
- Concurrency in Java 7

The bug patterns were pretty common ones that I had seen previously. He touched on the Condition interface as a replacement for wait/notify, which I wasn't previously aware of. He also touched on CountDownLatch as being useful for scheduling parallel tasks. I really need to read the Java Concurrency in Practice book I purchased a couple of months ago.

Overall it was an excellent presentation. In the future, I'll ensure I attend any of Rob's presentations, regardless of the topic. Tonight he's hosting a BOF entitled Extreme Scalability, which should be very interesting given the scalability research I've been doing as of late.

The Spring Experience - A Bad Start to Day 3

I'm off to a horrible start this morning. I couldn't get coffee (or orange juice) from the servers at breakfast. I'm a coffee junkie, so needless to say it wasn't a good start.

The talk I'm sitting in is entitled Batch Processing Performance and is being done by a couple of consultants from Accenture. The first speaker is having all kinds of difficulties: microphones, projector and believe it or not, even PowerPoint. I'll try to take the optimistic approach and know that the day can only get better.

After struggling to get going for about 15 minutes, the speaker started off by reciting word-for-word a 1,000 word article published in Computer Weekly. What a complete waste. I should have walked out 5 minutes ago when he mentioned his title, which included the word "manager". After listening for another 10 minutes without any improvement, I'm walking out now...

Thursday, December 13, 2007

The Spring Experience - Day 2 Afternoon

In the first session of the afternoon, Rob Harrop talked about batch processing including I/O and data access strategies. Rob is a very energetic speaker and he definitely keeps it interesting with his lively stories. The talk was very well organized, but fairly basic if you've ever worked on moderately large batch processing. Some of his recommendations include:

- collections are evil
- so is DOM
- streaming is your friend
- use I/O buffering
- parallelization
- partitioning

I believe Rob along with a guy from Accenture are the leads on Spring Batch. They're working on milestone release 4. I'm sure it's something we'll be looking at closely for our batch needs in the future.

In the second afternoon session I attended, Rod Johnson talked about The State of the Art in Dependency Injection. Not surprisingly, he admitted he doesn't have as much time to write code as he used to. However, it was obvious that he still has a deep technical understanding of the state of the enterprise Java landscape. In his talk he walked through the history of DI going all the way back to his first book. It was a fairly in-depth review of various DI containers and their current state including various versions of Spring, PicoContainer, SEAM, Guice and EJB 3. He talked about the pros and cons of various features and how they've introduced the best-of-breed into Spring (with attribution to the innovator). Overall it was a very good talk. One tidbit of information that I didn't know about is their new Spring Java configuration. It's exactly what it sounds like, you use Java code to configure Spring. So now there are three options for configuring Spring: 1) XML, 2) Annotations and 3) Spring Java Configuration. Sadly, this is the second and last talk that Rod is giving at this conference. Obviously I'd like to hear more from him.

The Spring Experience - Day 2 Morning

This morning I attended a talk on Enterprise Integration with Spring by Mark Fisher. It was part one of a two part talk. Part 1 was basically an introduction to Spring combined with an introduction to EAI. About the only thing I got out of it was to see some of the new features in Spring 2.5. It was a good introduction for anyone who hasn't been introduced to EAI principals.

In the second session of the morning, Hal Hildebrand from Oracle talked about what could be their next generation application server. It was an intriguing talk and made me think quite a bit about the architecture for the platform we're building out. It allowed me to compare and contrast the two and think about which ideas we could leverage. Basically, Hal laid out that it would be based on OSGi and Spring. It will essentially be a distributed grid with a single agent on each node talking to daemon processes locally through JMX. The agents are purely for coordination and the daemons do the actual work. The agent plus daemon concept reminded me a little of DB2's architecture of coordinators and agents. For what sounded like autonomous management he also discussed the use of rules engines on each of these agents that would basically act as a distributed expert system. The question I would've liked to ask him but didn't is will they support multiple component models (Java EE, JBI, SCA, etc.). He alluded that it would, but he also talked about the fact that Java EE is dead, so it was difficult to tell for sure.

The Spring Experience 2007

Last night The Spring Experience kicked off in Hollywood, FL. It's the first time I've attended. It's run by SpringSource (used to be Interface 21) in conjunction with No Fluff Just Stuff. I've attended several NFJS conferences and have always been impressed with the content and how they are run.

Rod Johnson was the keynote speaker last night, and his theme was The Changing of the Guard. Basically, people are switching from Java EE to Spring. Not surprisingly, he's essentially saying that Java EE is a dinosaur. He's been saying this for quite some time, and he's largely been right all along. I can't remember when his first of three books was published, but it was around 2002. In his presentation, Rod had some interesting quotes from a Gartner report that came out several months ago that basically reinforced what Rod was stating. I'd like to read the full report, but I'm sure it's fairly costly to obtain. Rod always has interesting things to say, but of the times I've seen him speak, this was the least interesting. Maybe it's because he's become more concerned about running a company or the fact that keynotes are rarely very technical.

Before Rod started, Keith Donald spent about 30 minutes going through each of the tracks and sessions including photos of speakers. In my opinion it was a complete waste of time. On top of that, they started the show about 30 minutes late, so I felt like it was an hour wasted. Everyone waited patiently though, because they new Rod was speaking next.

Friday, September 7, 2007

The Four-Dimensional Space-Time Continuum

I think I am finally gaining an understanding of what is meant by us living in a four-dimensional space-time continuum. I'm currently reading Albert Einstein's book entitled Relativity, The Special and General Theory. In section XVII (page 55) he discusses Minkowski's Four-Dimensional Space. He started out very simply in section I with a discussion of Euclidean Geometry and built all the way up to the space-time continuum. I don't pretend to have understood everything he discussed, but I made a point of ensuring I (at least partially) understood every section leading up to this point. On page 56, he discusses the fourth equation of the Lorentz transformation and it actually makes sense to me! It was definitely an aha moment.

I would recommend reading this book to anyone who wants to learn about Einstein or his Theory of Relativity. The writing style is a little difficult to comprehend at first, but eventually you get used to it. I would guess it is due to the fact that 1) Einstein lived in a different era, 2) it may have originally been written in German (and translated to English by someone else), or 3) Einstein's advanced intellect. Regardless, Einstein does a great job of following one of his famous quotes:

"If you can't explain it simply, you don't understand it well enough."

I'll now have a different perspective on every day life...

Wednesday, August 8, 2007

A Briefer History of Time

I just finished reading Stephen Hawking's book A Briefer History of Time. I was fascinated with what I read. This is the revised edition from his original A Brief History of Time. I didn't fully understand everything I read, but that certainly was expected. One thing I wish he would've done better is used more descriptive pictures when attempting to describe a particular topic. The pictures were too simplistic and I believe more work could've gone into some of them. However, I don't want to sound too critical. For an admitted physics novice, I loved the book.

For me, physics was always one of the most difficult and boring subjects. However, Hawking has raised my interest in physics (for arguably the first time). I took three semesters of Physics in high school and another three in college (two on Newtonian physics and one on quantum mechanics). I'm not sure why, but I had no interest and muddled my way through all of them. The quantum mechanics class was definitely over my head. I'm thinking about restarting at the beginning and finding a "Physics 101" book. I'm also interested in finding more out about String Theory. I'm planning on reading The Universe in a Nutshell next.

Interestingly enough, I was intrigued by the similarities between some of Jeff Hawkins comments on Intelligent Computing and Stephen Hawking's discussion of the Heisenberg Uncertainty Principle. The similarity being that in both cases there's no finite, deterministic answer. Rather there can only be an approximation or best guess. I still have trouble digesting that this is how the brain works (as described in On Intelligence). Based on my understanding, in a similar way The Heisenberg Uncertainty Principle underlies the Theory of Quantum Mechanics and basically states that it's not possible to be exactly sure of both the position and velocity of a particle. It sounds like Einstein had trouble buying into this uncertainty, so I don't feel too bad about my reservations.

In the final chapter (Conclusion), Hawking discusses both the scientific and the philosophical aspects of a Unified Theory. It's mind-boggling to think as Hawking suggests... "Then we shall all, philosophers, scientists and just ordinary people, be able to take part in the discussion of the question of why it is that we and the universe exist. If we find the answer to that, it would be the ultimate triumph of human reason--for then we would know the mind of God."

Monday, July 30, 2007

Atom Recycling

In On Intelligence I read that approximately 98% of your body's atoms are replaced approximately every 3 years. I also heard the same thing on NPR (National Public Radio) a few weeks ago. If you stop to think about this for a moment, it's pretty amazing and a little scary at the same time. Over the course of those three years (while your atoms are being replaced), you're general sense of self and your appearance remain fairly consistent, which is quite remarkable.

Sunday, July 29, 2007

On Intelligence

I've just started re-reading On Intelligence, the book by Jeff Hawkins. I read it for the first time approximately four months ago. His ideas on how the human brain works are profound.

In the first chapter, Hawkins dispels Artificial Intelligence and the reasons why he believes it has failed. Basically, the human brain works differently than computers. As a result, computers are not intelligent by their very nature. Instead, we must first understand how the human brain works; particularly the neocortex. The first chapter also lays out that "... understanding cannot be measured by external behavior... it is instead an internal metric of how the brain remembers things and uses its memories to make predictions."

Saturday, July 28, 2007

Enterprise Service Oriented Architectures

I just finished reading the book Enterprise Service Oriented Architectures. There were a few decent pieces of information, but overall I was not very impressed. Some of the content was OK, but the grammatical errors and different writing styles made it a very disappointing read. There were four different authors which contributed to the flow problems, and it was obvious that some of the chapters were more poorly written than others. In addition, it didn't seem like anyone even proofed the book. I can understand a few errors, but I found myself re-reading sentence after sentence trying to understand what words were missing, misspelled or out-of-place.

The chapter on transactions was pretty decent. I liked the information on compensating transactions, which I had heard called three phase commit previously. The chapter on UDDI was pretty decent as well. I was disappointed in the last chapter on Event-Driven Architecture. It just seemed to be a hodge-podge catch all of the author's thoughts without much meat.

Sunday, May 27, 2007

Plant a Tree, Help Save the Planet





I planted two new oak trees in the backyard yesterday. One is a Bur Oak and the other is a Northern Pin Oak. I wish I would have planted them sooner, but oh well. I can't wait for them to get big to provide some privacy and shade.

Tuesday, May 22, 2007

New Edition


Ruby Alexandra Finck was born May 17th at 1:19 pm and weighed in at 7 lbs. 6 oz. We're proud of our latest edition!

Server Load Balancing

I just finished reading Server Load Balancing. It was an OK book, but there's only about 50 pages of real content. The rest is specific information on how to configure various vendors hardware/software, which I'm guessing can be found in their manuals. It was a book purchased for our company library almost five years ago that I had been meaning to read. Five years later I finally got around to it. It taught me a little bit about networking and made me realize there's quite a bit I'd like to learn about general networking.

Saturday, May 5, 2007

AIX DB2 Performance Tuning

I recently got sucked into helping out with some performance issues for a J2EE app running WebSphere and DB2 on AIX. So far, it's been a fun ride, and I've learned quite a bit. Now I remember why I hate WAS so much. I've never worked with AIX previously and this is my first time tuning an application running on WAS. I've started reading an IBM Redbook entitled Database Performance Tuning on AIX, which looks to be an an excellent read.

We have a sizable performance lab setup, and I'm learning all about LPARs, vmo, tuning IBM's JVM, WebSphere and QA Lab with hopefully more to come.

Sunday, April 15, 2007

Twin Cities Software Symposium

I've spent the last several days attending the Twin Cities Software Symposium (a.k.a. No Fluff Just Stuff). Overall it has been a very good conference. I had attended it twice in Denver previously and thought it was an excellent conference, particularly given the price and the fact that the conference travels to you.

I just attended Charles Nutter's JRuby presentation. The presentation was a little dry, but very exciting stuff. It sounds like they've accomplished a ton with JRuby, but still have a long ways to go. I appreciated the fact that Charles didn't attempt to hide anything and was very straight-forward related to JRuby's current shortcomings. JRuby (and dynamic languages on the JVM) definitely hold quite a bit of promise!

Yesterday afternoon I attended two Google Web Toolkit (GWT) talks by David Geary. I was fairly impressed, but am going to reserve my final opinion until I've had a chance to take an in-depth look at GWT, to ensure it's not just hype. I personally hate the tedium of developing html-based applications, and GWT may be a game changer. David has a very good sense of humor and definitely kept the talk exciting. He mentioned that GWT is the single most exciting framework he's ever seen. This says alot given that he's been in the industry for quite some time, including being the second Struts contributor and playing a large role in evangelizing JSF.

I'm off to a talk by Howard Lewis Ship about TestNG and EasyMock.

Saturday, March 3, 2007

A ran across an article in Wired yesterday describing Hierarchical Temporal Memory (HTM) and a company called Numenta. One of the company's co-founders is the architect of the PalmPilot and Treo, Jeff Hawkins.

I've always been interested in Artificial Intelligence, but never have dug into it too much. Obviously Computer Scientists have been attempting to solve this problem for quite some time, but largely have been unsuccessful up to this point. The founders of Numenta believe they have the correct algorithm, including the ability to scale to large problem sets. After reading several articles, I believe they might be right, but I don't want to be too optimistic at this point given that I know so little about the field.

Computers being able to learn is mind-blowing stuff. Once we teach them to learn and correspondingly make predictions and take actions, they will be able to do some amazing stuff (potentially both good and bad). Several science fiction predictions come to mind, like The Matrix and The Terminator. I want to be one of the people on the good side.

I ordered the book written by Hawkins, On Intelligence, which should be a very interesting read.

Sunday, February 11, 2007

I watched Mission: Impossible III last night, one of the best action movies I've seen in a long time. Admittedly, I don't watch many movies, but this one was excellent. The action was non-stop, and the story was definitely realistic. Of the three movies in the series, this one was by far my favorite. I still can't figure out the title though. The colon just doesn't make sense to me with the III (or the II). The original title, Mission: Impossible definitely makes sense, but Mission: Impossible III less-so for me. I suppose they didn't have many choices for sequel names. In any case, I loved the movie.