31
A SMALL RIDE WITH CAMEL Sunitha Raghurajan

Riding with camel

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Riding with camel

A SMALL RIDE WITH CAMELSunitha Raghurajan

Page 2: Riding with camel

WHAT IS APACHE CAMEL

Apache Camel is a powerful Open Source Integration Framework based on known Enterprise Integration Patterns

http://camel.apache.org

Page 3: Riding with camel

INTEGRATION PATTERNS

 A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design

Patterns don’t desribe a problem, and don’t describe how to solve it-they tell you what to do to solve it (Ref:Enterprise Integration Pattern)

Page 4: Riding with camel

WHY THE NAME CAMEL

Concise Application Messaging Exchange Language

http://camel.apache.org/why-the-name-camel.html

Page 5: Riding with camel

WHO ARE CAMEL’S PARENTS

Page 6: Riding with camel

WHAT IS APACHE SERVICE MIX

Lightweight Open Source ESB and SOA Container

Built on JBI Specification

Supports OSGi

Can run as a standalone ESB provider or as a service within another ESB

Page 7: Riding with camel

ESB

Platform

Architecture Component

Product

Page 8: Riding with camel

ESB

Simplifies Integration and flexible reuse of business components using Service Oriented Architecture

Glue that holds the compound application together

Page 9: Riding with camel

WHAT IS ESB

http://i.msdn.microsoft.com/Cc487894.bddfbe7f-6ee2-4072-91f1-402c87ee92ad(en-us,MSDN.10).png

Page 10: Riding with camel

ESB ARCHITECTURE ESB Delivers messages from one point to another

Bus architecture uses a central messaging backbone (bus) for message propagation.

Applications would publish messages to bus using adapters.

These messages would flow to subscribing applications using message bus.

Subscribing applications will have adapters which would take message from bus and transform

the message into a format required for the application.

Page 11: Riding with camel

BUS ARCHITECTURE

Messaging Backbone

App AAdapter

App BAdapter B

App CAdapter C

Adapter KApp K

Adapter GApp G

Adapter ZApp Z

Page 12: Riding with camel

ESB ARCHITECTURE

Page 13: Riding with camel

WHAT IS SOA

Service-Oriented Architecture (SOA) is an architectural style.

Applications built using an SOA style deliver functionality as services that can be used or reused on a network.

Each service would achieve a predefined business objective and perform discrete units of work.

The services are independent and do not depend on the context or state of the other services. They work within distributed systems architecture

Page 14: Riding with camel

WHAT IS A SERVICE

A service is a reusable component that can be used as a building block to form larger, more complex business-application functionality.

A service may be as simple as “get me some person data,” or as complex as “process a disbursement.”

Page 15: Riding with camel

WHY MESSAGING

Asynchronous operation − Send and Forget Approach

− Sender doesn’t have to wait for the receiver to receive and process the message

Variable Timing

Disconnected Operation

Loose Coupling− Systems connected via messaging need not be

aware of each other, or use the same technologies

− Key messages can easily be routed to many systems Message broker is buffer in case of downtime

Page 16: Riding with camel

WHY MESSAGING

Remote Communication

Platform/Language Integration communicate different systems running

different platforms, using different languages

Page 17: Riding with camel

WHY MESSAGING

Parallelize Work − Messages in a single stream can be

handled in parallel by many client threads or systems

Throttle Work − A large amount of work can be split

across a small number of threads or systems to throttle effort

Page 18: Riding with camel

MESSAGING CONCEPTS

Each message is sent to a particular named “destination” (a topic or queue) Each message to a queue is processed by exactly one consumer Typically, one of many connected

consumers Each message to a topic is processed by all

the consumers connected to that topic − May even be saved for consumers that

happen to be disconnected at the moment

Page 19: Riding with camel

MESSAGE BROKER  

Message Broker

Decouple the destination message from the SenderAnd maintain central control over the flow

Of messages

Page 20: Riding with camel

MESSAGING CONCEPTS

MessageProducer

Message Consumer

Message Consumer

Message Consumer

Message BrokerMessage Broker

Topic Queue

Page 21: Riding with camel

ACTIVE MQ

Apache ActiveMQ is an open source (Apache 2.0 licensed) message broker which fully implements the Java Message Service 1.1 (JMS)

JMS The Java API for messaging

Page 22: Riding with camel

CHARACTERISTICS OF ESB

TransactionManagementTransaction

ManagementService Orchestration

Service Orchestration

Message ProcessingMessage

Processing

Service MappingService MappingMessage Transformation

Message Transformation

RoutingRouting

SecuritySecurity

Message Enhancement

Message Enhancement

Protocol Transmission

Protocol Transmission

Page 23: Riding with camel

OSGI

The Open Services Gateway Initiative (OSGi) Dynamic Module System for Java Architecture for modular application development.

Page 24: Riding with camel

JBI

JBI is a java based standard to build integrations systems by using plug-in components which interoperates through mediated normalized message exchanges.

The message exchange model is based on the web services description language (WSDL).

Page 25: Riding with camel

BACK TO CAMEL RIDE

50 Enterprise Integration Patterns

http://camel.apache.org/eip

Page 26: Riding with camel

APACHE CAMEL (INSIDE THE BOX)80 COMPONENTS

activemq cxf flatpack jasypt

activemq-journal

cxfrs freemarker javaspace

amqp Dataset ftp/ftps/sftp jbi

atom Db4o gae jcr

bean direct hdfs jdbc

bean validation ejb hibernate jetty

browse esper hl7 jms

cache event http jmx

cometd exec ibatis jpa

crypto file irc jt/400

http://camel.apache.org/components.html

Page 27: Riding with camel

CAMEL (WHAT IS INSIDE )18 DATA FORMATS

bindy protobufcastor serialization

csv soapcrypto syslogdozer tidy markup

flatpack xml beansgzip xml securityhl7 xstreamjaxb zipjson

Page 28: Riding with camel

CAMEL(INSIDE THE BOX)15 EXPRESSION LANGUAGES

BeanShell Python

EL Ruby

Groovy Simple

JavaScript SpEL

JSR 223 SQL

OGNL XPath

MVEL XQuery

PHP

Page 29: Riding with camel

Domain Specific Language

Domain-specific language ● Routing can be defined in DSL ● Java DSL Fluent API that allows code completion by your IDE ● Spring DSL Custom namespace with XML tags for routing ● Scala DSL Adding some Scala features on top of the Java DSL

Page 30: Riding with camel

Questions

Page 31: Riding with camel

REFERENCES

http://ggatz.com/images/Enterprise_20Integration_20-_20SOA_20vs_20EAI_20vs_20ESB.pdf

Camel in Action http://manning.com/ibsen