SlideShare ist ein Scribd-Unternehmen logo
1 von 59
Real-world #microservices
with Apache Camel and
Fabric8
Who?
Christian Posta
Principal Middleware Specialist/Architect
Blog: http://christianposta.com/blog
Twitter: @christianposta
Email: christian@redhat.com
• Committer on Apache Camel, ActiveMQ, Fabric8, PMC on ActiveMQ
• Author: Essential Camel Components DZone Refcard
• Frequent blogger and speaker about open-source technology!
• Microservices
• Heavy lifting with Apache Camel
• Managing microservices with Fuse,
Fabric8 v1
• OpenShift, Fabric8 v2
• Beer (lots?)
Agenda
Why do we care?
Micro what?
• Services, reuse, composition
• Loose coupling!
• Contracts
• Incremental change
• “Business Agility”
SOA!
SOA made smaller… micro even…
So what are microservices?
A term that helps describe distributed systems
that organically evolve into scalable, loosely
coupled, modular sets of services that work
together to deliver business value
with acceptable tradeoffs.
So what are microservices?
• If my services are isolated at the
process level, I’m doing
#microservices
• If I use REST/Thrift/ProtoBuf
instead of SOAP, I’m doing
#microservices
• If I use JSON, I’m doing
#microservices
• If I use no-container / SpringBoot
/ Dropwizard / embedded Jetty,
I’m doing #microservices
I’m doing microservices if…
• Agile methodology
• SOA principles
• Domain Driven Design
• Hexagonal Architectures
• Pipes and Filters
• Actor Model
• REST
• SEDA
Microservices emerged as a result…
• Modularity!
• Flexible technology options
• “Smart endpoints” “dumb pipes”
• Evolving design
• Independently scalable
• Automation, DevOps philosophy
• Decentralized, choreographed interactions
• Testable
• Design for failure
Microservices…
Isolation: logical or physical?
• No silver bullet; distributed systems are
*hard*
• Dependency hell, custom shared libraries
• Fragmented and inconsistent management
• Team communication challenges
• Health checking, monitoring, liveness
• Over architecting, performance concerns,
things spiraling out of control fast
Challenges ahead…
Apache Camel for
microservices?
Real developers ride Camels!
2
Apache Camel
Apache Camel is an open-source,
light-weight, integration library.
Use Camel to integrate disparate systems
that speak different protocols and data
formats
Apache Camel
Enterprise Integration Patterns
http://camel.apache.org/eip
Features
● Enterprise Integration Patterns (EIPs)
● Domain Specific Language to write “flows” or “routes”
● Large collection of adapters/components for legacy
systems, B2B, and SaaS
● Strong Unit test/Integration test framework
● Expression languages
● Data Formats
● Tooling with JBoss Developer Studio
Java DSL
public class OrderProcessorRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
from(“activemq:orders”)
.choice()
.when(header(“customer-rating”).isEqualTo(“gold”))
.to(“ibmmq:topic:specialCustomer”)
.otherwise()
.to(“ftp://user@host/orders/regularCustomers”)
.end()
.log(“received new order ${body.orderId}”)
.to(“ibatis:storeOrder?statementType=Insert”);
}
}
Spring XML DSL
<route id=“processOrders”>
<from uri=“activemq:orders”/>
<choice>
<when>
<simple>${header.customer-rating} == ‘gold’</simple>
<to uri=“wmq:topic:specialCustomer”>
</when>
<otherwise>
<to uri=“ftp://user@host/orders/regularCustomers” />
</otherwise>
</choice>
<log message=“received new order ${body.orderId}”/>
<to uri=“ibatis:storeOrder?statementType=Insert”/>
</route>
Camel - JBoss Developer Studio
• Dynamic routing options
• REST DSL
• Backpressure mechanisms
• Loadbalancing algorithms / Circuit Breaker
pattern
Heavy Lifting: Camel for Microservices
• “Smart endpoints, dumb pipes”
• Endpoint does one thing well
• Metadata used for further routing
• Really “dynamic” with rules engine (eg,
Drools/BRMS)
Dynamic Routing
• Content Based Router
• Dynamic Router
• Routing Slip
• Recipient List
Dynamic Routing
• Expressive way to define REST endpoints
• POST, REST, PUT
• Auto binding to POJOs
• Plugs into Swagger for interface
definition/documentation
• Uses configurable HTTP engine
• camel-netty-http
• camel-jetty
• camel-reslet
• camel-sevlet (deploy into other containers)
• camel-spark-rest
REST DSL (2.14)
REST DSL
public class OrderProcessorRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
rest().post(“/order/socks”)
.description(“New Order for pair of socks”)
.consumes(“application/json”)
.route()
.to(“activemq:topic:newOrder”)
.log(“received new order ${body.orderId}”)
.to(“ibatis:storeOrder?statementType=Insert”);
}
}
• Backpressure is a way for a service to flow
control callers
• Detecting when can be difficult
• Need to bound processing queues in a
SEDA
• Take advantage of built in TCP flow control
for socket/http requests
Backpressure with Camel
• Throttle EIP
• http://camel.apache.org/throttler.html
• Blocking SEDA Queue
• from(“seda:name?size=100&blockWhenFull=true)
• Configure jetty/netty to use blocking acceptor
queues
• https://wiki.eclipse.org/Jetty/Howto/High_Load
• Using Exception handling/retry and DLQ
logic when getting flow controlled
• http://camel.apache.org/error-handling-in-camel.html
Backpressure with Camel
• Useful to keep from overloading a system
(use in conjunction with backpressure if you
can)
• Smart loadbalancing
• Sticky
• Random
• Failover
• Circuit breaker
Loadbalance/Circuit breaker
Circuit breaker
Image from http://martinfowler.com/bliki/CircuitBreaker.html
Circuit breaker
public class OrderProcessorRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
from(“direct:someinterface”)
.loadbalance()
.circuitBreaker(3, 20000L, MyException.class)
.to(“ibatis:storeOrder?statementType=Insert”);
}
}
More Information
● Camel in Action
● Apache Camel Developer’s Cookbook
● Community website
○ http://camel.apache.org/
JBoss Fuse (Red Hat
product)
RED HAT JBOSS FUSE
Development and tooling
Develop, test, debug, refine,
deploy
JBoss Developer Studio
Web services framework
Web services standards, SOAP,
XML/HTTP, RESTful HTTP
Integration framework
Transformation, mediation, enterprise
integration patterns
Management and
monitoring
System and web services metrics,
automated discovery, container
status, automatic updates
JBoss Operations Network
+
JBoss Fabric Management
Console
(hawtio)
Apache CXF Apache Camel
Reliable Messaging
JMS/STOMP/NMS/MQTT, publishing-subscribe/point-2-point, store and forward
Apache ActiveMQ
Container
Life cycle management, resource management, dynamic deployment,
security and provisioning
Apache Karaf + Fuse Fabric
RED HAT ENTERPRISE LINUX
Windows, UNIX, and other Linux
Managing microservice
deployments
• Simplifies deployments
• Provides centralized configuration
• Versioning
• Visualization of your middleware
• Service discovery
• Smart load balancing
• Failover
• Provides cluster capabilities, coordination
http://fabric8.io
• Implemented with Zookeeper and git
• Intended to be used with a dynamic
JVM/Apache Karaf
• Profiles store configuration, metadata, end-
state deployments
• Networking, JVM isolation, orchestration,
auto-scaling, health checks, cloud
deployments: all up to you
Fabric8 V1.x
• Registry
• Where configs are stored, everything centrally
managed
• Profiles
• Description of end-state deployment of a server
• Agent
• Listens on the server that can respond to registry
changes/profile updates
Fabric8 V1.x
Quick Demo V1
• Implemented with Docker and Kubernetes
• Use any JVM (or any technology)
• Docker images, encourage static, well-
defined, well-tested deployments
• Provides networking, JVM isolation,
orchestration, auto-scaling, health checks,
cloud deployments
• Still in community! Proving this out!
Fabric8 V2
Docker / Linux Containers
How different than VMs?
Kubernetes
• Pods
• Services
• Replication Controllers
Kubernetes
Red Hat’s PaaS: OpenShift
Public
PaaS
Service
On-premise
or Private
PaaS
Software
Open
Source
PaaS
Project
Scale IT Like a Factory with PaaS
Quick Demo V2
Demo and Questions

Weitere ähnliche Inhalte

Was ist angesagt?

Fuse integration-services
Fuse integration-servicesFuse integration-services
Fuse integration-servicesChristian Posta
 
An evolution of application networking: service mesh
An evolution of application networking: service meshAn evolution of application networking: service mesh
An evolution of application networking: service meshChristian Posta
 
Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes Christian Posta
 
Microservices Journey Summer 2017
Microservices Journey Summer 2017Microservices Journey Summer 2017
Microservices Journey Summer 2017Christian Posta
 
Simplify integrations-final-pdf
Simplify integrations-final-pdfSimplify integrations-final-pdf
Simplify integrations-final-pdfChristian Posta
 
Chicago Microservices Integration Talk
Chicago Microservices Integration TalkChicago Microservices Integration Talk
Chicago Microservices Integration TalkChristian Posta
 
Why real integration developers ride Camels
Why real integration developers ride CamelsWhy real integration developers ride Camels
Why real integration developers ride CamelsChristian Posta
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache CamelChristian Posta
 
Essential Camel Components
Essential Camel ComponentsEssential Camel Components
Essential Camel ComponentsChristian Posta
 
Solving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache CamelSolving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache CamelChristian Posta
 
Cloud Native Camel Riding
Cloud Native Camel RidingCloud Native Camel Riding
Cloud Native Camel RidingChristian Posta
 
Camel oneactivemq posta-final
Camel oneactivemq posta-finalCamel oneactivemq posta-final
Camel oneactivemq posta-finalChristian Posta
 
ActiveMQ Performance Tuning
ActiveMQ Performance TuningActiveMQ Performance Tuning
ActiveMQ Performance TuningChristian Posta
 
Atlanta Microservices Day: Istio Service Mesh
Atlanta Microservices Day: Istio Service MeshAtlanta Microservices Day: Istio Service Mesh
Atlanta Microservices Day: Istio Service MeshChristian Posta
 
The Hardest Part of Microservices: Calling Your Services
The Hardest Part of Microservices: Calling Your ServicesThe Hardest Part of Microservices: Calling Your Services
The Hardest Part of Microservices: Calling Your ServicesChristian Posta
 
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatThe Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatAmbassador Labs
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresChristian Posta
 
How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.Markus Eisele
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQChristian Posta
 

Was ist angesagt? (20)

Fuse integration-services
Fuse integration-servicesFuse integration-services
Fuse integration-services
 
SOA to Microservices
SOA to MicroservicesSOA to Microservices
SOA to Microservices
 
An evolution of application networking: service mesh
An evolution of application networking: service meshAn evolution of application networking: service mesh
An evolution of application networking: service mesh
 
Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes
 
Microservices Journey Summer 2017
Microservices Journey Summer 2017Microservices Journey Summer 2017
Microservices Journey Summer 2017
 
Simplify integrations-final-pdf
Simplify integrations-final-pdfSimplify integrations-final-pdf
Simplify integrations-final-pdf
 
Chicago Microservices Integration Talk
Chicago Microservices Integration TalkChicago Microservices Integration Talk
Chicago Microservices Integration Talk
 
Why real integration developers ride Camels
Why real integration developers ride CamelsWhy real integration developers ride Camels
Why real integration developers ride Camels
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
 
Essential Camel Components
Essential Camel ComponentsEssential Camel Components
Essential Camel Components
 
Solving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache CamelSolving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache Camel
 
Cloud Native Camel Riding
Cloud Native Camel RidingCloud Native Camel Riding
Cloud Native Camel Riding
 
Camel oneactivemq posta-final
Camel oneactivemq posta-finalCamel oneactivemq posta-final
Camel oneactivemq posta-final
 
ActiveMQ Performance Tuning
ActiveMQ Performance TuningActiveMQ Performance Tuning
ActiveMQ Performance Tuning
 
Atlanta Microservices Day: Istio Service Mesh
Atlanta Microservices Day: Istio Service MeshAtlanta Microservices Day: Istio Service Mesh
Atlanta Microservices Day: Istio Service Mesh
 
The Hardest Part of Microservices: Calling Your Services
The Hardest Part of Microservices: Calling Your ServicesThe Hardest Part of Microservices: Calling Your Services
The Hardest Part of Microservices: Calling Your Services
 
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatThe Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new features
 
How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQ
 

Andere mochten auch

Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8Christian Posta
 
The hardest part of microservices: your data
The hardest part of microservices: your dataThe hardest part of microservices: your data
The hardest part of microservices: your dataChristian Posta
 
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO Christian Posta
 
Microservices Journey NYC
Microservices Journey NYCMicroservices Journey NYC
Microservices Journey NYCChristian Posta
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesSamuel Terburg
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache CamelClaus Ibsen
 
Build a PaaS with OpenShift Origin
Build a PaaS with OpenShift OriginBuild a PaaS with OpenShift Origin
Build a PaaS with OpenShift OriginSteven Pousty
 
Red Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep DiveRed Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep DiveGreg Hoelzer
 
Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreHenryk Konsek
 
fabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShiftfabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShiftroland.huss
 
Performance Monitoring for Docker Environments - Docker Amsterdam June Meetup
Performance Monitoring for Docker Environments - Docker Amsterdam June MeetupPerformance Monitoring for Docker Environments - Docker Amsterdam June Meetup
Performance Monitoring for Docker Environments - Docker Amsterdam June MeetupStijn Polfliet
 
MySQL Tuning For CPU Bottleneck
MySQL Tuning For CPU BottleneckMySQL Tuning For CPU Bottleneck
MySQL Tuning For CPU BottleneckSky Jian
 
Oracle my sql-or-nosql
Oracle my sql-or-nosqlOracle my sql-or-nosql
Oracle my sql-or-nosqlSky Jian
 
MySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTNMySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTNRonald Bradford
 

Andere mochten auch (15)

Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8
 
The hardest part of microservices: your data
The hardest part of microservices: your dataThe hardest part of microservices: your data
The hardest part of microservices: your data
 
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
 
Microservices Journey NYC
Microservices Journey NYCMicroservices Journey NYC
Microservices Journey NYC
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetes
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
 
Build a PaaS with OpenShift Origin
Build a PaaS with OpenShift OriginBuild a PaaS with OpenShift Origin
Build a PaaS with OpenShift Origin
 
Red Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep DiveRed Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep Dive
 
Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymore
 
fabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShiftfabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShift
 
Performance Monitoring for Docker Environments - Docker Amsterdam June Meetup
Performance Monitoring for Docker Environments - Docker Amsterdam June MeetupPerformance Monitoring for Docker Environments - Docker Amsterdam June Meetup
Performance Monitoring for Docker Environments - Docker Amsterdam June Meetup
 
cert
certcert
cert
 
MySQL Tuning For CPU Bottleneck
MySQL Tuning For CPU BottleneckMySQL Tuning For CPU Bottleneck
MySQL Tuning For CPU Bottleneck
 
Oracle my sql-or-nosql
Oracle my sql-or-nosqlOracle my sql-or-nosql
Oracle my sql-or-nosql
 
MySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTNMySQL Scalability Mistakes - OTN
MySQL Scalability Mistakes - OTN
 

Ähnlich wie Real world #microservices with Apache Camel, Fabric8, and OpenShift

Integration in the age of DevOps
Integration in the age of DevOpsIntegration in the age of DevOps
Integration in the age of DevOpsAlbert Wong
 
A microservices journey - Round 2
A microservices journey - Round 2A microservices journey - Round 2
A microservices journey - Round 2Christian Posta
 
Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례uEngine Solutions
 
Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1WSO2
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
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
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo | MADP & MBaaS
 
What’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyWhat’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyMohamed Taman
 
Mule and web services
Mule and web servicesMule and web services
Mule and web servicesManav Prasad
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationStuart (Pid) Williams
 
Red Hat Agile integration Workshop Labs
Red Hat Agile integration Workshop LabsRed Hat Agile integration Workshop Labs
Red Hat Agile integration Workshop LabsJudy Breedlove
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache UsergridDavid M. Johnson
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileAmazon Web Services Japan
 
2019 10-21 Java in the Age of Serverless
2019 10-21 Java in the Age of Serverless2019 10-21 Java in the Age of Serverless
2019 10-21 Java in the Age of ServerlessMatt Rutkowski
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government DevelopersFrank La Vigne
 
Simplify your integrations with Apache Camel
Simplify your integrations with Apache CamelSimplify your integrations with Apache Camel
Simplify your integrations with Apache CamelKenneth Peeples
 

Ähnlich wie Real world #microservices with Apache Camel, Fabric8, and OpenShift (20)

Integration in the age of DevOps
Integration in the age of DevOpsIntegration in the age of DevOps
Integration in the age of DevOps
 
A microservices journey - Round 2
A microservices journey - Round 2A microservices journey - Round 2
A microservices journey - Round 2
 
EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례
 
Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
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
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for Enterprises
 
What’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new StrategyWhat’s new in Java SE, EE, ME, Embedded world & new Strategy
What’s new in Java SE, EE, ME, Embedded world & new Strategy
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
 
Red Hat Agile integration Workshop Labs
Red Hat Agile integration Workshop LabsRed Hat Agile integration Workshop Labs
Red Hat Agile integration Workshop Labs
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
RavenDB overview
RavenDB overviewRavenDB overview
RavenDB overview
 
2019 10-21 Java in the Age of Serverless
2019 10-21 Java in the Age of Serverless2019 10-21 Java in the Age of Serverless
2019 10-21 Java in the Age of Serverless
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
Simplify your integrations with Apache Camel
Simplify your integrations with Apache CamelSimplify your integrations with Apache Camel
Simplify your integrations with Apache Camel
 

Mehr von Christian Posta

Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Understanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload IdentityUnderstanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload IdentityChristian Posta
 
Compliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient MeshCompliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient MeshChristian Posta
 
Cilium + Istio with Gloo Mesh
Cilium + Istio with Gloo MeshCilium + Istio with Gloo Mesh
Cilium + Istio with Gloo MeshChristian Posta
 
Multi-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshMulti-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshChristian Posta
 
Multicluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsMulticluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsChristian Posta
 
Cloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service MeshCloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service MeshChristian Posta
 
Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Christian Posta
 
The Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneThe Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneChristian Posta
 
Deep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo EnterpriseDeep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo EnterpriseChristian Posta
 
Role of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoptionRole of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoptionChristian Posta
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdChristian Posta
 
Chaos Debugging for Microservices
Chaos Debugging for MicroservicesChaos Debugging for Microservices
Chaos Debugging for MicroservicesChristian Posta
 
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...Christian Posta
 
Service-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMeshService-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMeshChristian Posta
 
Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Christian Posta
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisisChristian Posta
 
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...Christian Posta
 
PHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh LandscapePHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh LandscapeChristian Posta
 

Mehr von Christian Posta (20)

Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Understanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload IdentityUnderstanding Wireguard, TLS and Workload Identity
Understanding Wireguard, TLS and Workload Identity
 
Compliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient MeshCompliance and Zero Trust Ambient Mesh
Compliance and Zero Trust Ambient Mesh
 
Cilium + Istio with Gloo Mesh
Cilium + Istio with Gloo MeshCilium + Istio with Gloo Mesh
Cilium + Istio with Gloo Mesh
 
Multi-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshMulti-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMesh
 
Multicluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsMulticluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh Patterns
 
Cloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service MeshCloud-Native Application Debugging with Envoy and Service Mesh
Cloud-Native Application Debugging with Envoy and Service Mesh
 
Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)
 
The Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneThe Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data Plane
 
Deep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo EnterpriseDeep Dive: Building external auth plugins for Gloo Enterprise
Deep Dive: Building external auth plugins for Gloo Enterprise
 
Role of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoptionRole of edge gateways in relation to service mesh adoption
Role of edge gateways in relation to service mesh adoption
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
 
Chaos Debugging for Microservices
Chaos Debugging for MicroservicesChaos Debugging for Microservices
Chaos Debugging for Microservices
 
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
 
Service-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMeshService-mesh options with Linkerd, Consul, Istio and AWS AppMesh
Service-mesh options with Linkerd, Consul, Istio and AWS AppMesh
 
Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1
 
API Gateways are going through an identity crisis
API Gateways are going through an identity crisisAPI Gateways are going through an identity crisis
API Gateways are going through an identity crisis
 
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
 
PHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh LandscapePHX DevOps Days: Service Mesh Landscape
PHX DevOps Days: Service Mesh Landscape
 
Intro to Knative
Intro to KnativeIntro to Knative
Intro to Knative
 

Real world #microservices with Apache Camel, Fabric8, and OpenShift

  • 2.
  • 3. Who? Christian Posta Principal Middleware Specialist/Architect Blog: http://christianposta.com/blog Twitter: @christianposta Email: christian@redhat.com • Committer on Apache Camel, ActiveMQ, Fabric8, PMC on ActiveMQ • Author: Essential Camel Components DZone Refcard • Frequent blogger and speaker about open-source technology!
  • 4. • Microservices • Heavy lifting with Apache Camel • Managing microservices with Fuse, Fabric8 v1 • OpenShift, Fabric8 v2 • Beer (lots?) Agenda
  • 5. Why do we care?
  • 6.
  • 7.
  • 8.
  • 10.
  • 11. • Services, reuse, composition • Loose coupling! • Contracts • Incremental change • “Business Agility” SOA!
  • 12.
  • 13. SOA made smaller… micro even… So what are microservices?
  • 14. A term that helps describe distributed systems that organically evolve into scalable, loosely coupled, modular sets of services that work together to deliver business value with acceptable tradeoffs. So what are microservices?
  • 15. • If my services are isolated at the process level, I’m doing #microservices • If I use REST/Thrift/ProtoBuf instead of SOAP, I’m doing #microservices • If I use JSON, I’m doing #microservices • If I use no-container / SpringBoot / Dropwizard / embedded Jetty, I’m doing #microservices I’m doing microservices if…
  • 16. • Agile methodology • SOA principles • Domain Driven Design • Hexagonal Architectures • Pipes and Filters • Actor Model • REST • SEDA Microservices emerged as a result…
  • 17. • Modularity! • Flexible technology options • “Smart endpoints” “dumb pipes” • Evolving design • Independently scalable • Automation, DevOps philosophy • Decentralized, choreographed interactions • Testable • Design for failure Microservices…
  • 19. • No silver bullet; distributed systems are *hard* • Dependency hell, custom shared libraries • Fragmented and inconsistent management • Team communication challenges • Health checking, monitoring, liveness • Over architecting, performance concerns, things spiraling out of control fast Challenges ahead…
  • 22. 2 Apache Camel Apache Camel is an open-source, light-weight, integration library. Use Camel to integrate disparate systems that speak different protocols and data formats
  • 23. Apache Camel Enterprise Integration Patterns http://camel.apache.org/eip
  • 24. Features ● Enterprise Integration Patterns (EIPs) ● Domain Specific Language to write “flows” or “routes” ● Large collection of adapters/components for legacy systems, B2B, and SaaS ● Strong Unit test/Integration test framework ● Expression languages ● Data Formats ● Tooling with JBoss Developer Studio
  • 25. Java DSL public class OrderProcessorRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(“activemq:orders”) .choice() .when(header(“customer-rating”).isEqualTo(“gold”)) .to(“ibmmq:topic:specialCustomer”) .otherwise() .to(“ftp://user@host/orders/regularCustomers”) .end() .log(“received new order ${body.orderId}”) .to(“ibatis:storeOrder?statementType=Insert”); } }
  • 26. Spring XML DSL <route id=“processOrders”> <from uri=“activemq:orders”/> <choice> <when> <simple>${header.customer-rating} == ‘gold’</simple> <to uri=“wmq:topic:specialCustomer”> </when> <otherwise> <to uri=“ftp://user@host/orders/regularCustomers” /> </otherwise> </choice> <log message=“received new order ${body.orderId}”/> <to uri=“ibatis:storeOrder?statementType=Insert”/> </route>
  • 27. Camel - JBoss Developer Studio
  • 28. • Dynamic routing options • REST DSL • Backpressure mechanisms • Loadbalancing algorithms / Circuit Breaker pattern Heavy Lifting: Camel for Microservices
  • 29. • “Smart endpoints, dumb pipes” • Endpoint does one thing well • Metadata used for further routing • Really “dynamic” with rules engine (eg, Drools/BRMS) Dynamic Routing
  • 30. • Content Based Router • Dynamic Router • Routing Slip • Recipient List Dynamic Routing
  • 31. • Expressive way to define REST endpoints • POST, REST, PUT • Auto binding to POJOs • Plugs into Swagger for interface definition/documentation • Uses configurable HTTP engine • camel-netty-http • camel-jetty • camel-reslet • camel-sevlet (deploy into other containers) • camel-spark-rest REST DSL (2.14)
  • 32. REST DSL public class OrderProcessorRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { rest().post(“/order/socks”) .description(“New Order for pair of socks”) .consumes(“application/json”) .route() .to(“activemq:topic:newOrder”) .log(“received new order ${body.orderId}”) .to(“ibatis:storeOrder?statementType=Insert”); } }
  • 33. • Backpressure is a way for a service to flow control callers • Detecting when can be difficult • Need to bound processing queues in a SEDA • Take advantage of built in TCP flow control for socket/http requests Backpressure with Camel
  • 34. • Throttle EIP • http://camel.apache.org/throttler.html • Blocking SEDA Queue • from(“seda:name?size=100&blockWhenFull=true) • Configure jetty/netty to use blocking acceptor queues • https://wiki.eclipse.org/Jetty/Howto/High_Load • Using Exception handling/retry and DLQ logic when getting flow controlled • http://camel.apache.org/error-handling-in-camel.html Backpressure with Camel
  • 35. • Useful to keep from overloading a system (use in conjunction with backpressure if you can) • Smart loadbalancing • Sticky • Random • Failover • Circuit breaker Loadbalance/Circuit breaker
  • 36. Circuit breaker Image from http://martinfowler.com/bliki/CircuitBreaker.html
  • 37. Circuit breaker public class OrderProcessorRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(“direct:someinterface”) .loadbalance() .circuitBreaker(3, 20000L, MyException.class) .to(“ibatis:storeOrder?statementType=Insert”); } }
  • 38. More Information ● Camel in Action ● Apache Camel Developer’s Cookbook ● Community website ○ http://camel.apache.org/
  • 39. JBoss Fuse (Red Hat product)
  • 40.
  • 41. RED HAT JBOSS FUSE Development and tooling Develop, test, debug, refine, deploy JBoss Developer Studio Web services framework Web services standards, SOAP, XML/HTTP, RESTful HTTP Integration framework Transformation, mediation, enterprise integration patterns Management and monitoring System and web services metrics, automated discovery, container status, automatic updates JBoss Operations Network + JBoss Fabric Management Console (hawtio) Apache CXF Apache Camel Reliable Messaging JMS/STOMP/NMS/MQTT, publishing-subscribe/point-2-point, store and forward Apache ActiveMQ Container Life cycle management, resource management, dynamic deployment, security and provisioning Apache Karaf + Fuse Fabric RED HAT ENTERPRISE LINUX Windows, UNIX, and other Linux
  • 43.
  • 44.
  • 45. • Simplifies deployments • Provides centralized configuration • Versioning • Visualization of your middleware • Service discovery • Smart load balancing • Failover • Provides cluster capabilities, coordination http://fabric8.io
  • 46. • Implemented with Zookeeper and git • Intended to be used with a dynamic JVM/Apache Karaf • Profiles store configuration, metadata, end- state deployments • Networking, JVM isolation, orchestration, auto-scaling, health checks, cloud deployments: all up to you Fabric8 V1.x
  • 47. • Registry • Where configs are stored, everything centrally managed • Profiles • Description of end-state deployment of a server • Agent • Listens on the server that can respond to registry changes/profile updates Fabric8 V1.x
  • 49. • Implemented with Docker and Kubernetes • Use any JVM (or any technology) • Docker images, encourage static, well- defined, well-tested deployments • Provides networking, JVM isolation, orchestration, auto-scaling, health checks, cloud deployments • Still in community! Proving this out! Fabric8 V2
  • 50. Docker / Linux Containers
  • 52.
  • 54.
  • 55. • Pods • Services • Replication Controllers Kubernetes
  • 56. Red Hat’s PaaS: OpenShift Public PaaS Service On-premise or Private PaaS Software Open Source PaaS Project
  • 57. Scale IT Like a Factory with PaaS