SlideShare une entreprise Scribd logo
1  sur  38
Enterprise Integration Patterns
&
Apache Camel
Milos Zubal
Waterford Tech. Meetup 26.09.2018
Who’s this?!
@MilosZubal
Software Engineer at
(we’re hiring! ;) )
11+ years of backend Java happiness
https://www.linkedin.com/in/miloszubal/
https://github.com/mzubal
https://twitter.com/MilosZubal
(if you think the accent is very strange I am
from Czech Republic :) )
What are you
going to hear
today?
● Enterprise Integration Patterns
(EIPs)
● Apache Camel
Some of the challenges of application integration
● Spaghetti integration (point-to-point)
● Unreliable/slow transport medium
● Many different data formats
● Performance/Throughput
● On-going change
Integrate apps? Why?
● Real-time data integration
● Process automation
● Improved flexibility
● “WTF? We do microservices!”
There is a fancy urban legend of a company where “Orders” department printed (physically!) all the
new customer details every week and passed that to the “Accounting” department so they can manually
type all the info into their system.
Integrate apps? How?
● File Transfer
● Shared DB
● RPC
● Messages
File Transfer
● Pros
○ Location decoupling
○ Temporal decoupling
○ Language agnostic
○ Works everywhere
● Cons
○ Delay in transfer
○ Large amount of data
○ Write/Read at the same time
Shared DB
● Pros
○ Consistency/Transactions
○ Reporting
● Cons
○ Purely data integration
○ No Process integration
○ No isolation
○ Performance/Locking
RPC
● Pros
○ Integration on demand
○ Also Process/Function integration
● Cons
○ Easily evolves into spaghetti
○ Tight coupling (location, temporal)
○ Performance problems (the call is
blocking resources)
Messaging (Async)
● Pros
○ Any type of integration
○ Decoupling (location/temporal)
○ Performance/Throttling
○ “Honest” approach to model the communication
● Cons
○ It is a different programming model
○ Usually need for a Message Broker
We have just covered Integration Styles of EIP
Enterprise Integration Patterns (EIPs)
● EIPs == GoF of application integration
● Set of 65 patterns to describe/design scalable
and maintainable integration solutions
● Published 10.10.2003
● 700 pages
● Authors: Gregor Hohpe
/ Bobby Woolf
Enterprise Integration Patterns
● Model integration as asynchronous messages
● Focus mainly on the communication of the apps and their edge
components
● Focus on stateless communication
● Usually one-way communication (not Request-Reply)
● Assumes using Message Broker to deliver messages (but there
are some architectures without MB)
● “Wider bridges, not faster cars.”
● Please make sure you don’t fall into the trap of applying integration
patterns to everything! (Keep things simple!)
Main EIP groups
Channel Patterns
(how to transport the Message)
Message Patterns
(how to design the Message)
Routing Patterns
(how to route the Message to its destination)
Transformation Patterns
(how to transform the Message to needed format)
Endpoint Patterns
(how to produce/consume the Message with
non-messaging systems)
Management Patterns
(how to monitor, test and manage the system
EIP Game: Guess the Pattern Name!
“Use a Splitter to break out the composite message into
a series of individual messages, each containing data
related to one item.”
????
EIP Game: Guess the Pattern Name!
????
“Use a stateful filter, an Aggregator, to collect and store
individual messages until a complete set of related messages
has been received. Then, the Aggregator publishes a single
message distilled from the individual messages.”
EIP Game: Guess the Pattern Name!
????
“Insert a special filter, a Message Router, which consumes a
Message from one Message Channel and republishes it to a
different Message Channel channel depending on a set of
conditions.”
Claim Check
The are a lot more EIPs
● All of them can be combined
or composed into “higher-
level” patterns
● Just like with GoF, you might
be using some of them
already
● All of them can be found on
enterpriseintegrationpatterns.com
Pipes and Filters
Loan Broker example
EIPs do not focus on
● Data modelling
● Stateful
communication/processes
(conversations)
● Correct modularisation or
application boundaries
○ Check Domain Driven
Desing (DDD)
EIPs - key benefits
● Robust Patterns to implement scalable and maintainable
integrations
● Common vocabulary
● Simple and expressive Graphical Notation
Implementing EIPs
Small
(frameworks)
Apache Camel
Spring Integration
NServiceBus (.NET)
Medium
(ESBs, Brokers)
JBoss Fuse
Mule
WSO2
TIBCO
Oracle ESB
IBM WebSphere ESB
Large
(SOA Suites)
Oracle SOA Suite
Service Works
(other major vendors)
Apache Camel
“Apache Camel is a powerful open source integration framework based on
known Enterprise Integration Patterns with powerful bean integration.”
● Open-source implementation of EIPs
● Backed by RedHat (it is part of JBoss Fuse)
● First release - summer 2007
Camel: basic architecture
Content Based Router - the Camel way
from newOrder
choice
when isWidget to widget
otherwise to gadget
Content Based Router - the Camel way
from(newOrder)
choice
when(isWidget)to(widget)
otherwise to(gadget)
Content Based Router - the Camel way
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget);
Content Based Router - the Camel way
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget);
Endpoint newOrder = endpoint(“amqp:queue:newOrder”);
Predicate isWidget = xpath(“/order/product = ‘widget’”);
Endpoint widget = endpoint(“amqp:queue:widget”);
Endpoint gadget = endpoint(“amqp:queue:gadget”);
Content Based Router - the Camel way
public class MyRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
Endpoint newOrder = endpoint(“amqp:queue:newOrder”);
Predicate isWidget = xpath(“/order/product = ‘widget’”);
Endpoint widget = endpoint(“amqp:queue:widget”);
Endpoint gadget = endpoint(“amqp:queue:gadget”);
from(newOrder)
.choice()
.when(isWidget).to(widget)
.otherwise().to(gadget);
}}
Content Based Router - the Camel way
public class MyRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
from(“amqp:queue:newOrder”)
.choice()
.when(xpath(“/order/product=‘widget’”).to(“amqp:queue:widget”)
.otherwise().to(“amqp:queue:gadget”);
}}
public void configure() throws Exception {
from(“amqp:queue:newOrder”)
.choice()
.when(xpath(“/order/product=‘widget’”)).to(“amqp:queue:widget”)
.otherwise().to(“amqp:queue:gadget”);
}}
Component - technology or transport, 300+ existing components!
Endpoint - particular “instance” of Component with concrete configuration/params
Predicate - supports also JSONPath, OGNL and others
Route - DSL (chained methods) defining the message flow
Content Based Router - the Camel way
Component
Predicate Endpoint
Route
Camel - other concepts
● Integration with Spring
● Expression Languages
● Support for Spring Transactions (JDBC, JMS, 2PC)
● Data formats (XML, JSON, EDI, ...)
● Error handling / retry strategies
● Throttling
● Bean integration
● Graceful Shutdowns
● Excellent support for unit tests
Camel - deployment options
● Standalone Java JAR (camel-core is 4.5M)
● Embedded in Tomcat, Karaf (OSGi)
● As part of JBoss Fuse
● Spring-boot - my favorite!
● Basically just put it on classpath and use it!
Resources
● EIP Book: on Amazon
● https://www.enterpriseintegrationpatterns.com
● http://camel.apache.org/
● https://github.com/apache/camel/tree/master/examples
● Existing stencils for many modelling tools!
Thanks!
Any Questions?
I am a proud Camel Rider™ - feel
free to get in touch later or via DM!
See you later!
Later Gator!

Contenu connexe

Tendances

Custom policies in mule 4 and a circuit breaker example
Custom policies in mule 4 and a circuit breaker exampleCustom policies in mule 4 and a circuit breaker example
Custom policies in mule 4 and a circuit breaker exampleRoyston Lobo
 
MuleSoft Meetup Warsaw Group #1
MuleSoft  Meetup Warsaw Group #1MuleSoft  Meetup Warsaw Group #1
MuleSoft Meetup Warsaw Group #1Patryk Bandurski
 
What is SSL/TLS, 1-way and 2-way SSL?
What is SSL/TLS, 1-way and 2-way SSL?What is SSL/TLS, 1-way and 2-way SSL?
What is SSL/TLS, 1-way and 2-way SSL?pqrs1234
 
Virtual Meetup: Mule 4 Error Handling and Logging
Virtual Meetup: Mule 4 Error Handling and LoggingVirtual Meetup: Mule 4 Error Handling and Logging
Virtual Meetup: Mule 4 Error Handling and LoggingJimmy Attia
 
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLBMuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLBJitendra Bafna
 
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...Jitendra Bafna
 
Mulesoftmeetup20th mar final
Mulesoftmeetup20th mar finalMulesoftmeetup20th mar final
Mulesoftmeetup20th mar finalAnurag Dwivedi
 
West Yorkshire Mulesoft Meetup #5
West Yorkshire Mulesoft Meetup #5West Yorkshire Mulesoft Meetup #5
West Yorkshire Mulesoft Meetup #5Francis Edwards
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...Jitendra Bafna
 
Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021sumitahuja94
 
Mumbai MuleSoft Meetup 13
Mumbai MuleSoft Meetup 13Mumbai MuleSoft Meetup 13
Mumbai MuleSoft Meetup 13Akshata Sawant
 
Ahmedabad MuleSoft Meetup #1
Ahmedabad MuleSoft Meetup #1Ahmedabad MuleSoft Meetup #1
Ahmedabad MuleSoft Meetup #1Tejas Purohit
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...Jitendra Bafna
 
Surat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime FabricSurat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime FabricJitendra Bafna
 
MuleSoft Surat Virtual Meetup#26 - Implementing Hybrid MuleSoft Runtime - Any...
MuleSoft Surat Virtual Meetup#26 - Implementing Hybrid MuleSoft Runtime - Any...MuleSoft Surat Virtual Meetup#26 - Implementing Hybrid MuleSoft Runtime - Any...
MuleSoft Surat Virtual Meetup#26 - Implementing Hybrid MuleSoft Runtime - Any...Jitendra Bafna
 
Troubleshooting and Best Practices with WSO2 Enterprise Integrator
Troubleshooting and Best Practices with WSO2 Enterprise IntegratorTroubleshooting and Best Practices with WSO2 Enterprise Integrator
Troubleshooting and Best Practices with WSO2 Enterprise IntegratorWSO2
 
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...Jitendra Bafna
 
Power of Transformation with DataWeave 2.X Engine
Power of Transformation with DataWeave 2.X EnginePower of Transformation with DataWeave 2.X Engine
Power of Transformation with DataWeave 2.X EngineManish Kumar Yadav
 
Flow Tuning: Mule 3 vs. Mule 4 - MuleSoft Chicago CONNECT
Flow Tuning: Mule 3 vs. Mule 4 - MuleSoft Chicago CONNECTFlow Tuning: Mule 3 vs. Mule 4 - MuleSoft Chicago CONNECT
Flow Tuning: Mule 3 vs. Mule 4 - MuleSoft Chicago CONNECTSabrina Marechal
 
Baltimore july2021 final
Baltimore july2021 finalBaltimore july2021 final
Baltimore july2021 finalManjuKumara GH
 

Tendances (20)

Custom policies in mule 4 and a circuit breaker example
Custom policies in mule 4 and a circuit breaker exampleCustom policies in mule 4 and a circuit breaker example
Custom policies in mule 4 and a circuit breaker example
 
MuleSoft Meetup Warsaw Group #1
MuleSoft  Meetup Warsaw Group #1MuleSoft  Meetup Warsaw Group #1
MuleSoft Meetup Warsaw Group #1
 
What is SSL/TLS, 1-way and 2-way SSL?
What is SSL/TLS, 1-way and 2-way SSL?What is SSL/TLS, 1-way and 2-way SSL?
What is SSL/TLS, 1-way and 2-way SSL?
 
Virtual Meetup: Mule 4 Error Handling and Logging
Virtual Meetup: Mule 4 Error Handling and LoggingVirtual Meetup: Mule 4 Error Handling and Logging
Virtual Meetup: Mule 4 Error Handling and Logging
 
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLBMuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
 
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...
 
Mulesoftmeetup20th mar final
Mulesoftmeetup20th mar finalMulesoftmeetup20th mar final
Mulesoftmeetup20th mar final
 
West Yorkshire Mulesoft Meetup #5
West Yorkshire Mulesoft Meetup #5West Yorkshire Mulesoft Meetup #5
West Yorkshire Mulesoft Meetup #5
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
 
Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021
 
Mumbai MuleSoft Meetup 13
Mumbai MuleSoft Meetup 13Mumbai MuleSoft Meetup 13
Mumbai MuleSoft Meetup 13
 
Ahmedabad MuleSoft Meetup #1
Ahmedabad MuleSoft Meetup #1Ahmedabad MuleSoft Meetup #1
Ahmedabad MuleSoft Meetup #1
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
 
Surat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime FabricSurat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime Fabric
 
MuleSoft Surat Virtual Meetup#26 - Implementing Hybrid MuleSoft Runtime - Any...
MuleSoft Surat Virtual Meetup#26 - Implementing Hybrid MuleSoft Runtime - Any...MuleSoft Surat Virtual Meetup#26 - Implementing Hybrid MuleSoft Runtime - Any...
MuleSoft Surat Virtual Meetup#26 - Implementing Hybrid MuleSoft Runtime - Any...
 
Troubleshooting and Best Practices with WSO2 Enterprise Integrator
Troubleshooting and Best Practices with WSO2 Enterprise IntegratorTroubleshooting and Best Practices with WSO2 Enterprise Integrator
Troubleshooting and Best Practices with WSO2 Enterprise Integrator
 
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
 
Power of Transformation with DataWeave 2.X Engine
Power of Transformation with DataWeave 2.X EnginePower of Transformation with DataWeave 2.X Engine
Power of Transformation with DataWeave 2.X Engine
 
Flow Tuning: Mule 3 vs. Mule 4 - MuleSoft Chicago CONNECT
Flow Tuning: Mule 3 vs. Mule 4 - MuleSoft Chicago CONNECTFlow Tuning: Mule 3 vs. Mule 4 - MuleSoft Chicago CONNECT
Flow Tuning: Mule 3 vs. Mule 4 - MuleSoft Chicago CONNECT
 
Baltimore july2021 final
Baltimore july2021 finalBaltimore july2021 final
Baltimore july2021 final
 

Similaire à Enterprise Integration Patterns and Apache Camel

Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...
Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...
Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...Jimmy DeadcOde
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Fwdays
 
Introduction To Apache Camel
Introduction To Apache CamelIntroduction To Apache Camel
Introduction To Apache CamelKnoldus Inc.
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practiceaegloff
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!melbats
 
Advanced web application architecture Way2Web
Advanced web application architecture Way2WebAdvanced web application architecture Way2Web
Advanced web application architecture Way2WebMatthias Noback
 
Stateful mock servers to the rescue on REST ecosystems
Stateful mock servers to the rescue on REST ecosystemsStateful mock servers to the rescue on REST ecosystems
Stateful mock servers to the rescue on REST ecosystemsNuno Caneco
 
Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...
Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...
Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...Kai Wähner
 
Enterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache CamelEnterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache CamelIoan Eugen Stan
 
Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011Opevel
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On Ram G Suri
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN StackRob Davarnia
 
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsEuropean Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsSébastien Levert
 
A SOA approximation on symfony
A SOA approximation on symfonyA SOA approximation on symfony
A SOA approximation on symfonyJoseluis Laso
 
Building Custom Connectors Using XML SDK in Mule 4
Building Custom Connectors Using XML SDK in Mule 4Building Custom Connectors Using XML SDK in Mule 4
Building Custom Connectors Using XML SDK in Mule 4Manish Kumar Yadav
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveBizTalk360
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17GreeceJS
 

Similaire à Enterprise Integration Patterns and Apache Camel (20)

EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...
Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...
Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Introduction To Apache Camel
Introduction To Apache CamelIntroduction To Apache Camel
Introduction To Apache Camel
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practice
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!
 
Advanced web application architecture Way2Web
Advanced web application architecture Way2WebAdvanced web application architecture Way2Web
Advanced web application architecture Way2Web
 
Stateful mock servers to the rescue on REST ecosystems
Stateful mock servers to the rescue on REST ecosystemsStateful mock servers to the rescue on REST ecosystems
Stateful mock servers to the rescue on REST ecosystems
 
Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...
Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...
Enterprise Integration Patterns Revisited (again) for the Era of Big Data, In...
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
Enterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache CamelEnterprise Integration Patterns with Apache Camel
Enterprise Integration Patterns with Apache Camel
 
Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsEuropean Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
 
A SOA approximation on symfony
A SOA approximation on symfonyA SOA approximation on symfony
A SOA approximation on symfony
 
A soa approximation on symfony
A soa approximation on symfonyA soa approximation on symfony
A soa approximation on symfony
 
Building Custom Connectors Using XML SDK in Mule 4
Building Custom Connectors Using XML SDK in Mule 4Building Custom Connectors Using XML SDK in Mule 4
Building Custom Connectors Using XML SDK in Mule 4
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep Dive
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 

Dernier (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 

Enterprise Integration Patterns and Apache Camel

  • 1. Enterprise Integration Patterns & Apache Camel Milos Zubal Waterford Tech. Meetup 26.09.2018
  • 2. Who’s this?! @MilosZubal Software Engineer at (we’re hiring! ;) ) 11+ years of backend Java happiness https://www.linkedin.com/in/miloszubal/ https://github.com/mzubal https://twitter.com/MilosZubal (if you think the accent is very strange I am from Czech Republic :) )
  • 3. What are you going to hear today? ● Enterprise Integration Patterns (EIPs) ● Apache Camel
  • 4. Some of the challenges of application integration ● Spaghetti integration (point-to-point) ● Unreliable/slow transport medium ● Many different data formats ● Performance/Throughput ● On-going change
  • 5. Integrate apps? Why? ● Real-time data integration ● Process automation ● Improved flexibility ● “WTF? We do microservices!” There is a fancy urban legend of a company where “Orders” department printed (physically!) all the new customer details every week and passed that to the “Accounting” department so they can manually type all the info into their system.
  • 6. Integrate apps? How? ● File Transfer ● Shared DB ● RPC ● Messages
  • 7. File Transfer ● Pros ○ Location decoupling ○ Temporal decoupling ○ Language agnostic ○ Works everywhere ● Cons ○ Delay in transfer ○ Large amount of data ○ Write/Read at the same time
  • 8. Shared DB ● Pros ○ Consistency/Transactions ○ Reporting ● Cons ○ Purely data integration ○ No Process integration ○ No isolation ○ Performance/Locking
  • 9. RPC ● Pros ○ Integration on demand ○ Also Process/Function integration ● Cons ○ Easily evolves into spaghetti ○ Tight coupling (location, temporal) ○ Performance problems (the call is blocking resources)
  • 10. Messaging (Async) ● Pros ○ Any type of integration ○ Decoupling (location/temporal) ○ Performance/Throttling ○ “Honest” approach to model the communication ● Cons ○ It is a different programming model ○ Usually need for a Message Broker
  • 11. We have just covered Integration Styles of EIP
  • 12. Enterprise Integration Patterns (EIPs) ● EIPs == GoF of application integration ● Set of 65 patterns to describe/design scalable and maintainable integration solutions ● Published 10.10.2003 ● 700 pages ● Authors: Gregor Hohpe / Bobby Woolf
  • 13. Enterprise Integration Patterns ● Model integration as asynchronous messages ● Focus mainly on the communication of the apps and their edge components ● Focus on stateless communication ● Usually one-way communication (not Request-Reply) ● Assumes using Message Broker to deliver messages (but there are some architectures without MB) ● “Wider bridges, not faster cars.” ● Please make sure you don’t fall into the trap of applying integration patterns to everything! (Keep things simple!)
  • 14. Main EIP groups Channel Patterns (how to transport the Message) Message Patterns (how to design the Message) Routing Patterns (how to route the Message to its destination) Transformation Patterns (how to transform the Message to needed format) Endpoint Patterns (how to produce/consume the Message with non-messaging systems) Management Patterns (how to monitor, test and manage the system
  • 15. EIP Game: Guess the Pattern Name! “Use a Splitter to break out the composite message into a series of individual messages, each containing data related to one item.” ????
  • 16. EIP Game: Guess the Pattern Name! ???? “Use a stateful filter, an Aggregator, to collect and store individual messages until a complete set of related messages has been received. Then, the Aggregator publishes a single message distilled from the individual messages.”
  • 17. EIP Game: Guess the Pattern Name! ???? “Insert a special filter, a Message Router, which consumes a Message from one Message Channel and republishes it to a different Message Channel channel depending on a set of conditions.”
  • 19. The are a lot more EIPs ● All of them can be combined or composed into “higher- level” patterns ● Just like with GoF, you might be using some of them already ● All of them can be found on enterpriseintegrationpatterns.com
  • 22. EIPs do not focus on ● Data modelling ● Stateful communication/processes (conversations) ● Correct modularisation or application boundaries ○ Check Domain Driven Desing (DDD)
  • 23. EIPs - key benefits ● Robust Patterns to implement scalable and maintainable integrations ● Common vocabulary ● Simple and expressive Graphical Notation
  • 24. Implementing EIPs Small (frameworks) Apache Camel Spring Integration NServiceBus (.NET) Medium (ESBs, Brokers) JBoss Fuse Mule WSO2 TIBCO Oracle ESB IBM WebSphere ESB Large (SOA Suites) Oracle SOA Suite Service Works (other major vendors)
  • 25. Apache Camel “Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with powerful bean integration.” ● Open-source implementation of EIPs ● Backed by RedHat (it is part of JBoss Fuse) ● First release - summer 2007
  • 27. Content Based Router - the Camel way from newOrder choice when isWidget to widget otherwise to gadget
  • 28. Content Based Router - the Camel way from(newOrder) choice when(isWidget)to(widget) otherwise to(gadget)
  • 29. Content Based Router - the Camel way from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget);
  • 30. Content Based Router - the Camel way from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget); Endpoint newOrder = endpoint(“amqp:queue:newOrder”); Predicate isWidget = xpath(“/order/product = ‘widget’”); Endpoint widget = endpoint(“amqp:queue:widget”); Endpoint gadget = endpoint(“amqp:queue:gadget”);
  • 31. Content Based Router - the Camel way public class MyRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { Endpoint newOrder = endpoint(“amqp:queue:newOrder”); Predicate isWidget = xpath(“/order/product = ‘widget’”); Endpoint widget = endpoint(“amqp:queue:widget”); Endpoint gadget = endpoint(“amqp:queue:gadget”); from(newOrder) .choice() .when(isWidget).to(widget) .otherwise().to(gadget); }}
  • 32. Content Based Router - the Camel way public class MyRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(“amqp:queue:newOrder”) .choice() .when(xpath(“/order/product=‘widget’”).to(“amqp:queue:widget”) .otherwise().to(“amqp:queue:gadget”); }}
  • 33. public void configure() throws Exception { from(“amqp:queue:newOrder”) .choice() .when(xpath(“/order/product=‘widget’”)).to(“amqp:queue:widget”) .otherwise().to(“amqp:queue:gadget”); }} Component - technology or transport, 300+ existing components! Endpoint - particular “instance” of Component with concrete configuration/params Predicate - supports also JSONPath, OGNL and others Route - DSL (chained methods) defining the message flow Content Based Router - the Camel way Component Predicate Endpoint Route
  • 34. Camel - other concepts ● Integration with Spring ● Expression Languages ● Support for Spring Transactions (JDBC, JMS, 2PC) ● Data formats (XML, JSON, EDI, ...) ● Error handling / retry strategies ● Throttling ● Bean integration ● Graceful Shutdowns ● Excellent support for unit tests
  • 35. Camel - deployment options ● Standalone Java JAR (camel-core is 4.5M) ● Embedded in Tomcat, Karaf (OSGi) ● As part of JBoss Fuse ● Spring-boot - my favorite! ● Basically just put it on classpath and use it!
  • 36. Resources ● EIP Book: on Amazon ● https://www.enterpriseintegrationpatterns.com ● http://camel.apache.org/ ● https://github.com/apache/camel/tree/master/examples ● Existing stencils for many modelling tools!
  • 37.
  • 38. Thanks! Any Questions? I am a proud Camel Rider™ - feel free to get in touch later or via DM! See you later! Later Gator!

Notes de l'éditeur

  1. Thanks to - Dara for his GraphQL talk, Marco for the chance to talk (wildcard), all the sponsors - BoxWorks, RedHat, BlueFin, MetalMan,...
  2. Application integration is hard. Only Arnie can handle the spaghetti.
  3. Lower the cost of manual synchronisation, increase the effectiveness
  4. File locking strategies. Good decoupling. Cannot effectively do competing consumers.
  5. Hard to evolve schema and do impact analysis. Long running transactions and locks. Imagine the second app to fetch data ‘for update’ and then sending them (while the tx still open) to some very slow WS.
  6. Scenario of one app creating transaction, do write locks, then calling another, which does the same. Current REST is RPC.
  7. “Honest” in terms of unreliable/slow network, small amount of data, asynchronous. You have to think in terms of correlation IDs, timeouts, etc. Everything in our lives is synchronous - Postman (waiting at your door, even sender waiting at the post). You better be synchronous when your wife calls you! :) (or be good at error handling and reconciliation). Network packets/datagrams, async ACKs.
  8. GoF and their reflection in frameworks. EIPs and their reflection in systems. EIP and EDAs are foundation of current Reactive activities. SW engineering is quite similar to usual way the people have to learn the history over and over, but SW engineering has shorter cycles :)
  9. GoF and their reflection in frameworks. EIPs and their reflection in systems. EIP and EDAs are foundation of current Reactive activities. SW engineering is quite similar to usual way the people have to learn the history over and over, but SW engineering has shorter cycles :)
  10. GoF and their reflection in frameworks. EIPs and their reflection in systems. EIP and EDAs are foundation of current Reactive activities. SW engineering is quite similar to usual way the people have to learn the history over and over, but SW engineering has shorter cycles :)
  11. GoF and their reflection in frameworks. EIPs and their reflection in systems. EIP and EDAs are foundation of current Reactive activities. SW engineering is quite similar to usual way the people have to learn the history over and over, but SW engineering has shorter cycles :)
  12. Mention about draw
  13. Recipient list is dynamic - banks can be stored in configuration, might make sense to send the request to same banks based on credit score, might make sense to include bank filter in the loan request. Aggregator might implement different strategies to determine the winner request (APR).