Monday 24 November 2014

More blog posts now coming on Medium...

I've started posting new blog posts on my medium account instead as its got a much nicer writing experience and looks much neater. e.g.

So please follow me on or on twitter (@jstrachan). Feedback always appreciated. Cheers!

Thursday 8 May 2014

Micro Services the easy way with Fabric8

Micro Services have received a lot of discussion of late. While its easy to argue the exact meaning of the term; its hard to deny there's a clear movement in the Java ecosystem towards micro services: using smaller, lighter weight and isolated micro service processes instead of putting all your code into monolithic application servers with approaches like DropWizard, Spring Boot and Vert.x. There are lots of benefits of the micro services approach; particularly considering DevOps and the cloud.

Fabric8 is poly app server

On the fabric8 project we're very application server agnostic; there are lots of pros and cons with using different application servers. The ideal choice often comes down to your requirements and your team's knowledge and history. Folks tend to prefer to stick with the application servers they know and love (or that their operations folks are happy managing) rather than switching; as all application servers require time to learn.

OSGi is very flexible, modular and standards based; but the modularity has a cost in terms of learning and development time. (OSGi is kinda marmite technology; you tend to either love it or hate it ;). Servlet engines like Tomcat are really simple; but with very limited modularity. Then for those that love JEE there's WildFly and TomEE.

In the fabric8 project we initially started supporting OSGi for managing things like JBoss Fuse, Apache Karaf, and Apache ServiceMix. If you use version 1.0.x of fabric8 (which is included in JBoss Fuse 6.1) then OSGi is the only application server model supported.

However in 1.1.x we're working hard on support for Apache Tomcat, Apache TomEE and WildFly as first class citizens in fabric8; so you can pick whichever application server model you and your team prefer; including using a mixture of container types for different services.

Fabric8 1.1.0.Beta5 now supports Java Containers

I'm personally really excited about the new Java Container capability which is now available in version 1.1.0.Beta5 or later of fabric8 which lets you easily provision and manage java based Micro Services.

A Java Container is an alternative to using an application server; its literally using the java process using a classpath and main you specify. So there's no mandated application server or libraries.

With pretty much all application servers you're gonna hit class loader issues at some point; with the Java Container in fabric8; its a simple flat class loader that you fully control. Simples! If things work in maven and your tests; they work in the Java Container (*); since its the same classpath - a flat list of jars.
* provided you don't include duplicate classes in different jars, where the order of the jars in the classpath can cause issues but thats easy to check for in your build).
The easiest, simplest thing that could possibly work as an application developer is just using a simple flat class loader. i.e. using the java process on the command line like this:
java -cp "lib/*" $MAINCLASS
This then means that each micro service is a separate isolated container (operating system process) with its own class path so its easy to monitor and perform incremental upgrades of dependencies without affecting other containers; this makes version upgrades a breeze.

However the problem with micro services is managing the deployment of all these java processes; starting them, stopping them, managing them, having nice tooling to view whats happening and performing rolling upgrades of changes. Thats where fabric8 comes to help! The easiest way to see is via a demo...


Here's a screencast I just recorded to show how easy it is to work with any Java project which has a maven build and a Java main function (a static main(String[] args) function to bootstrap the Java code. I use an off the shelf Apache Camel and Spring example; but really any Java project with an executable jar or main class would do.

For more background on how to use this and how all this works check the documentation on the Java Container and Micro Services in Fabric8.

Please take it for a spin and tell us how you get on. We love feedback and contributions!

Saturday 8 February 2014

Fabric8, JBoss Fuse and Apache Karaf versions

This question came up on twitter and it wasn't a quick answer so thought I'd answer here.

So right now fabric8 is aligned with the JBoss Fuse 6.1 release thats coming out soon which is based on Apache Karaf 2.3.x (along with Apache Camel 2.12.x and Apache ActiveMQ 5.9.x).

We've lots of production customers on Fuse 6.0; so are not yet ready to take a major update of Karaf (3.x) which has lots of major changes in it and we've not yet put it through our QA process. (3.0.0 hasn't been out 2 months yet so its still pretty new).

As soon as the JBoss Fuse 6.1 release is out, fabric8 will move to support Karaf, Tomcat, WildFly containers (hopefully vertx and jetty too) along with stand alone JVMs like DropWizard and Spring Boot - in addition to its current support for managed processes, OpenShift and jclouds.

We've migrated fabric8 to be completely based on Declarative Services and moved away from OSGi blueprint; as its leaner, meaner, avoids dynamic proxies and is easier to deal the asynchronous modular nature of OSGi as things are dynamically added and removed. An added benefit is the use of Felix DS annotations lets us auto-generate nice stand alone OSGi tooling and fabric8 based fabric-aware tooling in hawtio for all of the services in fabric8).

Ideally it'd be good to migrate fabric8 straight to Karaf 4.x (or whatever it ends up being called) thats based on pure Declarative Services; as it'd make the OSGi based distribution of fabric8 leaner & meaner. But we'll see in a couple of months how things are looking in Karaf-land.

We're very excited about fabric8 being completely poly-container; so we can use fabric8 to provision and manage Karaf, Tomcat, Wildfly & vertx containers; stand alone JVMs along with working great with docker, OpenShift and jclouds - all with a lovely hawtio console for everything! Its going to totally rock! :)

Wednesday 4 December 2013

Demo of Fuse 6.1 with Apache Camel and hawtio on OpenShift

Here's a screencast showing how to get started using JBoss Fuse 6.1 Early Access release on OpenShift for creating integration solutions based on Apache Camel in the hybrid cloud (via OpenShift Online for the public cloud or OpenShift Enterprise for on premise, or a combination of both).

JBoss Fuse 6.1 Early Access from JBoss Developer on Vimeo.

Watch it on vimeo for the HD version.

The screencast shows how to create and deploy EIP flows; change them, make rolling upgrades and visualise whats happening all from your web browser via the Fuse Console; which is implemented completely using the open source project hawtio.

If you want to try it out for yourself (everyone gets 3 free gears on OpenShift online!), try this quickstart or see the more detailed instructions.

I hope to create many more videos soon; showing many other aspects of Fuse on OpenShift (like creating A-MQ topologies, getting insight into whats really happening via ElasticSearch and the API registry support among others). Until then, enjoy! Feedback always appreciated.

Wednesday 20 November 2013

happy 1st birthday hawtio! Welcome to hawtio 1.2.0!

Its exactly a year ago today I hacked the first commit of hawtio, the lightweight and modular HTML5 console for Java thats hawt.  As Claus just said, Happy Birthday hawtio!

Its been an amazing ride, its hard to believe its been just a year! A huge thanks to the hawtio team and everyone who's helped turn hawtio into a truly amazing console.

hawtio's really growing up fast and getting more awesome by the day. It constantly surprises me the awesomeness the hawtio team keep on adding.

Highlights of the year

The highlights of the year for me are:

  • lots and lots of plugins are now available for working with JVMs, JMX, logging and many frameworks like Apache Camel, Apache ActiveMQ, Infinispan, ElasticSearch and OSGi
  • Apache ActiveMQ 5.9.x or later now ships with hawtio inside
  • Apache Camel folks have effectively deprecated the old camel console in favour of hawtio
  • JBoss A-MQ and JBoss Fuse 6.1 is coming with hawtio as the default Fuse Management Console
  • hawtio works great stand alone or in most containers now like Apache Karaf, Apache Tomcat, Jetty and Widfly
Pretty much all aspects of the console is pretty awesome already; here's a few edited highlights:
  • in Camel we can visualise real time visualisations of running Camel routes inside a JVM, see the metrics update in real time, visually design camel routes, and trace or debug running routes
  • in ActiveMQ we can see all the queues, topics and metrics; create queues/topics, browse queues, on 5.9.x we can resend DLQ messages, move messages from a queue to another queue, delete messages, send messages and see destination consumer/producer diagrams. When using Fuse 6.1 we can visually design clustered broker topologies (e.g. for geographic store and forward networks).
  • in OSGi there is support for all main aspects; from viewing bundles, features, Config Admin, declarative services, viewing services, packages, dependency graphs, diagnosing class loading issues, navigating from bundle to maven metadata to source/javadoc, to using the Karaf shell from a browser.
  • when using JBoss Fuse 6.1 then hawtio becomes a full featured UI for working with many containers in a fabric; creating containers, editing profiles, looking inside runtimes, browsing logs etc.
One of my personal favourite features: when using the insight-log library from Fuse (or when using Fuse), the log plugin links all log statements and methods in each stack trace to the exact line of source code that generated the log statement or exception! Thats hawt

Or being able to search maven repositories and view versions, source or javadoc from inside the browser. Also the interactive developer help is pretty cute; so you can play around with all of hawtio's angularjs directives in the browser ;)

Getting Started

I don't think you truly understand how awesome hawtio is until you start using it really. So get started today!

We love contributions so please dive in and help; even if its just ideas for how to make things even more awesome. 

hawtio is built on AngularJS; I've used many different UI and web frameworks over the years (most of them TBH) and I really can't recommend AngularJS highly enough. So if you fancy learning AngularJS, why not try hacking a new plugin or adding some functionality to an existing plugin you like? There's lots of ideas already if you're not sure what to do.

Check out the developer guide for more details on getting started and building the code.

hawtio 1.2.0 released!

To celebrate hawtio's first birthday we've just released 1.2.0 today! It should be sync'd to maven central in the next hour or two. 

There are 407 issues fixed in this release (most of them new features or improvements I might add!)

So what are you waiting for? Go get it while its hawt!

Don't cha wish your console was hawt like hawtio?

Thursday 10 October 2013

a sneak peek at whats coming in JBoss Fuse 6.1

I'm really excited about the forthcoming Fuse 6.1 release as there's a ton of awesome new features which I've really wanted for some time and some really hawt tooling :).

So here's a quick sneak peek, focussing mostly on the new version of the Fuse Management Console (which is now implemented by hawtio open source project).


First let me show you the A-MQ topology view which lets you view and create topologies of Apache ActiveMQ brokers in your fabric.

The green background is used to show the master broker (see the top row, the green master is on the left, the grey background container on the right is the slave). If in doubt, hover over the containers and the tooltip tells you whats going on or click on things to dive into the detail views.

For containers which are inactive, the green play icon becomes an orange stopped icon (or you see the provisioning icons as containers startup, download, provision etc). This view is real time so you can watch containers startup (which can take a little while if you're using small gears on OpenShift ;).

If you click on the connect icon inside each container box, it takes you straight inside that broker; so you can view the destinations & see all the detailed metrics etc.

Incidentally the numbers in green badges next to the profile names show the number of containers running versus the required target number (like the new profile screen shows - see example below - the Target (requirements) versus Count (actual) columns). Again the tooltip gives a detailed explanation if you're unsure

e.g. if you create a new broker config for a replicated broker; it by default creates a requirement for 3 containers to run for that profile (broker configuration); then you'd get a red icon until enough containers are running - and clicking the red badge takes you to the create containers page.

On OpenShift we've an auto-scaler, so as you add a new broker configuration, the containers would spin up immediately once the configuration is saved and you can watch them visually spin up (cool eh!).

To setup your own broker topology click the + Broker button to add new broker configurations (Stand Alone, Master / Slave, N + 1 or Replicated) and define the groups of brokers.

When using Fabric you can put brokers into groups (or 'regions'). A group is just a name (or a path "us/east" if folks prefer); its just a String which is used to look in the right bit of ZooKeeper to find the brokers to connect to. So it can be a tree; though usually folks requirements are simple enough to just have either 1 global region; or have, say, 3 for different geo locations.

We can have a bunch of brokers in different groups, say, us-east, us-west, emea and messaging clients can then just use the right group name to connect to the right group of brokers. We use groups too for defining store/forward networks between groups. e.g. the us-east brokers may need to also store/forward with us-west brokers; they typically don't care which broker they connect to - but just need to connect to a broker within the right group. 

We can then create Fabric profiles for clients which are location specific. e.g. if you've a 'cheese' application (some web service or web app or whatnot) that needs to connect to A-MQ; we can have a cheese-us-east profile; which the only thing that profile does is it inherits from 'cheese' and just specifies the A-MQ group name of "us-east' to connect to.

Longer term we hope to align the broker groups with OpenShift's DNS/applications; so folks not using Fabric at all can just have the regions mapped to DNS names; e.g. "" would be the host name to connect to an A-MQ broker and under the covers it does the DNS / haproxy crack to connect you to the right broker - without requiring any magic on the client side (other than knowing the right DNS/host name for the right group).


Also new in 6.1 is profile specific dashboards; so you can create custom dashboards for any profile which is based on the services running in that exact profile (i.e. a specific group of containers); then any container you connect to via the Fuse Management Console you get a nice easy view of the right things you want to see for that kind of profile. 

e.g. here's the default real time dashboard:

you can resize, move and add/edit/delete views in the usual way. Pretty much any UI in Fuse Management Console (which includes all the hawtio plugins) can be used as a rectangle on the dashboard; so you could add camel route metrics, log file searches or whatever).

Dashboards are then versioned and stored with all the other configuration. Which brings me to the configuration side...

Configuration gets git hawtness

Fuse Fabric is designed to make it really easy to manage large clusters of containers in a simple way; so you can group containers into profiles. Then you can configure the profile & choose the exact deployment artefacts once and all the containers are updated immediately. You can use profile inheritance so you can configure groups of containers differently; e.g. use regional changes to some configuration values; increase the RAM/cache/disk usage settings on bigger boxes etc.

Finally you can version your profiles; so that rather than changes to a profile becoming immediate on all containers; you can create a new version; edit the profiles - then perform a rolling upgrade; choose which containers to upgrade, try them for a while, if things look good, roll more containers to the new version - or rollback if things go bad.

In Fuse 6.1 we have support for working with the configuration using the git source control system and its associated tools. This means that all changes to configuration, deployment units, dashboards, the wiki, camel routes and broker topologies all has a nice audit log of who changed what when; its easy to use all the available git tools to do diffs and revert changes, merge between branches/repos etc. 

This means the configuration can work nicely with Continuous Integration and Continuous Deployment systems (e.g. using gerrit and jenkins). e.g. define all your profiles and configuration in development; then through Continuous Integration and Continuous Deployment builds and code review systems like gerrit, merge changes from development -> integration test -> soak test -> production etc.

Using git with Fuse 6.1

If you view any container's page like below and click on the URLs tab:

it shows the git url; so just do a git clone of that; then checkout the branch for the version you want to work with. (In 6.1 of Fuse, a version maps to the name of a branch in git).
git clone http://localhost:8181/git/fabric
cd fabric
git checkout -t origin/1.0
ls -al fabric/profiles
you can then hack on the profile data using any editor you like (they are just folders of config files) then commit and git push to make the changes active! Or make your own branches and so forth.

Whats really cool is that the wiki (where you can document all your applications and profiles) is versioned in the same git repository as your dashboards and configuration. So if you add a new version of a service in a new version of a profile; the dashboard can be updated to show new metrics; then whatever version is running you see the right wiki, documentation and dashboard for the exact version!

Camel editor and debugger included

Last but not least; 6.1 includes web based editing, viewing (with real time metrics and debugging of camel routes. The camel routes can be versioned in profiles; so you can do rolling upgrades of your camel routes with all changes audited and browsable in a git repository.


No blogging for months and then I write a huge post, sorry! :) 

If the above was too long just think, Fuse 6.1 has an awesome improved web console (based on the hawtio open source project) and lets you work with all the configuration in git so all changes are audited and you can easily combine Fuse 6.1 with any git, Continuous Integration or Continuous Deployment tooling for all your provisioning & configuration data.

There's lots more 6.1; I'll have to try blog more often ;)

Thursday 13 June 2013

introducing the Apache Camel based open source iPaaS

I've had a blast at CamelOne and Red Hat Summit in Boston; thanks for all the great speakers and feedback!

I demo'd our new Apache Camel based iPaaS (i.e. our Camel Cloud or Fuse integration appliance). Here's a quick demo video of what I presented at my CamelOne keynote along with the slides.

If you don't mind working on the bleeding edge here are the instructions for building and running it, though we'll have the public stable early access release soon.

Camel in the cloud demo from CamelOne 2013 from JBoss Developer on Vimeo.

Wednesday 17 October 2012

Fuse IDE 3.0 beta and questions I missed from the webinar

I just gave a webinar as part of the Red Hat Integration and BPM Week on how Fuse IDE makes integration easy. If you missed it there should be an archive up tomorrow. There were a few questions I didn't get chance to answer (as usual I rambled and ran out of time ;-), so here they are...

Firstly you can download the 3.0 beta here (you'll need your fusesource login) or the update site is here. If you'd rather stick with the stable GA version get it from the download page

Does it have eclipse plugin? Can I get the same features using eclipse plugin?
Yes; use the update site to install the eclipse plugins for Fuse IDE into your eclipse; please use Indigo (3.7.x) and it works OK in JBoss 5.0.0.GA or vanilla eclipse java / jee. Doesn't yet support Juno though. Its easier to download the full RCP release though :)
what is the difference between fuseide and redhat developer? 
Fuse IDE was developed by FuseSource before the acquisition by Red Hat; so we'll be integrating them together into the Red Hat developer tools (JBoss Tools etc). Luckily there's a great fit between them with little overlap really! :)
Does Fuse support monitoring and managing message flow when services running in Cluster (say JBoss AS 7.x cluster)
Yes, any JVM which has a fairly recent Camel inside should work fine provided you can connect to it over JMX. The message tracing is only supported so far in the Fuse distribution of Camel (it should be back ported to the Apache distro soon). The newer the Camel version the better! :)
Is the source for the examples downloadable from anywhere to have a play with?
Yes. The easiest thing is to create the project inside Fuse IDE (New -> Fuse Project -> ...) and all the source code is included in the generated project; then you can just play immediately.

Where this code comes from to get included inside Fuse IDE is all over the place :) Mostly either the Apache Camel project's archetypes or the Fuse projects examples - so its easier to create the various projects and look inside the generated source.
Nice! Current state of JBoss integration? When do I get to use all these goodies -- Eclipse/JBossTools w SwitchYard (esp SCA editor) and Fuse (esp Camel EIP editor) together -- + your runtime tooling on JBAS7.1 / CDI / SwitchYard deployments?
You should be able to use JBoss tooling and Fuse IDE together right now; unfortunately Fuse IDE isn't yet compatible with the SwitchYard SCA tooling (due to Graphiti dependencies); which hopefully we can fix soon - but Fuse IDE works with JBoss Tools and already includes the Drools / jBPM tooling too.

You should be able to use Fuse IDE today with JBoss Tools and AS 7.1; the more recent Camel version the better :). As an aside, the next Camel release should have awesome CDI support!
Please comment on using IDE (JMX explorer) in a QA fabric.
So the Fuse Fabric tooling in Fuse IDE is really intended for developers; though you could have a Fuse Fabric for development, testing, QA, load testing, performance testing, user acceptance testing or production etc. So long as you don't mind developers tinkering with endpoints & routes; using developer tooling in QA is OK :)

Though Fuse Management Console is really intended for more locked down operation based environments; Fuse IDE is focussed on developers really.

What is roadmap for ide with merger? 
Immediately we need to improve the integration between the two sets of tooling to ensure they work very cleanly together & allow SwitchYard tooling to be installed with Fuse IDE. Longer term I'd personally like to see tighter integration with Fuse IDE / Camel tooling with Drools rules & jBpm but the road map has not yet been completed; we'll publish it when its ready.
Does Fuse support monitoring and managing message flow when services running in Cluster (say JBoss AS 7.x cluster) 
Yes. The Fuse IDE demo I showed focusses on looking inside 1 JVM at a time and all the stats are available on a per JVM basis along with the visualisation of running routes etc. If you want to see a consolidated view of multiple JVMs, then I'd advise you watch Stan's talk on Fuse Fabric, Fuse Management Console and Fuse HQ which shows how to use Fuse Fabric profiles to aggregate statistics together into unified metrics (which you can then fire alerts on etc).

Thanks again for all your questions! Sorry there were too many to answer in the webinar. Feedback always appreciated! Enjoy the Camel ride :)

Update: I should have mentioned if you want to use the beta, which uses the Early Access distros of Fuse, you unfortunately need to hack your ~/.m2/settings.xml file to reference our EA repo

e.g. here's how your ~/.m2/settings.xml could look

This step will be go away in next months GA release - sorry about that! :)

Wednesday 27 June 2012

Fuse team acquired by Red Hat!

I am Red Hat! :) The Fuse team has been acquired by Red Hat into its JBoss middleware group. This immediately makes us the #1 open source integration and messaging stack (among other things!) providing a distributed ESB & messaging system together with integrated data transformation, rules engine (BRMS), CEP, BPM & registry - with full linux, storage, data services, CDI, web app & JEE support too - all in a highly modular architecture; use the smallest & simplest thing you need to get your job done.

Our technology & communities already overlap (e.g. Apache Camel & Apache CXF usage) & already fit together pretty cleanly but over the next few years we'll be creating even better integration & tooling with the JBoss team; and where it makes sense to do so we'll consolidate things together so we've a single modular open source stack for every integration & messaging need either on premise or in the cloud, thats lightweight and easy to use.

There's a ton of work to do but we're all really excited! I'm particularly looking forward to working with all the great folks at Red Hat, our awesome customers & the various vibrant open source communities to make an even better open source integration & messaging stack with great tooling & cloud support. Expect lots of cool stuff soon! The future's very bright - and its red & wears a hat ;)

Monday 14 November 2011

Scalate 1.5.3 Released

The Scalate team is pleased to announce the availability of Scalate 1.5.3

Scalate is a Scala 2.9.1 based template engine which can be used stand alone, with servlets or web frameworks like JAXRSLift or Play or in integration frameworks like Apache Camel.

The following template languages are supported through the same common API:

  • Ssp which is like a Scala version of Velocity, JSP or Erb from Rails
  • Scaml which is a Scala dialect of Haml for very DRY markup along with the Jade syntax
  • Mustache which is a Scala dialect of Mustache for logic-less templates which also work inside the browser using mustache.js

All expressions inside SspScaml and Jade benefit from the full power and expressiveness of Scala plus they are typesafe and checked at edit/compile time to ensure you don't leave any mistakes in your templates.

Scalate 1.5.3 Highlights

  • Scalate now uses the Scala Presentation Compiler to boost performance of template compilation 3-10X
  • Support for compiling stand alone CoffeeScript files on the server, CoffeeScript filters and various CoffeeScript related bug fixes
  • pure Java API to working with Scalate

For more detail see the Full Change Log

Feedback is always welcome!

Posted via email from

Saturday 10 September 2011

Scalate 1.5.2 Released

The Scalate team is pleased to announce the availability of Scalate 1.5.2

Scalate is a Scala 2.9.1 based template engine which can be used stand alone, with servlets or web frameworks like JAXRSLift or Play or in integration frameworks like Apache Camel.

The following template languages are supported through the same common API:

  • Ssp which is like a Scala version of Velocity, JSP or Erb from Rails
  • Scaml which is a Scala dialect of Haml for very DRY markup along with the 
  • Jade for even more DRY Scaml
  • Mustache which is a Scala dialect of Mustache for logic-less templates which also work inside the browser using mustache.js

All expressions inside SspScaml and Jade benefit from the full power and expressiveness of Scala plus they are typesafe and checked at edit/compile time to ensure you don't leave any mistakes in your templates.

Scalate 1.5.2 Highlights

  • Server side compilation of CoffeeScript in the :coffeescript filter - many thanks for the patch Dag!
  • Provide a Scala 2.8.1 distribution of Scalate (version 1.5.2-scala_2.8.1) for easier Play integration and working with other Scala 2.8.x projects.
  • Minor improvements in the use of the ScalaCompiler to make it easier to support Lifty as a plugin inside SBT - thanks for the help and welcome to the team Mads
  • Fixed #260 : Scalate distro does not include all the jars required for textile support

For more detail see the Full Change Log

Feedback is always welcome!

Posted via email from

Friday 17 June 2011

CamelOne and Scala eXchange were awesome!

Its been a busy few weeks lately! 3 weeks ago we had CamelOne which was a really great conference; one of the best I've been to for a while. Great talks & conversations - loads of energy around the Apache Camel community. I'm already looking forward to the next one! We should have the various presentations from it online.

I got the chance to demo the new beta of Fuse IDE which is coming out soon; its packed with some really awesome features for working with ActiveMQ, Camel and ServiceMix. We're hard at work getting that ready...

Then yesterday I had the pleasure of giving the day 2 keynote at Scala eXchange in London. I had heaps of fun, met loads of the Scala folks I've only met online before (including Martin, finally!) & even managed to get a few laughs in my talk (mostly at JSPs expense I think :). It was a very similar conference to CamelOne in many ways; heaps of fun, loads of energy & passion around and lots of fun was had by all.

My keynote was on the Scalate template engine; there's details here or go straight to the slides or video. The samples I used in the talk are in github.