2014年7月22日星期二

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 5

This is the last one of my getting started demo for JBoss FUSE 6.1. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

This series of videos are focused on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. In this video I am going deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application into a folder, and we will need to process the data give house an appraised value and then provide the information back to the vendors. 

First demo was to take in and process the information, and put it into a message broker,  and the second demo,  was about processing the customer data, by reading the xml file and store it into a Postgres Database. The third demo, was slightly complex, by adding value to the house by the number of surrounding schools to the house. we referenced Google App Engine (Google Geocoding API to get the co-ordinate from Address, then use Google Places API to get number of surrounding schools) and then updated the new appraised value into house table in Postgres Database.

And from last demo, we have expose an restful web service endpoint for Vendors to query the new house value and data via customer's Nation ID. 

In this demo, the project is now ready to be deployed into a Testing environment. By using the fabric8 plugin in JBoss Fuse, we are going to start up JBoss Fuse, and create a broker and container in our Fuse management console. Deploy our project onto the OSGi container in JBoss Fuse 6.1. 



In this demo, you will learn, 

Deploy your Camel Project via Fabric8 plugin 
This plugin makes it easy to create or update a fabric profile from your maven project.
When you deploy your project to a fabric profile with this plugin the following takes place:

  • uploads any artifacts into the fabric's maven repository
  • lazily creates the fabric profile or version you specify
  • adds/updates the maven project artifact into the profile configuration
  • adds any additional parent profile, bundles or features to the profile.

Create a new container in JBoss Fuse
The Fabric in JBoss Fuse makes it really easy to provision, automate, configure, and manage from a central location

There is one thing I forgot to mention in the Video,
For Fabric8 plugin to deploy the profile into your JBoss Fuse, need to edit your ~/.m2/settings.xml file to add the fabric server's user and password so that the maven plugin can login to the fabric..

e.g. add this to the <servers> element:

<server>
  <id>fabric8.upload.repo</id>
  <username>admin</username>
  <password>admin</password>
</server> 



Thanks for following this series of getting started. :)


2014年7月21日星期一

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 4

This is the 4th part of my getting started demo for JBoss FUSE 6.1. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

There will be a series of videos coming after this one, we will focus on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. And in the last video of the series I will deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application, they will place their customer input into 2 different XML files, one with it's customer data, the other with their housing details. Both files will be place into same folder either by FTP or Batch generated overnight.

First demo was to take in and process the information, first we need to separate the 2 kinds of files, because they are handled differently. And appraised the value of the house before sending it to a messaging broker.

Second demo,  was about processing the customer data, by reading the xml file and store it into a Postgres Database.

Third demo, we were added value to the house by the number of surrounding schools to the house. we referenced Google App Engine (Google Geocoding API to get the co-ordinate from Address, then use Google Places API to get number of surrounding schools) and then updated the new appraised value into   house table in Postgres Database.

In this demo, the vendors are asking for an service, that provides all the data with the updated appraised house value back to them. And they are requesting if the information can be provided through a Restful Web service. It's a piece of cake for JBoss Fuse developer to expose an service via Web Service, we simply setup and configure the endpoints. 

In this demo,  you will learn

CXFRS Endpoint

The cxfrs: component provides integration with Apache CXF for connecting to JAX-RS services hosted in CXF.

SQL Endpoint 
The sql: component allows you to work with databases using JDBC queries.



You can also find the source project in my github.
https://github.com/weimeilin79/homeloan-part3

2014年7月16日星期三

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 3

This is the 3rd part of my getting started demo for JBoss FUSE 6.1. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

There will be a series of videos coming after this one, we will focus on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. And in the last video of the series I will deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application, they will place their customer input into 2 different XML files, one with it's customer data, the other with their housing details. Both files will be place into same folder either by FTP or Batch generated overnight.

First demo was to take in and process the information, first we need to separate the 2 kinds of files, because they are handled differently. And appraised the value of the house before sending it to a messaging broker.

Second demo,  was about processing the customer data, by reading the xml file and store it into a Postgres Database.

As for this demo, we are going to do a bit more, with house data, we are going to add value to the house by the surrounding schools of the house. To do that we will need to reference Google App Engine (Google Geocoding API to get the co-ordinate from Address, then use Google Places API to get number of surrounding schools) and then update the new appraised value. Then store it into a table in Postgres Database.


In this demo,  you will learn

Endpoint reading from activemq messaging broker
The ActiveMQ component allows messages to be sent to a JMS Queue or Topic; or messages to be consumed from a JMS Queue or Topic using Apache ActiveMQ.

JAXB transformation
Translate one data format(XML) into another(Pojo) using JAXB

SQL Endpoint 
The sql: component allows you to work with databases using JDBC queries.

RecipientList Endpoint with dynamic Restful URL 
Which allows you to route messages to a number of dynamically specified recipients.

Http4 Endpoint
The http4: component provides HTTP based endpoints for calling external HTTP resources 





I hope you like it. :)

You can also find the source project in my github.
https://github.com/weimeilin79/homeloan-part2

2014年7月15日星期二

Red Hat JBoss - 紅帽舊金山技術大會上的超酷範例,讓你變成JBoss之星!

2014年的紅帽技術大會是在舊金山開的,有很多不同的超酷的課程。每年技術大會大家最期待的就是JBoss 的 Keynote 範例, 讓你可以玩遍所有的JBoss 技術,把目前最酷的技術串聯成一個範例,然後現場發表!今年也不例外,應該已經變成紅帽技術大會的一個傳統了吧。我們把這個Keynote 的範例整理成一個可以重複安裝,使用的版本。讓你可以拿來參考,甚至賣弄我們都沒關係!誰叫我們是open source! 廢話不多說,去下載來玩鱉~ 讓你體驗紅帽美國技術大會上的氣氛!

1. 到網址下載然後解壓縮
2. 請記得讀README 檔案喔!然後在installs 路徑下,放入JBoss 的產品
3. 執行 init.sh.
...
繼續依照指令安裝,然後用你的twitter 帳號,就可以啓動一個流程。 更多的東西請見Salesforce integration.

2014年7月14日星期一

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 2

This is the 2nd part of my getting started demo for JBoss FUSE 6.1. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

There will be a series of videos coming after this one, we will focus on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. And in the last video of the series I will deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application, they will place their customer input into 2 different XML files, one with it's customer data, the other with their housing details. Both files will be place into same folder either by FTP or Batch generated overnight.

First demo was to take in and process the information, first we need to separate the 2 kinds of files, because they are handled differently. And appraised the value of the house before sending it to a messaging broker.

And for this demo,  we are going to concentrate on processing the customer data, by reading the xml file and store it into a Postgres Database. There are many components in JBoss Fuse that you can choose to interact with DB. This demo uses the most simple and straight forward sql component, just like a normal sql insert in your java program, but less coding needed, isn't it fun!   
In this demo,  you will learn

Endpoint reading from activemq messaging broker
The ActiveMQ component allows messages to be sent to a JMS Queue or Topic; or messages to be consumed from a JMS Queue or Topic using Apache ActiveMQ.

JAXB transformation
Translate one data format(XML) into another(Pojo) using JAXB

SQL Endpoint 
The sql: component allows you to work with databases using JDBC queries.




You can also find the source project in my github.
https://github.com/weimeilin79/homeloan-part2

2014年7月4日星期五

Red Hat JBoss Fuse - Getting Started, Home Loan Demo Part 1

This video clip is for people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project for the first time.

There will be a series of videos coming after this one, we will focus on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. And in the last video of the series I will deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is we have a system, that takes in XML files from different vendor's home loan application, they will place their customer input into 2 different XML files, one with it's customer data, the other with their housing details. Both files will be place into same folder either by FTP or Batch generated overnight.

Our job is to take in and process the information, first we need to separate the 2 kinds of files, because they are handled differently. And appraised the value of the house before sending it to a messaging broker for further process.  



To begin, make sure you have download the JBoss Developer Studio to follow along!

In this demo, you will learn 

File Endpoint 
Which provides access to file systems, allowing files to be processed by any other Apache Camel Components or messages from other components to be saved to disk.

Content Base Routing 
from the EIP patterns allows you to route messages to the correct destination based on the contents of the message exchanges.

JAXB transformation
Translate one data format(XML) into another(Pojo) using JAXB

Set up the activemq for messaging broker. 
The ActiveMQ component allows messages to be sent to a JMS Queue or Topic; or messages to be consumed from a JMS Queue or Topic using Apache ActiveMQ.


JBoss Fuse Getting Started Home Loan Demo Part 1 from christina on Vimeo.

I hope you find it useful. :)


You can also find the source project in my github.
https://github.com/weimeilin79/homeloan-part1

2014年6月16日星期一

Red Hat JBoss Fuse - RHTE Fuse and Camel Workshop

Last week was the Red Hat's Asia Pacific Technical Exchange event. It was a series of technical sharing session across Red Hat's product, from Red Hat Enterprise Platform solutions, Red Hat Openstack, Red Hat Openshift to Red Hat JBoss Middleware solutions.
Lots of interesting topics and ideas were shared during the session, many APAC Red Hatter has come up with interesting uses cases and their experiences with the products.

I had the honor to speak in 2 of the sessions, one is about IOT with AMQP and MQTT, which I have already talked about in my blog, the other one is a workshop.

This is a 1.5 hour workshop,

In this workshop we are first going to load data from H2 database to Red Hat JBoss Data Grid, provide a faster elastic memory grid cache for user to look up. 


Then we are going to build a web application with an interface for user to lookup data from the cache we have created. The communication will be asynchronized with WebSocket protocol with Fuse Camel route. In the route, it will determine if the requested content can be found in the cache. We will use the content routing integration pattern to reply the content that we are going to reply back.
You can find the instruction and source code here: https://github.com/weimeilin79/RHTEWorkShop
Note, the instruction is under doc folder

Here is the video recorded on the day!