Skip to main content

Integration Project- Micro Services Migration Story with JBoss BPM Travel Agency - Part One

Part One - Introduction and Installation


While ago, Eric Schabell launched a project showing various interesting feature of JBoss BPM suite. It's based on a Travel agency story, Eric has made a series of video and blog to walkthrough the installation of both product and project and also shows the possible implementation of how to use rules and processes within BPM suite. This comprehensive demo covers a lot of functions, with  a bookings process for both flights and Hotel, with a payment process that included advanced features like compensation (rolling back bookings), integration of traditional web services in service tasks and a credit card fraud detection system.

We think this could be a great story to showcase how to migrate an existing project to a more modern enterprise architecture with micro-service framework, and JBoss Fuse is the perfect solution for this. As Camel has over 150 components to choose from, and webservice is one of them, and the OSGi container is so lightweight, it'll be perfect to deploy these services on.
In the Travel agency project, you will see the entire process has few external web services calls. First of all, it needs flight and hotel data from vendors. And it needs services to book both flight or hotel and needs cancellation of the booking as well.
In the old project, all these webservices are hardcoded with only one destination available, so this time we are going to create tables in a Database that hold some flight and hotel information. And since the webservices already exists from the previous project, we are going to migrate using the WSDL to do a contract-first webservice application with no sweat.

The architecture of the hotel part on the fuse side looks like this:
We will see now the hotel services are broken down into 3 sections, with a messaging broker in between to achieve asynchronize architecture.Now each service only handles one single simple job. Not only it much easier for developer to maintain without them going through a big chunk of code, because the nature in Fuse, where it is really easy and quick to spin up a container, therefore we can even deploy these services separately to make it more flexible to distribute your load and also more agile. Developer can push their code more frequently without worrying about whether it's going to affect other services.

Before we talk more detail about the project, let's take a look at how to run this demo. We have built a reusable project, so you can spin up the entire project with just few clicks. Play around with it first, so you get the know the story better, then explore all cool feature in the project.

You can find the project here: JBoss BPM Suite & JBoss Fuse Travel Agency Integration Demo
(The original web services sources can be found in the projects directory for your convenience, but are not built by default when we run the installation.)

You will need

  • JBoss EAP 6.4
  • JBoss BPM Suite 6.1 
  • JBoss Fuse 6.1.1. 

After installing JBossBPM suite, and it's project. It'll then spins up Fuse Fabric and build, deploy the application bundles with camel routes, create these profile in JBoss Fuse. Then it automatically create containers and deploys profiles on the container. Because I am trying to demonstrate microservices in the demo, so each service will be deploy on a separate container. So you will probably find 6 more processes (containers) running the camel route, and 1 container running the message broker.

CAUTION:
Because JBoss Fuse relays really heavily on maven, so if it's your first time running the script, please make sure you have reliable internet connection, as it's going to download around 130MB of dependencies. Once you got everything downloaded,it'll then take you few minutes to install the rest of the application.  The reason it needs a few minutes to install, is because the creation of Fabric, and I want to make sure the profiles are installed correctly. (See this post about the scripts)

Installation

  1. Download and unzip.
  2. Add products to installs directory.
  3. In JBoss BPM suite, run 'init.sh' or 'init.bat' file. 'init.bat' must be run with Administrative privileges.
  4. Start the JBoss BPM Suite server, login, build and deploy JBoss BPM Suite process project at http://localhost:8080/business-central (u:erics/p:bpmsuite1!).
  5. Add fabric server passwords for Maven Plugin to your ~/.m2/settings.xml file the fabric server's user and password so that the maven plugin can login to the fabric. 
    • 
      
      
      fabric8.upload.repo
      admin
      admin
      
      
      
  6. Start Fuse Server, by running 'fuse' or 'fuse.bat':
  7. Login to Fuse management console at: http://localhost:8181 (u:admin/p:admin).
  8. Under Runtime tab, you will see 6 containers, select and start them all.

Once you are up and running just build the project in JBoss BPM Suite and start the Fuse containers as the documentation describes. You can now run the process by submitting through the client web application at: http://localhost:8080/external-client-ui-form-1.0 .


On the fuse side,
if you go down to the MQ tab, you will see the broker profile of messaging queue.

Under APIs, you will see 2 webservice exposed in fabric, It'll tell you where the webservice is located and what services and functions are provide in GUI format.

To make it more interesting, go into the individual console view, this messaging queue statistic table in within the Root container under ActiveMQ Tab.


And by going to the bookingflightcon, hotelbookingcon containers, you will find the camel route diagram under it.











And the webservices route can be found under wsflightcon and wshotelcon.


You can now start playing with the demo, and have fun.
See Eric's post for more BPM side of the story!

Comments

Silke + Maurice said…
Loved your post, this confirms the ideas i am implementing right now.
Arpad said…
Hi Christina,

I cannot download the JBoss Fuse 6.1.1 on http://www.jboss.org/downloads/. And now with the delivery fuse 6.2.0 (jboss-fuse-full-6.2.0.redhat-133.zip) the demo source needs to be updated. I changed couple of files in installs and support diretories but did not manage to go further than this point :
Fuse sources are present...

BPM sources are present...

Product installer running now...

Error: Unable to access jarfile C:\dev\bpms-fuse-travel-agency-integration-demo-master\installs/
Error Occurred During Installation!

Thanks for your help.

Philippe
Jhony Bairstow said…
I guess I have selected a mind blowing and interesting blog. central asia tourism
Jason statham said…
The people not reading your blogs are missing out a lot of quality contents. quality wordpress themes

Popular posts from this blog

Red Hat JBoss Fuse/A-MQ - Fuse and A-MQ Version 6.3 GA is released!

Fuse and A-MQ 6.3 GA has just went out. Maybe, you would think this is just only a minor version release why should I care? Hold your thoughts on that! Because they have done a lot of improvements and also added many new features into this release.

Besides various bug fixes and making sure Fuse Fabric is much more stable. There are two major change in this version update:

New Tooling in JBoss Developer Studio (JBDS) 9.1 GA. Newer Apache Camel version – Camel v2.17. I was really impressed by the work put in to make developing Camel application much simpler. First is the installation of tooling itself. Now it has a all-in-one installer so you don't need to worry about which plugins you need to check. See the videos below to see the new "Getting Started" of Fuse 6.3.



And If you notice from the above video, the presentation of camel route in JBDS has also updated. It fixed some of the miss representation of logic and making it easier to read.

Old Camel Route
New Camel Route
On …

Fuse Integration Service - Setup JBDS and create first quickstart application

Before we go and start creating our first application, I want to show you how to setup your JBoss Developer Studio, create a small application from the quickstart example and then running it on Fuse Integration Service.

I am using JBoss Developer Studio version 9, you can find it here.
After download the

jboss-devstudio-9.0.0.GA-installer-eap.jar
double-click it, and start installing with default values.

After successful installation, we will need install the plugins for Fuse, on JBoss Central view, select software update, select enable early access.


And select JBoss Fuse Development for the plugin,


Click on install, and we are all set to go!

First thing first, we want to create a Fuse project to deploy on the base of Fuse Integration Service, which is OpenShift. If you have not installed it, please go back to my previous post for instructions. So on your JBDS, right click and start creating the project. Select new, maven project, if you have installed the plugin correctly, you should …

Red Hat JBoss Fuse - Getting Started with Fuse Integration Service 2.0 Tech preview

I just realized that I did not do a getting started for Fuse Integration Service 2.0 Tech preview before I did the pipeline demo, thanks for those of you who reminded me! :)

To get started with FIS 2.0, for people who has just getting to know the technology, here is how I interpret it. Basically, it's divide into two aspect,

1. Integration development, FIS uses Apache Camel as the core technology that creates, orchestrate, compose microservices into a super lightweight thin integration layer, and become the API provider and service orchestrator through exposing RESTful or messaging service endpoints. And you can choose to either package and run it with Spring-Boot or Karaf.


2. Application Deployment and Management, FIS takes advantages of OpenShift platform, and allows you to separately deploy the micro-integration service among distributed environment, at the same time takes care of the failover, high availability, load balancing and service lookup problem for you.


So, now we know …