Upload
sunitha-raghurajan
View
1.252
Download
2
Embed Size (px)
DESCRIPTION
Citation preview
A SMALL RIDE WITH CAMELSunitha Raghurajan
WHAT IS APACHE CAMEL
Apache Camel is a powerful Open Source Integration Framework based on known Enterprise Integration Patterns
http://camel.apache.org
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)
WHY THE NAME CAMEL
Concise Application Messaging Exchange Language
http://camel.apache.org/why-the-name-camel.html
WHO ARE CAMEL’S PARENTS
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
ESB
Platform
Architecture Component
Product
ESB
Simplifies Integration and flexible reuse of business components using Service Oriented Architecture
Glue that holds the compound application together
WHAT IS ESB
http://i.msdn.microsoft.com/Cc487894.bddfbe7f-6ee2-4072-91f1-402c87ee92ad(en-us,MSDN.10).png
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.
BUS ARCHITECTURE
Messaging Backbone
App AAdapter
App BAdapter B
App CAdapter C
Adapter KApp K
Adapter GApp G
Adapter ZApp Z
ESB ARCHITECTURE
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
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.”
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
WHY MESSAGING
Remote Communication
Platform/Language Integration communicate different systems running
different platforms, using different languages
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
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
MESSAGE BROKER
Message Broker
Decouple the destination message from the SenderAnd maintain central control over the flow
Of messages
MESSAGING CONCEPTS
MessageProducer
Message Consumer
Message Consumer
Message Consumer
Message BrokerMessage Broker
Topic Queue
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
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
OSGI
The Open Services Gateway Initiative (OSGi) Dynamic Module System for Java Architecture for modular application development.
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).
BACK TO CAMEL RIDE
50 Enterprise Integration Patterns
http://camel.apache.org/eip
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
CAMEL (WHAT IS INSIDE )18 DATA FORMATS
bindy protobufcastor serialization
csv soapcrypto syslogdozer tidy markup
flatpack xml beansgzip xml securityhl7 xstreamjaxb zipjson
CAMEL(INSIDE THE BOX)15 EXPRESSION LANGUAGES
BeanShell Python
EL Ruby
Groovy Simple
JavaScript SpEL
JSR 223 SQL
OGNL XPath
MVEL XQuery
PHP
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
Questions
REFERENCES
http://ggatz.com/images/Enterprise_20Integration_20-_20SOA_20vs_20EAI_20vs_20ESB.pdf
Camel in Action http://manning.com/ibsen