2011-09-29

Upcoming Fuse Community Days in London and Paris

I am going to be speaking in London on October 11th and Paris on October 13th speaking at free Fuse events -  if anyone would like to meet-up for a beer and chat then come meet us.


I have the pleasure of doing a co-shared talk with James Strachan about Camel, Enterprise Integration Patterns and Fuse IDE. Knowing James I am sure you will get a glimpse of the latest installment of the Fuse IDE which has some remarkable new features and ... yes looks much nicer.

Skills Matter has provided a site with an agenda and more details you can check out here.

FuseSource UK Community Day
Tuesday 11th October
Skills Matter, London, EC1V 7DP


FuseSource FR Community Day
Thursday 13th October
La Défense, Paris

So if you are nearby those locations, then I suggest to stop by. Its free and ad-free.

2011-09-27

Todays webinar - Getting Started with Apache Camel Fuse IDE

Today FuseSource is hosting a 1 hour webinar on getting started with Apache Camel with Fuse IDE.

FuseIDE is a graphical, Eclipse-based tool for integrating software components that work with Apache ServiceMix, ActiveMQ and Camel and can help you with your messaging and integration projects.


Developing Camel applications with Fuse IDE in Eclipse

If you are not currently using Apache Camel you might not know that it is a powerful and flexible integration toolset that allows users to create integration routes between software components using the Camel domain-specific language (DSL). Fuse IDE goes one step further and allows users to connect components visually. With a simple drag and a drop developers and architects can create, debug, and deploy simple or complex routes and integrate systems quickly and easily.

The webinar starts at 5pm central european time.

You can find more details here, and how to register for the webinar.

2011-09-25

Camel 2.9 - Much Improved Simple Language

I\m sitting outside and enjoying the last sun and summer we have here in Scandinavia. So I might as well take time to write this blog entry which has been on my todo list for a while.

Camel has a built-in expression language called Simple. It has been around for a very long time. It started out as a "templatish" (String interpolation) language, which allows you to define dynamic strings, using token placeholders.

For example you could set a mail subject header as follows:
.setHeader("subject", "Your order from ${header.company}")

 In Camel 2.0 we added support for operators in the Simple language. This was a good addition, as it allows end users to use Simple languages for predicates. In other words you have a built-in language in camel-core, which you can use in the Camel routes with EIPs that uses predicates.

For example you could route messages depending on the content using the Content Based Router:
.choice()
  .when().simple("${header.priority} > 10")
    .to("activemq:queue:high")
  .when().simple("${header.priority} > 5")
    .to("activemq:queue:med")
   .otherwise()
     .to("activemq:queue:low")
  .end()

As the roots of the Simple language was based on its templatish behavior, there parser was implemented using regular expressions. However as people may know, using regular expressions comes with a cost of complexity and being able to read and understand the fairly long patterns. So we have probably reached how far we could go with the Simple language.

Another problem with using regular expression is that, as an end user, you must enter the input correctly. If you had some typos in the input, then the regular expressions was not always capable of detecting those errors, and being able to report this as an error. Instead the predicate would fallback and pass as true. This leads to confusion and frustration by the end users, as they do not understand, why all their messages goes to the first predicate in their content based router etc.

Knowing this, I took the time to work on a new and improved Simple language. To avoid disturbing the existing source code in the trunk. I setup a new project at github, and asked people in the community to participate. Taariq responded and we worked on this project. A reason for using a repository outside the Camel trunk, was that this was an experiment, and we did not knew when we set sail, if this would become useable and better.

The new improved Simple language is based on the principles of a recursive descent parser, with a grammar, syntax parser, and ast (abstract source tree). We set a goal to not depend on any 3rd party frameworks such as ANTLR or the likes. The Simple language is simple, and do not need to overhead and complexity of ANTRL or Eclipse XText. There is already sufficient 3rd party languages you can use instead such as JavaScript, Groovy, Mvel etc. However maybe in the future we may develop a new Camel language outside camel-core, that uses ANTRL/XText if the community is looking for this kind, and its feasible to implement.

With the new syntax parser we are capable of detecting all syntax errors, and give a precise error report what is the problem. For example if you forgot to use == in the equals operator, and only have =, then you get a error as follows:

org.apache.camel.language.simple.SimpleIllegalSyntaxException:
unexpected character symbol at location 15
${header.high} = true
               ^
And there is a ^ pointer, which points you to the location of the problem.

This re-architecture of the Simple language, also allows us to add new operators and functions to the language without the implications of the old regular expression approach. The community was asking for being able to increment a counter using the Simple language purely from the XML DSLs. So this is now possible as follows:

<setHeader header="myCounter">
  <simple>${header.myCounter}++</simple>
</setHeader>

We have support for unary operators specified on the postfix side of the operator. So we could potential add other operators, if it makes sense.

I have also experimented with ternary operators, so you can do the conditional operator such as:
<setHeader header="bigSpender">
  <simple>${header.amount} > 1000 ? true : false</simple>
</setHeader>

Likewise we may add support for the elvis operator (?:) as a shorthand for the conditional operator:
<setHeader header="name">
  <simple>${header.username} ?: "Anonymous"</simple>
</setHeader>

Anyway what I wanted to say with this blog entry, is that the Simple language is improved in the upcoming Camel 2.9 release, so it will give you better error details when you have syntax errors, and all your troubles with why the content based router is rouging all messages to the first predicate is solved as well.

2011-09-23

Video using Splitter EIP and aggregate with Camel

Today a colleague of mine from FuseSource posted a new 8 minute video on YouTube how to use the Splitter EIP with aggregator, so it composes the Composite Message Processor EIP pattern. The video covers the use case shown in the figure.

Use Case in Video
The video also demonstrates how you can trace messages at runtime, and see how the message is changed during routing, using the Fuse IDE tooling.

2011-09-16

Apache Camel 2.8.1 Released

Today the Apache Camel team announce the release of Apache Camel 2.8.1. This release is mainly a bugfix release over 2.8.0, resolving 45 tickets. There is one new improvements, which is the camel-soap component now supports using multiple parameters.

The release notes is here, and a list of JIRA tickets resolved is here. You can download the release from Apache, as well the JARs is synced to Apache Maven central.

JavaZone 2011 - Cool Badge

In my previous blog covering my impressions from the recent JavaZone conference I forgot to tell you about the cool badges used.

JavaZone Speaker Badge - A 3.5 inch floppy disk
Its a 3.5 inch floppy disk. The speakers had yellow disks, and attendees black.

At the JavaBin stand (the organizers) there was an old computer with a disk drive. There was a rumor about a lottery, so by inserting the disk you were told if you won or not. The computer told me that I was a looser, using old scholl ASCII arts. This reminds me back in the good old Amiga days with the demo scene and whatnot.

2011-09-14

JavaZone 2011 Conference


I am sitting in my hotel room in Oslo, Norway, and thought I ought to write this blog entry while the memories of the JavaZone conference is still fresh in my mind.

JavaZone is possible one of the largest conferences here in Scandinavia, and so far I am impressed. The venue is Oslo Spektrum, which is big multi arena with a huge exhibition floor. The speaker rooms is however a bit out of the ordinary. My presentation was in room five, which was up on the "second floor". The seatings in the arena is very steep and thus your audience is seated high above the podium.

Room 5, having steep seatings
My presentation was similar to some of the previous talks I have been touring with. So you may have seen the presentation at a webinar, or from the CamelOne video, or the likes. The video of my talk is available here. And the slides is here.

After my presentation, a 2nd Camel presentation was given by Rune Peter Bjørnstad, and Bjørn Nordlund. The presentation was in Norwegian, however as a dane I was able to understand almost all of it.

The 2nd Camel talk by Rune and Bjørn
This was perfect timing as Rune and Bjørn's presentation was naturally in line of my presentation. They covered a real life use case used by Nets.no, their employer. The story is how their implemented a solution to process and validate payment transactions in a brach of 1000 pieces. The story and how they presented it was very well done. They did live coding in the Camel Java DSL in IDEA and had a easy to understand web page which they used to test their application. They showed how deal with transactions, avoid losing messages, and how to handle in case the server crashed etc. All together a very good presentation. The video for their presentation is available here.

Later in the evening The Java Posse team went on stage.

JavaPosse on stage
The audience was packed and we had a good time. It was their regular show of having polls of your favorite language, mobile platform etc. And taking in questions from the audience. And thanks to Atlassian for sponsoring the beers.

The JavaZone conference is a very good conference. There is plenty of space in the exhibition hall, although it may seem a little crowded.
Exhibition Hall
There is a overflow room at the 2nd floor, which have 6 big monitor screens. Then you can sit there with a headset and pick and chose your sessions. This is very neat and popular.
Overflow room on the 2nd floor
What I particular like about the JavaZone conference is the excellent food and beverage. Its free and available all the time. So if you are hungry then you just go to a venue of your choice. You can have lasagne, sushi, tappas, fish, vegetarian, ice cream, and there is plenty of expresso machines so you can get a good cup of coffee. And the best, there is no big line of queue at the lunch break. This is something any other conference organizer ought to consider.

There was also a book store in the exhibition hall and I managed to spot Jonathan and mine book Camel in Action. By the way FuseSource is offering an exclusive 40% discount on the book, which you can find details here.
Camel in Action book at the book store
On the 2nd day in the afternoon I took a break from the conference and did a walk in the city of Oslo. The weather showed itself from the best side with sun and a nice temperature. The day before we had a all day of rain and clouds.

I went on my walk to the Munch Museum to see the arts of this excellent and famous norwegian painter. However his most famous painting - Skriget. Is not on display here but at the national museum which is a 30 min distance away using public transport.
Munch Museum in Oslo
When my wife sees the Skriget painting, it reminds her of a well known Danish politician - Willy Søvndal.
Villy Søvndal
I then purchased a poster of the painting, so we can have it hanging in my home office.
Skriget by Munch
If you think you know this painting from somewhere, but can't quite put it from where, then it may be from The Simpsons.
Homer Simpson as Skriget
I went back to the conference to catch a few talks such as the excellent talk about Coffee script. Which reminds me that I am in need of coffee, so I better end this blog post now.

2011-09-09

CamelOne 2011 Flashback


I have had this blog article on my ever growing todo list. Now I am sitting in the airport waiting for a plane bound to Oslo, for the JavaZone conference. I guess airports manifest itself as good opportunities to write blog articles as you often tend to be without wifi, and have hours to kill.

So CamelOne is the first conference which is solely focused on the integration space and having the Camel project as the "star of the show". The conference took place in May 2011 in Washington DC. It was a full day event with 3 tracks, each having 5 sessions, and 3 key notes as well. So there is plenty of choices and great talks to go to. The agenda is online here.

CamelOne 2011
I attended the conference as a speaker, giving a talk, well of course, about Apache Camel. All the sessions was video recorded, and they are being put out in the public over the next course of time. The first number of videos is online, which you can find here.

From a Camel point of view, we had the pleasure of having Gregor Hohpe giving the key note.

Gregor giving the key note at CamelOne 2011
Gregor is the "main" co-author of the definitive Enterprise Integration Patterns book, which is a record selling computer book. I snapped a photo of Gregor and James sitting in the lobby of the conference center.

James Stachan and Gregor Hohpe 
In fact these two individuals is the reason why we have the Apache Camel project today. Gregor wrote the EIP book, and James wrote Apache Camel. Well the story is that Gregor and James know each other. Gregor mentioned the background of why he got started on the EIP book, as well as the story how James got the idea of Camel, at a party they had at Gregor house, back then in San Francisco. James basically said that someone should write a software implementation of the EIP patterns. And well yes a bit later he said ... well ***** ** I am going to do it. Gregors keynote is online here. Gregor also talks about the possibility of a EIP II book (fingers crossed).

The day before the conference took place, we had dinner and drinks. On the picture we have Debbie, Scott, James, Gregor, and Jonathan from my table. I forgot to snap a photo of the other tables.
Speakers Dinner
The day after the conference I had the pleasure of accompanying Gregor for a sightseeing tour in Washington. We started having a grand american breakfast at IHOP. So we got a stack of pancakes, hash-browns, egg and bacon.

American Dinner Breakfast at IHOP
Getting to the city center is easy as we caught the subway. Gregor had a little dispute with a subway attendee whom disliked the fact Gregor was taking photos of the subway station. Anyway we managed to get into the centre and was soon out in the nice sunny weather. We made our ways to the Washington monument. I was impressed with the height of the sphere, and the sheer size of the bricks.

Washington Monument
After that we walked down past the white house, but needless to say, Mr Obama was not at home, inviting us in for a coffee and a talk about integration and open source in the public sector.

The White House
So we walked down the alley and found the Smithsonian museums. At first we walked a couple of parks having modern sculptures on display.

Some famous sculpture, but some famous artis
The aviation and space museum was just next door, so we did our last stop here. I am really impressed with this museum. There are countless of space rockets, the moon lunar lander, space suites, and whatnot. You can easily spend hours walking and seeing something new. We only managed to catch a glimpse of what the museum had to offer by walking the ground floor.

Gregor looking at the return landing capsule
So in the afternoon we made our way back to the hotel as Gregor had to catch an earlier flight than I. So I spend the next couple of hours at the hotel, talking to a number of conference attendees, who was on the 2-day training sessions. Among others I had the honor of a drawing the raffle for the prices of four Camel in Action books as free giveaways, which Manning was sponsoring. So the winners was able to have me sign their book as well. At about 6pm I hailed a cap, and went for the Dulles Airport, on my evening flight back to Europe.

The CamelOne videos is being released online over the course of time. You can find them here.

Hope to see you next year at CamelOne 2012.