Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Performance Testing Memcached

Earlier this week, co-workers and I did some performance testing with Memcached. We wanted to see how long it'd take to send different sizes of objects over the wire to Memcached on a remote server.

We setup a simple environment with 2 Mac Pros both running 2 x 2.8 Ghz Quad-Core Intel Xeon processors and 12GB of RAM. We used one machine as a Memcached server and one machine running an application with the addition of a new Servlet Filter. The Servlet Fitler read a size parameter and used it to set the size of the object being written and read from the Memcached server. We used JMeter to put load on the box. The following describes the load and the results.

Write Times
Write tests were performed with a single user executing 1000 sequential remove then writes.

Size in Bytes Time (ms.) Min. Time (ms.) Max. Time (ms.) Total
20000 1.31 0 7 1000
50000 1.834 1 8 1000
100000 2.87 2 9 1000
500000 12.641 9 283 1000

Read Times
Read tests were performed using 50 users with 1 sec. ramp times executing 100 reads each.

Size in Bytes Time (ms.) Min. Time (ms.) Max. Time (ms.) Total
20000 4.8414 1 375 5000
50000 18.343 1 354 5000
100000 46.181 2 415 5000
500000 137.7328 6 953 5000

During our tests, Memcached was started using the following settings:

memcached -d -m 2048 -M -p 10171 -vv

If you've done similar performance testing with Memcached, we'd love to see your results.

Posted in Open Source at Sep 19 2008, 11:29:33 AM MDT 6 Comments

RE: How Open Source is Spring?

Peter Mularien has a very well written post titled How Open Source is Spring?: An Analytical Investigation:

This post is to expand on some of the thoughts I posted on the SpringSource Blog in response to Rod Johnson's excellent description of the SpringSource business model and its commitment to development of open source software.

Now that SpringSource has shown an ability to crank out new product releases on a seemingly weekly basis, I wanted to reflect on where Spring is positioned in the Java open source community, and how open the Spring Core project is to work done by the public.

The hypothesis of my experiment occurred to me when I happened to be reviewing Spring JIRA assignments one day. I was curious whether, following the bug assignments, the majority of development on the "Spring Core" projects (including Spring MVC and what we would consider "classic Spring") is performed solely by SpringSource employees.

Peter's post is near and dear to me because I'm doing a What's coming in Spring 3.0 talk at the Colorado Software Summit in October. The only information I was able to find on Spring 3.0 is from random blog posts and Juergen's presentation. When I give talks about technologies, I prefer to dig in and try them before talking about it. With Spring 3.0's source code nowhere to be found, this is very difficult to do.

I really hope Spring 3.0 becomes available in early October. If it does, I hope to upgrade AppFuse, AppFuse Light and Spring Kickstart. If it doesn't, my talk will most likely be a regurgitation of what Juergen's slides have and that's just not right.

Posted in Java at Sep 19 2008, 09:54:48 AM MDT 14 Comments

Abbie gets her first tooth and The Bus looks great!

Today was quite the day. First of all, Jack and I took Abbie to A Wild Smile to get a couple front teeth yanked. She has her first adult tooth coming in and her baby teeth weren't getting out of the way. Before and after pictures are below:

Abbie has all her baby teeth 2 got yanked

This afternoon, I drove to Colorado Springs to see The Bus and speak at the Colorado Springs Open Source User Group. The Bus looked great. Motorworks Restorations has done a lot of very detailed work (i.e. replacing corners, stretching the frame, replacing window and door drains) in the last couple of months.

We talked for a good hour about the possibilities in wheels, transmission, engine, suspension, gauges and interior. My favorite topics were the air bags, 6-cylinder 911 engine and safari windows. Click here to see the full set of pictures I took. Quote of the night: "It's going to be better than it was when it was brand new."



After leaving the bus, I delivered my Web Frameworks of the Future Presentation to a bunch of guys (and gals) at a nearby library. It was a fun presentation because I got to meet a lot of folks I had name recognition for, but had never met. All in all, a very good day.

Tomorrow marks my last day of work before I head out on a week's vacation in Munich for Oktoberfest. I have a feeling the days are going to get a lot better from here on out. ;-)

Posted in The Bus at Sep 18 2008, 11:49:49 PM MDT 1 Comment

My TripIt Blog Badge

Jared started it. TripIt provides it. Here's mine:

Posted in General at Sep 17 2008, 12:48:52 PM MDT 2 Comments

Upgrading Hibernate to 3.4.0 and AppFuse for Tapestry 5

Last night I spent an hour upgrading AppFuse to Hibernate 3.4.0.GA. I tried the same thing a week ago, but failed miserably. When Hibernate Core Modules (3.3) (a Maven dependency howto) showed up on the Hibernate blog, I was re-inspired. I discovered some interesting things along the way (at least in my setup).

You need to use JBoss's Maven Repository
The latest Hibernate releases aren't in the central Maven repo yet. If they're not in there two weeks after the release, I doubt they'll be there anytime soon. Best to plan on adding http://repository.jboss.com/maven2 as a permanent repository. As a bonus, you can remove http://download.java.net/maven/2 since JTA is in JBoss's repo.

Javassist is not an optional dependency
If I remove the Javassist dependency, here's the error I get:

java.lang.NoClassDefFoundError: javassist/util/proxy/MethodFilter

Seems reasonable right? What if I add in the dependency on Hibernate's cglib instead?

java.lang.NoClassDefFoundError: javassist/util/proxy/MethodFilter

OK, so apparently you can't switch between Javassist and hibernate-cglib-repack as stated in Hibernate's Maven dependency howto. Of course, I do believe their instructions are correct, they just don't work in my setup. Versions I'm using: hibernate-core-3.3.1.GA and hibernate-annotations-3.4.0.GA.

Not including SLF4J is a bad idea
If you don't include a dependency on SLF4J (and you're using Spring), you get a nice cryptic error message.

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class 
[org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]: 
Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
        ... 48 more
Caused by: java.lang.NoClassDefFoundError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.(LocalSessionFactoryBean.java:174)
        at org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean.(AnnotationSessionFactoryBean.java:64)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)

Hibernate's JPA now uses PersistenceException instead of EntityExistsException
In previous releases, Hibernate's ConstraintViolationException was wrapped in a javax.persistence.EntityExistsException. In Hibernate's EntityManager 3.4.0.GA, it's wrapped in a javax.persistence.PersistenceException.

Of course, these errors could be caused by Spring or Maven, but my hunch is they're more related to Hibernate and it's new more modular dependencies. You can view the full changeset for upgrading Hibernate 3.2.6.ga to 3.3.1.GA via FishEye.

Tapestry 5 version of AppFuse
In other AppFuse-related news, Serge Eby has created a Tapestry 5 version of AppFuse. You can see his alpha-level work in Google Code's tapestry5-appfuse project. I haven't had a chance to take a look at Serge's work yet, but I'm eager to do so. Hopefully we can get it back into the main project sooner than later. As far as Wicket and Stripes support, I haven't forgot about those - just having trouble finding the time and motivation to do the work.

Posted in Java at Sep 17 2008, 09:35:45 AM MDT 12 Comments

New Belgium's New Beer: Giddy Up!

I like the name, but the beer itself doesn't sound very good.

Giddy Up!

Ale brewed with Lemon Peel and infused with Espresso. Anyone tried this stuff?

Posted in General at Sep 16 2008, 09:43:48 AM MDT 16 Comments

Pictures of the Bus at MotorWorks Restorations

Jeremy from MotorWorks restorations sent me an e-mail this morning to let me know there's pictures of my bus available on their site. Apparently, they're quite a bit further along than these pictures show. When I talked to Jeremy last week, the bus was at the sandblasters.

Disassembly

This Thursday, I'll be traveling down to The Springs to checkout the bus, as well as speak at The Colorado Springs Open Source Meetup. Should be a fun evening.

Posted in The Bus at Sep 15 2008, 08:39:14 PM MDT 4 Comments

[DJUG] Ship it! and Distributed Teams by Jared Richardson

Jared's first book is called Ship it! and it's been wildly successful (translated into several different languages). During the first hour, Jared talked about his book and practices defined in it.

Ship it! is an attempt to talk about the holistic process of software development: techniques, infrastructure and process. For Techniques, there's a Technical Lead, The List, Code Reviews, Code Change Notifier and Daily Meetings. Infrastructure involves Version Control, Script Builds, Continuous Builds, Track Issues, Track Features and Writing/Running Tests. Process is Propose System Objects -> Propose Interfaces -> Connect Interfaces -> Add Functions -> Refactor, Refine, Repeat.

Martin Fowler's definition of Architecture: anything that is difficult to change later.

The majority of Jared's talk was about implementing TDD, continuous integration and many other things driven by audience questions. I didn't take notes because it was more of a conversation than a presentation. Jared's second talk was on Distributed Teams and my notes from this talk are below.

Agile is not XP or Scrum, those are implementations of Agile. The Manifesto for Agile Software Development is the interface for Agile Development. It contains the following principles:

  • Individuals and interactions over processes and tools
  • Working software over comprehensive documentation
  • Custom collaboration over contract negotiation
  • Responding to change over following a plan

To re-word these principles: Agility is...

  • People interacting
  • Software that runs
  • Fast Feedback
  • Frequent Change

Scrum principles are often not about developing software, they're about making people talk. The important thing is to get people in the habit of communicating. The best way to get people interacting is to do Daily meetings. One to two minutes per person. Same time. Three questions (what did you do yesterday, what today and any blockers?). Scrum style.

How do you do a daily meetings when you're remote? Conference calls are the most common, but don't let anyone local dial-in or they will get in the habit of doing it. Video is best, but it's often expensive to setup. One good strategy for daily meetings is IM. The beauty of this is that there's a transcript of the daily meeting that others can read. Conference calls are usually bad b/c you can only hear the guys that are close to the phone. It's even worse when the speaker phone is a cell phone. Whatever you do, you should never skip the daily meetings.

Peer Code Reviews are another good way to get people interacting. The first rule of code reviews is that anyone can refuse to do one. If you're not doing code reviews or pair programming, you'll end up with inefficiencies and broken windows. Address the behavior head-on. Peer Code Reviews remotely: e-mail, Skype headset, IM, VNC or SubEthaEdit (works awesome). NetBeans (collaboration module) and Eclipse (communication framework) have plugins that allow SubEthaEdit-style functionality.

How do you keep software running? Continuous integration and automated testing. Keep a list of atomic features. Prioritize. Don't let people work for 2 months. All tasks should be broken down into small chunks. Tests are a good way to communicate. Don't tell me you're done because you think you're done. Show me a test that proves you're done. Don't allow broken windows. Broken windows give the impression that no one cares and more bugs happen because of this. Continuous integration is essential for remote teams.

What's the best to get fast feedback? Fast compiles, fast tests, running CI 24/7. Another good strategy is the The List. Make sure and get feedback from your Tech Lead and from your Customers (they like to be involved). If you have a list that doesn't change after 6 weeks, you're working for a team who's list is dead.

There's nothing wrong with documentation and a plan, but its the things on the left that are more important. Offsite teams should have a single tech lead. Writing Tests might be better than writing requirements. When the tests pass, you'll get what you asked for. If you care about the design, write unit tests. If you don't care about how it looks, but want it to work, use integration/MCT for functional tests. Don't separate development and QA. To deal with time zones, make the tech lead stay up and rotate. For documentation, DRY out your Docs. Generate documentation instead of manually creating them.

"Docs are a cache ... flush often"

For Customer Feedback, have the tech lead translate.

I really enjoyed Jared's talks. The first one (on Ship it!) didn't provide much new information for me, but that's likely because I've worked on several open source projects and I've tried to bring those procedures and practices into any company I've worked at. I'm very grateful that LinkedIn does a good job with continuous integration (Hudson), bug tracking (JIRA) and documentation/planning (Confluence).

The 2nd talk on Distributed Teams was enjoyable because I'm in the heart of that - managing a remote team in Denver. We've experienced the awful conference calls where you can't hear anything or when we're on speaker on a cell phone. We do have all the video conferencing equipment purchased (10K worth) and sitting in our office, but haven't set it up because we're waiting on IT to setup a persistent VPN (which is a requirement to make it work). I've had some communications issues with my boss (mostly related to him not knowing what we're working on). We do daily stand-ups and use many of the practices recommended by Jared. One thing I think we can do to increase communication with headquarters is to start doing our daily meetings over IM and posting the transcript to a wiki page.

If you get a chance to hear Jared speak, I highly recommend it. He has a style that's very conversational and fun to listen to. You feel like you're a part of a self-help group rather than listening to someone preach about how you should be developing software.

Posted in Java at Sep 10 2008, 09:56:52 PM MDT 4 Comments

Happy Birthday Jack!

Jack's birthday was last Thursday (August 28th) and only now am I getting a chance to wish him a Happy Birthday on this blog. I told you it was a busy week last week. ;-)

Happy Birthday Jack!

On his birthday, I picked him up from Kindergarten at 11 and let him run the show for the day. Needless to say, we had a good time.

Jack on his 4th Birthday At the Zoo

4 and still loves trains Mmmmm... Ice Cream

On Saturday, we had a party to celebrate at my house. It was a great time with many old friends and lots of crazy kids.

Sophie and Jack - both 4 Jack's Birthday Cake

Ready for the Piñata Candy!

I woke up to quite the disaster area the next day. I was also quite impressed when Abbie showed up with her ears pierced.

A Disaster Area Abbie's New Earrings

The rest of the weekend I spent quite a bit of time enjoying A Taste of Colorado. When work began on Tuesday, the week intensified as I was the "Release Owner" for LinkedIn this week. We made a number of backend changes to reduce statefulness and improve performance. I'm proud to say it was one of the smoothest releases I've been a part of, mostly because of the high quality people involved.

As far as my schedule for the rest of the year, it seems like I'm going to be busier than ever. I have to complete my presentations for CSS this week. In two weeks, I'm speaking at the Colorado Springs Open Source User Group Meetup. The following week I'm heading to Munich for Oktoberfest. If I live through that, I'll be implementing Memcached, speaking at CSS, hunting with my Dad, celebrating Abbie's birthday, traveling to Costa Rica/Panama and keynoting the JavaEdge Conference in Israel. If you happen to be in Colorado Springs, Munich, Mountain View, Keystone, Montana, Costa Rica, Panama or Israel in the next few months, maybe we can enjoy a beer together. Cheers!

Posted in General at Sep 05 2008, 06:37:33 PM MDT 2 Comments

A Good Friend becomes a DU Hockey Coach

It's not everyday you see a good friend's name in the headlines. Today I did:

Michael Zucker Named Volunteer Assistant Hockey Coach
DENVER - Two-time National Coach of the Year George Gwozdecky has tabbed Michael Zucker as the new volunteer assistant hockey coach for the seven-time NCAA national champion Denver Pioneers. Zucker arrives at DU after spending the last three years as an assistant coach with the Western Hockey League's (WHL) Everett Silvertips.

"We are pleased to name Michael Zucker as our new volunteer assistant coach," Gwozdecky said. "Michael brings a lot of coaching and tremendous technical video experience to our program."

I first met Mr. Zucker when I had a contracting gig at Douglas Country way back in 2001. He was an excellent Software Developer at the time and impressed me with his knowledge of agile development. I've stayed in touch with him over the years and it's great to hear he's moving back to D-town.

What's more impressive is that he's following his dream. This guy is someone who makes very good rates developing software and teaching others how to do the same. This year, he's going to give all that up, live off his savings and do something he's always wanted to do. With a big-name hockey school like DU, I'm sure it's an excellent decision. Congrats Zucker!

Posted in General at Sep 03 2008, 03:34:07 PM MDT Add a Comment