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!

 

Red Hat JBoss Fuse - RHTE Fuse and Camel 研討會習作

上個禮拜是紅帽的亞州區技術交流大會,在這個大會裡面大家會在Red Hat 的產品做技術的交流。從紅帽的企業Linux 平台,紅帽的雲端OpenStack, PaaS 平台 OpenShift,當然也有我們最愛的紅帽JBoss 中介軟體囉。 在大會的這幾天,有很多很有趣的創意用法,以及很多有趣的題目。很多紅帽的使用者,提出了很多有趣的使用方式,跟他們的經驗談。還滿有趣的,讓人受益非淺。總覺得自己是井底之蛙,看到大家超級有創意的方法,只能說,佩服佩服。

小妹剛好有榮幸講了其中的兩個題目,一個是關於利用AMQP 與 MQTT 間購物流網,這因為之前在部落格上已經寫了很多,就不多贅述。另一個就是個研討會的習作題。

這個習作如果從頭開始大概需要1.5個小時左右,

在這個習作裡,我們要先將資料從H2的資料庫裡面撈出來,放到JBoss Data Grid上,所以可以利用JBoss Data Grid 的高彈性的分散式記憶體網格暫存(Cache),讓使用者可以個快速,更有效率的取得資料。

然後我們要寫一個網頁程式,讓你有個界面可以輸入查詢的內容,然後到我們剛剛建的JDG Cache(快取) 查詢資料。與網頁的查詢是透過WebSoket 這種非同步式的通訊協定來交換資料。WebSocket 建立只要透過Fuse 的route 就可以很快速地建立Endpoint. 然後我們可以在Route上面看看在JBoss Data Grid 裡面是否有查詢到資料。我們可以用內容路由集成模式(哇咧,什麼爛翻譯,簡單來說,就是看內容決定要把資料往哪邊送的一種"系統整合Pattern") 決定要回傳什麼內容回前端頁面。

你可以在這裡把整個習作下載下來: https://github.com/weimeilin79/RHTEWorkShop
注意,文件在doc 檔案夾下.