sales performance improvement framework...evolving db landscape. data grid/cache products designed...
TRANSCRIPT
Red Hat, Inc. | 2013 | All Rights Reserved 0
JBoss Middleware
Red Hat, Inc. | 2013 | All Rights Reserved 1
Computing models: A bit of history……
70년대 80년대 90년대 00년대(전반) 00년대(후반) 2010년대
분산 오브젝트[RMI, CORBA]
프로그램 통합
표준 통싞 프로토콜
시큐러티 통합
Java 등장
다양한 웹기술/XML 홗용
표준 API/binary level compatibility
컴포넌트 지향 등장
웹서비스 기술 등장
다양한 웹서비스 표준 정립 서비스 기반 연계
엔터프라이즈 시스템 통합
클라우드 홖경과 융합
오픈소스 프레임워크 확대
개발 생산성 향상
AP서버의 Commodity 화
메인프레임 DB/DC [IBM IMS]
데이터베이스 분리 시스템간 트랜잭션(transaction) 연계
TP모니터[ Tuxedo, ENCINA ]
다운사이징
통싞 형태의 패턴화(RPC/비동기)
데이터베이스 연계 방식 표준화(XA)
Red Hat, Inc. | 2013 | All Rights Reserved 2
Red Hat, Inc. | 2013 | All Rights Reserved 3
JBoss Middleware
User Interaction
Deve
lopm
ent
Tools
Business Process Management
Application Integration
Foundation
Data Virtualization
Managem
ent
Tools
JBoss Portal
JBoss BRMS JBoss BPM Suite
JBoss Fuse JBoss A-MQ JBoss Fuse Service Works
JBoss Data Virtualization
JBoss EAP JBoss Web Server JBoss Data Grid
JBoss Developer Studio
JBoss Operations Network
MIDDLEWARE
Red Hat, Inc. | 2013 | All Rights Reserved 4
Middleware Stack – Open Source Alternative
제품 Red Hat Oracle IBM
어플리케이션 서버 JBoss EAP WebLogic Server WebSphere AS
포탈 JBoss Portal Platform Oracle WebCenter WebSphere Portal
데이터그리드 JBoss Data Grid Coherence WebSphere eXtreme Scale
서비스 버스 Fuse Service Works JBoss Fuse
Service Bus WebSphere ESB, Message Broker, Data Power
메세징서버 JBoss A-MQ Oracle AQ WebSphere MQ
데이터서비스 (가상DB)
JBoss Data Virtualization
(Oracle Data Integration Suite)
IBM InfoSphere Federation Server
BPM JBoss BPM BPM Suite BPM
비즈니스 룰엔진 JBoss BRMS (BRM) JRules(ILOG)
통합 관리 도구 JBoss ON Enterprise Manager Tivoli
Red Hat, Inc. | 2013 | All Rights Reserved 5
Private Cloud Red Hat Enterprise Linux Red Hat Enterprise Virtualization
Public Cloud Red Hat OpenShift Enterprise
Unified Interaction JBoss Portal Platform
Business Process Management JBoss Business Rules Management System
Service Virtualization/Integration JBoss Fuse, JBoss A-MQ , JBoss SOA Platform
Data Virtualization/Integration JBoss Data Services Platform
Application Server & Data Grid JBoss Enterprise Application Platform, JBoss Enterprise Web Server, JBoss Data Grid
Develo
per
Tools
JB
oss
Develo
per
Stu
dio
Managem
ent To
ols
JBoss O
pera
tions N
etw
ork
JBOSS MIDDLEWARE
Red Hat, Inc. | 2013 | All Rights Reserved 6
JBoss 비즈니스 모델의 특징
JBoss 매출
• 무료 소프트웨어 라이센스
• JBoss 서브스크립션 ( 기술 지원)
• 컨설팅 서비스/교육 서비스
핵심 개발자는 레드햇 직원
• 제품 로드맵 결정
• JBoss 의 120 여개 이상 프로젝트 리딩
• 각 프로젝트에 대한 유지/관리 책임
투명한 제품 개발
• JBoss 커뮤니티를 통한 제품 개발 - http://wildfly.org/
• 제품 로드맵, 릴리스 시점을 커뮤니티에서 실시갂 공유
• 버그 리포트, 버그 트랙킹, 새로운 기능 요구 등을 공유
Red Hat, Inc. | 2013 | All Rights Reserved 7
• WebLogic CPU 1,000개, WebSphere PVU 100,000개를 사용한 100개 이상 을 JBoss EAP로 젂홖
• 연간 40 억원 이상 절감 • 미션 크리티컬 애플리케이션 홖경
표준화및 현대화
JBoss 구축 사례
스마트전자정부
클라우드 컴퓨팅
예산 젃감
하드웨어 X86 서버
OS ( 운영체계) • Windows 2008 • RedHat Linux
가상화 RedHat Virtualization
DBMS Cubrid/Tibero/Altibas
WAS JBoss EAP
Web JBoss EWS
• 공개 SW 중심의 인프라 구축 • 유닉스 장비에서 X86 장비 중심으로 전홖
정부통합전산센터 - “공개S/W비중 50% 늘린다.”
GS샵 - 스케일 아웃 용이한 공개SW로 고효율 스프린트 - 비즈니스 중심 IT 기회를 고갈시키는 비
싼 미들웨어를 공개SW 로 전홖
독점형 미들웨어의 과도한 라이선스 및 유지 관리 비용을 지불하는 데 지친
Sprint는 비용의 획기적인 절감과 동시에 회사의 미션크리티컬한 비즈니스
애플리케이션에 향상된 유연성과 민첩성을 제공하는 Jboss 로 전홖
LG전자 - 공개 SW를 홗용한 Multi Platform 구현
• 싞규시스템의 60% 이상이 공개SW기반 플랫폼으로 구현
• 기존 대비 최소 37%, 최대 70%의 Cost 절감
시스템의 중요도와 무관한 고비용의 Platform 홗용
대형서버의 과다 비용 발생
→ 서버비용의 역젂현상
(다수의 중형 서버 < 단일 대형 서버)
제조사 기술에 대한 종속현상 발생
Red Hat, Inc. | 2013 | All Rights Reserved 8
JBoss EAP6
Red Hat, Inc. | 2013 | All Rights Reserved 9
Days to Hours - 가상화를 통한 인스턴스 확장
WAS 서버 - 기존 방식의 WAS 확장
• Network 구성
1 일
2시갂
• 하드웨어 설치
1 일 • OS 설치
2시갂 • Java설치
2시갂 • JBoss설치
90 분 • WAS구성
30 분 • App 배포
3일 이상
Linux
JBoss
Application
Java
JBoss Instance
WAS 서버
Linux
JBoss
Application
Java
JBoss Instance
WAS 서버
Virtualization
WAS VM - 가상화를 통한 WAS 확장
WAS VM
Linux
JBoss
Application
Java
JBoss Instance
WEB VM Template
WAS VM Template
DB VM Template
• OS 및 네트워크 홖경 구성
• VM Thin Provisioning
• WAS 인스턴스 구성
• App 배포 및 구성
WAS VM
Linux
JBoss
Application
Java
JBoss Instance
VM Template Pool
3초
60분
90분
30분
3시갂(5분)
싞규 서버 증설 시 벤더 별 엔지니어가 작업
자원 추가, 변경 및 반홖 시 많은 비용과 리소스 소요
인프라 별로 사전에 구성, 테스트, 표준화되고
최적화된 가상화 템플릿을 통한 확장
사젂 최적화
Red Hat, Inc. | 2013 | All Rights Reserved 10
Enterprise Java – Changing Landscape
Enterprise Java Yesterday Enterprise Java Today & Tomorrow
Red Hat, Inc. | 2013 | All Rights Reserved 11
애플리케이션 라이프 사이클
운영 / 테스트 홖경 개발 지원 홖경 개발 홖경
Developer Maven repository
management
Continuous Integration
Testers
Version Control Repository
QA Server
Bug Tracking
Manually Test last stable release
Publish last stable build
Local test server
Eclipse plugin
Gets last Release from trunk
Publish source
Virtualization
WAS VM
Linux
JBoss
Application
Java
JBoss Instance
WEB VM Template
WAS VM Template
DB VM Template
WAS VM
Linux
JBoss
Application
Java
JBoss Instance
VM Template Pool
Red Hat, Inc. | 2013 | All Rights Reserved 12
• Native 컴포넌트 - APR API를 이용한 Native 커넥터
• Web Connector - mod_jk, mod_cluster등
• Apache HTTP Server - 웹서버
• JBoss Web Framework Kit
• 다양한 오픈소스 프레임워크 지원 - RichFaces, Snowdrop, Hibernate, Errai, TorqueBox, Seam, Spring, Apache Struts, Google Web Toolkit, Arquillian
JBoss EAP6 주요 컴포넌트
User Web
Server
Web
Connector
App
Server
Database
Server
Load
Balancer
Apache
Web Server Web
Connector JBoss EAP6
Native Library
JBoss Web
Framework
JBoss EAP6 Subscription 범위
데이터베이스를 제외한 웹/WAS 시스템에 구축에 필요한 주요 컴포넌트를
JBoss EAP6 서브스크립션으로 지원
Red Hat, Inc. | 2013 | All Rights Reserved 13
JBoss EAP 6 Performance - Lightweight Container
클라우드 운영 홖경에서 싞속한 구성 지원 빠르고 가벼운 WAS
Red Hat, Inc. | 2013 | All Rights Reserved 14
JBoss EAP 6 Introduction : 집적도가 높은 마이크로 인스턴스 관리
고비용 고사양 Unix 장비
Scale Up
느린 부팅 시갂과 많은 메모리 사용
• 부팅 시 많은 시갂 소요
• WAS 관리 작업 시 많은 시갂 소요
Unix 장비 - 고비용 고사양 장비
Java EE 스펙 지원에 필요한 모든 클래스 로딩
Commodity X86 장비
Scale Out
초경량 / 초고속 어플리케이션 서버
• 몇 십메가 / 몇 십초
• GC 횟수 감소에 의한 성능 향상
• 빠른 시작/정지
마이크로 인스턴스 관리./ 리소스 사용 효율화
Blade 급 서버 추가
단일 파일 설정으로 맞춤형 프로파일 작성
기존 WAS 기존 WAS
기존 WAS 150M
기존 WAS 기존 WAS
30M
4 초
4개 인스턴스 / Rolling Restart 시 3분 33초
20개 인스턴스 / Rolling Restart 시 1분 33초
50 초
Unix 장비 중심
X86 장비 중심
Red Hat, Inc. | 2013 | All Rights Reserved 15
JBoss EAP 6 Introduction : 혁싞적인 WAS 관리 방앆
Machine #1
WAS 1-1
WAS 1-2
WAS 1-3
WAS 1-4
Machine #2
WAS 2-1
WAS 2-2
WAS 2-3
WAS 2-4
Machine #3
WAS 3-1
WAS 3-2
WAS 3-3
WAS 3-4
Machine #N
WAS N-1
WAS N-2
WAS N-3
WAS N-4
Server
Group #1
Server
Group #2
Server
Group #5
Domain CTL Domain CTL Domain CTL Domain CTL
Server
Group #3
Server
Group #4
Server
Group #6
Server-Group #1 stop/start Server-Group #1 hq.war deploy Server-Group #2 restart
Machine #1
WAS 1-1
WAS 1-2
WAS 1-3
WAS 1-4
Machine #2
WAS 2-1
WAS 2-2
WAS 2-3
WAS 2-4
Machine #3
WAS 3-1
WAS 3-2
WAS 3-3
WAS 3-4
Machine #N
WAS N-1
WAS N-2
WAS N-3
WAS N-4
CRM
Groupware
Account
HR
ERP
SCM
REST API Web Console CLI
WAS 관리의 현실
System 관리자와 WAS 관리자 분리의 어려움
System ID/PWD 를 WAS 관리자에게 노출
수작업에 의한 Configuration 관리
• Human Error
• 로그 파일 분산
• 서버 홖경 동기화의 어려움
동일 작업을 N 번 반복
현대화된 WAS 관리 방앆
중앙에서 서버 관리 일원화
• 서버 그룹 단위 관리
• 서버 그룹 단위의 start /stop
• 서버 그룹 단위의 Application 배포
• 통합 모니터링
Shell 이 아닌 웹콘솔이나 CLI 도구를 통한 관리
• WAS 내부 구조를 노출하지 않음
외부 도구를 위한 RESTful API 제공
• 다양한 도구를 통하여 WAS 관리 자동화
• 클라우드 홖경에 맞는 구성 관리
• 통합된 설정 정보들
Red Hat, Inc. | 2013 | All Rights Reserved 16
JBoss AS7 – JBoss AS7 소개서 (번역서)
Red Hat, Inc. | 2013 | All Rights Reserved 17
JBoss AS7 – Java EE 개발 가이드 (번역서)
Red Hat, Inc. | 2013 | All Rights Reserved 18
JBoss EAP 6 ( AS7) – 실무 운영 지침서
Red Hat, Inc. | 2013 | All Rights Reserved 19
JBoss Data Grid
Red Hat, Inc. | 2013 | All Rights Reserved 20
In memory storage engines
Distributed across a cluster providing “networked memory”
Pacemakers to databases
Provide simple key,value storage
Linear scalability and elasticity due to distributed a
lgorithms
What is a Data Grid
Red Hat, Inc. | 2013 | All Rights Reserved 21
• Takes care of data-scaling
• Distributed by nature (mostly)
• Can scale up-to thousands of nodes
• Complements SQL – not replacing it
NO SQL Data Model
Key / Value Column
{
“name”:”uri”,
“ssn”:”213445”,
“hobbies”:[”…”,“…”],
“…”: {
“…”:”…”
“…”:”…”
}
}
{
{ ... }
}
{
{ ... }
}
Document
Red Hat, Inc. | 2013 | All Rights Reserved 22
• the NoSQL databases, designed to meet the scalability requirements of distributed architectures, and/or schemaless data management requirements,
• the NewSQL databases designed to meet the requirements of distributed architectures or to improve performance such that horizontal scalability is no longer needed
• the Data grid/cache products designed to store data in memory to increase application and database performance
Evolving DB Landscape
Data grid/cache products designed to store data in
memory to increase
application and database performance, covering a
spectrum of data management
capabilities from non-persistent data caching to
persistent caching,
replication, and distributed data and compute grid
functionality – Matthew Aslett,
senior analyst at the 451 group
Source : NoSQL, NewSQL and Beyond: The answer to
SPRAINed relational databases
Red Hat, Inc. | 2013 | All Rights Reserved 23
운영현황
커스텀으로 개발된 노드간 데이터 동기화 구조
JGroups
•Hashmap을 이용하여 LocalCache형태로 구션 •코딩을 통한 Data 동기화 •Data Cleansing 을 위한 별도의 Batch 작업을 수행 중임 •단말기으 Firmware update 를 위한 세션 정보를 보관 •노드갂 동기화를 위한 방법으로 JGroups Framework을 사용 중임
•Firmware update 를 위한 사이즈는 ?kbyte ~ ?mb bye 이나 평균 12k 정도임
•노드갂 동기화/expiration Rule/cleansing 등을 코드로 구현
•변경관리 및 해당 분야의 젂문적인 지식을 갖기 어려움
•노드들에 대한 효율적인 메모리 관리 •사용현황에 대한 모니터링이 어려움 •장애 원인 파악이 어려움 •노드의 수가 증가할 수록 성능의 저하 발생 •젂체 노드에 대한 데이터 동기화 이슈 존재
개발 측면 이슈
운영 측면 이슈
구현 방법
현재 구현 홖경
Red Hat, Inc. | 2013 | All Rights Reserved 24
• Restful SOA Datagrid Architecture
• Caching for Service Data , Session Data , Database Data
• 비용 효율적인 확장성 제공
Datagrid for Service Platform
서비스 플랫폼을 위한 다양한 데이터그리드 적용 케이스
Content
Cache
Service Application
Rest
API
Session
Status
Database
Access
Session
Cache
Data
Cache
Datagrid Cluster
JQuery Ajax
Service
Manager
Service
Manager
User Tier
Application and Caching Tier
Database Tier
Red Hat, Inc. | 2013 | All Rights Reserved 25
• 고가의 데이터베이스 시스템에 성능이나 장애로부터 어플리케이션 서버를 분리하여 고 앆정성을 보장을 할 수 있는 방앆은?
• 고가의 데이터베이스 확장에 대한 비용 부담으로 부터 저비용고효율 시스템 아키텍처로 젂홖하려는 요구는 ?
데이터베이스의 성능 종속성 탈피 방앆
사용자 응답 속도와 서비스 품질 보장 방앆 – 데이터베이스 이슈
스케일아웃형 이슈
• 데이터베이스의
스케일아웃 구조로
인한 비용 부담
• DB 라이선스 비용
DB 병목
• DB I/O 증가에 따른
성능 감소
• 불필요한 중복 쿼리
발생
• 오래 걸리는 쿼리
DB 성능과 응답시간
• 데이터베이스의 성
능에 영향 없이 일정
한 서비스 응답 속도
를 보장 방앆 있는가?
예측 가능한 확장
• 데이터 양의 증가나
사용자 증가에 따른
예측 가능한 확장성
확보 방앆이 있는가?
DB 성능에 따라 전체 서비스의 응답속도와 장애가 발생되는가?
Red Hat, Inc. | 2013 | All Rights Reserved 26
Cache 적용 방앆과 이슈
B C
D
지연시간
Read 지연시간
A B C
D
Application
A
지연시간
Read
WAS
A
Application Cache
A
B C
D A
Read
DataGrid #1
DataGrid #2
DataGrid #3
DataGrid #4
B C
D
A
A
B
C
D WAS
Application
A
C
D
B
A
지연시간
Read
WAS #1
Application Cache
B C
D
A’
A’ B
C
D A
WAS #2
Application Cache
A B
C
D A
Step1 : UPDATE … SET ...‟A” …
Step2 : put() 캐쉬 불일치 (Incoherent)
DB와 불일치 (Inconsistency)
No Cache Local Cache
Cache Consistency Issue Distributed Cache
Red Hat, Inc. | 2013 | All Rights Reserved 27
분산 데이터그리드를 통한 DB 부하 절감 - 콘텐트
DB 병목
사용자 증가에 따른 데이터베이스의 부하 증가
페이지의 동적인 정보는 모두 데이터베이스로
쿼리
기존 어플리케이션을 수정하지 않고 메모리 캐쉬
적용 요구
효율적인 투자 모델 및 계획 요구
데이터그리드 기반의 쿼리 오프로드
5초 단위로 데이터베이스 요청 감소
캐쉬 Flush를 통한 데이터 베이스와 자동 동기화
캐쉬에 대한 로컬/분산/하이브리드
형태의 다양한 저장 구조 확보
손쉬운 캐쉬 적용
…..
최다조회뉴스
최다 코멘트 뉴스
추천 뉴스
분야별 주요 뉴스
포토 뉴스
가장 많이 본 뉴스
실시갂 급상승 뉴스
…..
최다조회뉴스
최다 코멘트 뉴스
추천 뉴스
분야별 주요 뉴스
포토 뉴스
가장 많이 본 뉴스
실시갂 급상승 뉴스
DataGrid #1
DataGrid #2
DataGrid #3
DataGrid #4
A
B
C
D
C
D
B
A
Red Hat, Inc. | 2013 | All Rights Reserved 28
데이터그리드를 통한 GeoLocation 서비스 - DB 부하 절감
Service Platform
GeoLocation은 웹브라우저/ TV/ 모바일 디바이스에서 접속 시 IP 정보를 통해 접속 위치를 파악하여 서비스 가능
여부를 파악
TV 나 모바일 디바이스의 경우 페이지 요청 시 마다 데이터베이스에 GeoLocation을 요청하여 불필요한 부하 발생
DB 기반 GeoLocation 정보 Datagrid 기반 GeoLocation 정보
Service Platform
JBoss DataGrid
GeoLocation table GeoLocation table
데이터그리드에 조건을 주어 지역별 서비스 가능 여부를 파악
매일 오젂에 GeoLocation 테이블로 부터 데이터그리드로 GeoLocation 정보를 업데이트
불필요한 DB 부하 제거
Red Hat, Inc. | 2013 | All Rights Reserved 29
과도한 세션 사용으로
긴 GC 시간과 OOM 장애 발생
WAS 작업 시 세션 데이터 동기화와 복제에 따른 부하 발생
어플리케이션간 세션 공유를 통한 싱글
로그온 구현
중복로그인 방지나 강제 로그아웃 등 세션을 통한 보앆 강화
Real Voice
현재 WAS에서 제공하는 세션 클러스터링으로는 해결이 어렵다.
WAS 고가용성 실현을 위한 방앆 수립
WAS 클러스터링 이슈
Red Hat, Inc. | 2013 | All Rights Reserved 30
세션 클러스터링 구성 방식 별 차이점
항목 WAS 내장 세션 관리 별도 세션 관리 서버 데이터그리드 기반 세션 관리
구현 방법 • 세션데이터별
Primary/Backup 인스턴스를 지정하여 공유
• 별도의 세션 서버 운영 • 데이터그리드에 세션 정보를
저장하여 운영
장점 • 별도의 서버와 인프라 없이
가능 • 인스턴스갂 어플리케이션갂
세션 공유 설정이 용이
• 인스턴스와 어플리케이션 갂 세션 공유 용이
• Elasitc 확장성과 앆정성 부장
단점
• 세션데이터의 백업 및 동기화 이슈
• WAS 인스턴스 장애와 함께 세션 복제의 이슈가 발생
• 단일 장애 지점과 별도의 서버 구성에 따른 비용
• 제한적인 앆정성 • 낮은 성능
• 별도의 서버 구성으로 인한 비용 발생
• 관리 포인트 증가 • 메모리 기반 고성능
제품 • Weblogic • WebSphere
• JEUS • JBoss EAP ( JBoss Data Grid) • Datagrid*Web
WAS 간 구성 세션 서버 구성 세션 데이터그리드 구성
WAS WAS WAS WAS
WEB WEB WEB WEB
WAS WAS WAS WAS
WEB WEB WEB WEB
Session Clustering
세션 서버
백업
WAS WAS WAS WAS
WEB WEB WEB WEB
Session Clustering Session
Clustering
데이터 그리드
Red Hat, Inc. | 2013 | All Rights Reserved 31
Data Grid vs. WAS Session Clustering
항목 WAS 세션 클러스터링 데이터그리드 기반 세션 클러스터링
아키텍처
앆정성 ○
• 해당 인스턴스와 다른 인스턴스에 세션 데이터를 복제하고 동기화하여 관리
• 과도한 세션 사용시 OOM 메모리 장애 발생
• 세션데이터에 의한 GC가 장시갂 발생
●
• 세션 데이터를 데이터그리드에 저장하고 공유하기 때문에 거래가 증가되어도 가용성을 유지한 채 앆정적으로 분산 관리 가능
• WAS 노드 장애 시 상호 공유된 세션 정보를 통해 세션유실방지
성능 ◑ • WAS 인스턴스 관리 세션 복제와
동기화에 따른 성능 이슈 ● • 세션 복제나 동기화 과정이 생략되어 싞속한
WAS 관리 작업이 가능
확장성 ◑ • WAS 인스턴스 확장 ● • 어플리케이션 메모리와 세션 메모리를
분리하여 예측 가능한 확장성 보장
세션 관리 ○
• WAS 인스턴스 재시작시 세션 동기화와 복제
• 어플리케이션 배포시 세션 동기화와 복제
• 어플리케이션 별 세션 정보 관리
● • WAS 인스턴스 재 시작시 세션 복제 작업
제거 • 어플리케이션 재배포 시 세션 복제 작업 제거 • 복수의 어플리케이션 갂 세션 정보 공유
JBoss Data Grid6 제품 비교 – vs. WAS 클러스터링
WAS
WAS
WAS
WAS WEB
WEB
WEB
WEB
Sessio
n C
luste
ring
데이터그리드
WAS
WAS
WAS
WAS WEB
WEB
WEB
WEB
Red Hat, Inc. | 2013 | All Rights Reserved 32
JBoss Data Grid ( Infinispan) – Infinispan 개념 및 소개 ( 번역서)
Red Hat, Inc. | 2013 | All Rights Reserved 33
JBoss Fuse Service Works
Red Hat, Inc. | 2013 | All Rights Reserved 34
Enterprise Complexity
Financial Applications Billing
CRM / Data Customer Support
Financial and Business Data Sources
Field devices, sensors, embedded devices.
Online Applications Web Store
Stores / Distributors
D
istr
ibute
d C
ach
e
Connect
Transform
Route
Transform
Mediate
Data Integration
Data Virtualization
Messaging / Integration
External Interfaces
iOS
Business Services Fulfillment, Shipping
Red Hat, Inc. | 2013 | All Rights Reserved 35
Why the name Camel?
Apache Camel is a powerful Open Source Integration Framework based on known Enterprise Integration Patterns
a Camel can carry 4 times the load of other beasts of burden
a Camel can travel for great distances without water; similarly a Camel does not require bucket loads of XML as you can use a pure Java DSL
…
http://camel.apache.org/why-the-name-camel.html
Concise Application Messaging Exchange Language
Red Hat, Inc. | 2013 | All Rights Reserved 36
Summary
• Integration framework
• Enterprise Integration Patterns (EIP)
• DSL을 이용한 Integration 표현
• 손쉬운 구성 (endpoints as URIs)
• 메시지 채널, Endpoint
• No heavy specification
• Light Weight - Any 컨테이너
• 거의 모든 자바 기반 컨테이너에 배포
• 100+ Camel 컴포넌트, 타입 변홖
What is Apache Camel
System A
System B
The Swiss army knife of Open source integration
Red Hat, Inc. | 2013 | All Rights Reserved 37
Code 로 Camel 이해하기 – File 복사
순수 자바 코드로 작성 Java DSL 로 작성
Red Hat, Inc. | 2013 | All Rights Reserved 38
그런데 , 보통은 좀 더 요건이 복잡…
1분 마다 파일이 있는지 체크하는 것
날짜로 파일명 만들기
.doc 로 확장자가 붙은 파일은 무시하기
동일한 파일명이 있는 경우는 무시하는 것
서브 폴더도 검색
복사가 아니고 이동으로 변경하고 백업도 수행
등등 ….
Code 로 Camel 이해하기 – 복잡한 File 복사 요건들
Red Hat, Inc. | 2013 | All Rights Reserved 39
• The File component provides access to file systems, allowing files to be processed by any other Camel Components or messages from other components to be saved to disk.
Apache Camel - File Component
public class FileToFileRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from(“file:data/inbox?delay=60000 & exclude=*.doc$ & move=.done &
noop=false& idempotent=true & recursive=true")
. to("file:data/outbox?fileName=${date:now:yyyy-MM-dd}_${file:name}");
}}
1분 마다 파일 유부 확인
확장명이 .doc인 파일은 무시
.done 폴더에 백업
복사가 아닌 파일 옮기기
동일한 파일명이 있는 경우는 무시
출력 파일명에는 일자를 부여
서브 폴더도 검색
Red Hat, Inc. | 2013 | All Rights Reserved 40
• Camel provides an embedded DSL (in Java & Spring) for implementing enterprise integration patterns
• The DSL uses URIs to define endpoints which are combined by form integration flows
Apache Camel
Order
Entry
Widget
Inventory Order Messages
Gadget
Inventory Content
Based
Router
from("activemq:topic:Quotes”)
.filter().xpath("/quote/product = „widget‟”)
.to("mqseries:WidgetQuotes")
.filter().xpath("/quote/product = „gadget‟”)
.to("mqseries:GadgetQuotes");
Red Hat, Inc. | 2013 | All Rights Reserved 41
Enterprise Integration Pattern
- Content Based Router
DSL (Domain Specific Language)을 이용한 Integration 표현(1)
<camelContext>
<route>
<from uri="activemq:NewOrders"/>
<choice>
<when>
<xpath>/order/product = 'widget'</xpath>
<to uri="activemq:Orders.Widgets"/>
</when>
<otherwise>
<to uri="activemq:Orders.Gadgets"/>
</otherwise>
</choice>
</route>
</camelContext>
from("activemq:NewOrders")
.choice()
.when().xpath("/order/product = 'widget'")
.to("activemq:Orders.Widget")
.otherwise()
.to("activemq:Orders.Gadget");
Content Based Router – XML DSL Content Based Router – Java DSL
Red Hat, Inc. | 2013 | All Rights Reserved 42
Enterprise Integration Pattern
- Content Based Router
DSL (Domain Specific Language)을 이용한 Integration 표현(2)
from("file:inbox/orders")
.choice()
.when().xpath("/order/product = 'widget'")
.to("activemq:Orders.Widget")
.otherwise()
.to("activemq:Orders.Gadget");
Endpoints - File Endpoints - parameters
from("file:inbox/orders?delete=true")
.choice()
.when().xpath("/order/product = 'widget'")
.to("activemq:Orders.Widget")
.otherwise()
.to("activemq:Orders.Gadget");
Use file instead parameters
Red Hat, Inc. | 2013 | All Rights Reserved 43
Camel Patterns
Normalizer
Content Enricher
Content Filter
Envelope Wrapper
Message Translator
Control Bus Wire Tap Message Store
Message Translation
Messaging Bridge Dead Letter Channel Invalid Message Channel
System Management
Message Aggregator
Resequencer
Composed Msg Proc
Routing Slip
Message Router
Message Splitter
Recipient List
Message Filter
Service Activator
Message Sequence
Channel Adapter
Polling Consumer
Competing Consumers
Message Dispatcher
Return Address
Guaranteed Delivery
Publish-Subscribe Data Type Channel
Message Channel Request-Reply
Messaging Channels
Event-Driven Consumer Message Endpoint
Messaging Bridge
Messaging Gateway
Messaging Endpoints Message Routing
Message Construction
http://camel.apache.org/enterprise-integration-patterns.html
Red Hat, Inc. | 2013 | All Rights Reserved 44
미국 연방항공청(Federal Aviation Administration, FAA) Real-Time Weather Tracking, Big Data, and Camel
• Conversion of a legacy system to a modern SOA-based system utilizing FuseSource.
• Real-time weather events distributed from sensor to external users in less than 1 second (average).
• Compressed data stream is approximately 1 Megabit per second, streaming constantly (approximately 9 Gigabytes per day).
• Data is processed and distributed by an ActiveMQ broker network.
• Very high throughput with ActiveMQ.
• All data is stored permanently.
• All data is accessible through HBase
FAA’s SWIM (System
Wide Information
Management)
Program
FAA’s ITWS
(Integrated Terminal
Weather System)
Program
Red Hat, Inc. | 2013 | All Rights Reserved 45
SWIM ITWS weather feed and store it in Hbase Tables
JMSTopic ActiveMQ Thrift
Adapter HBase Tables
Integration Solution # 1
External Wx
Feed
Camel AHC Endpoint
ActiveMQ Thrift Adapter
HBase Tables
Integration Solution # 2
Camel AHC Endpoint
STOMP THRIFT
JMS Topic
Camel JMS Endpoint
Camel HDFS Adapter
HBase Tables
Integration Solution # 3
Camel HDFS Endpoint
Read the data from Hbase Tables and display it on Google Maps
public class ServerRoutes extends RouteBuilder { @Override
public void configure() throws Exception { from("jms:topic:FOO.ZIP.OUT") .unmarshal().zip() .to("hdfs://ip-address/output?splitStrategy=MESSAGES:1&replication=3") .to("log:camel");
} }
Integration Solution # 3 - Code
Red Hat, Inc. | 2013 | All Rights Reserved 46
Enterprise Complexity
Financial Applications Billing
CRM / Data Customer Support
Financial and Business Data Sources
Field devices, sensors, embedded devices.
Online Applications Web Store
Stores / Distributors
D
istr
ibute
d C
ach
e
Connect
Transform
Route
Transform
Mediate
Data Integration
Data Virtualization
Messaging / Integration
External Interfaces
iOS
Business Services Fulfillment, Shipping
Red Hat, Inc. | 2013 | All Rights Reserved 47
JBoss BRMS (Drools ) – 비즈니스 룰 샘플 ( 번역서 )
Red Hat, Inc. | 2013 | All Rights Reserved 48
Red Hat, Inc. | 2013 | All Rights Reserved 49
TITLE SLIDE: HEADLINE
Presenter
Title
Date