Showing posts with label hawtio. Show all posts
Showing posts with label hawtio. Show all posts

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...

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!

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?