SlideShare ist ein Scribd-Unternehmen logo
1 von 86
Downloaden Sie, um offline zu lesen
DISTRIBUTED INTEGRATION
Agile Integration
● Lightweight
● Pattern Based
● Reusable Connectors
● Microservices Based
● Cloud native
solutions
● Lean artifacts,
individually
deployable
● Container based
scaling and high
availability
● Well defined,
re-usable, and well
managed
end-points
● Ecosystem
leverage
Flexibility Scalability Re-Usability
Distributed
Integration
DISTRIBUTED INTEGRATION - Microservice
microservice by
Red Hat JBoss Fuse
● Lightweight
○ Spring Boot deployment
○ DSL
○ S2i
● Pattern Based
○ Enterprise Integration Pattern
● Reusable Connector
○ Camel components
Building microservice with Fuse
RED HAT JBOSS FUSE
microservice
160+
Smart Endpoints
Twitter
FB
Salesforce
SaaS
Database
Msg
Broker
Kafka
….
XML
JSON
HL7
…...
HTTP
Netty
FTP
….
REST
API
Resource
Connector
….
Composing Microservice with Fuse
RED HAT JBOSS FUSE
microservice microservice microservice microservice
microservice
Enterprise
Integration
Patterns
Red Hat JBoss Fuse
APACHE CAMEL
SPRING-BOOT APACHE KARAF
CONTAINER
OPENSHIFT
JBOSS
DEVELOPER
STUDIO
Camel define routing
and mediation rules
based on Enterprise
Integration Pattern and
with 160+ built-in
components
7
WHAT IS APACHE CAMEL?
Split
orders
Send
each order
to it’s
process service
Electronics
Others
Customer
Purchase
from("file:work/cbr/input")
.split(xpath("//orders"))
.choice()
.when(xpath("/order:order/order:type = 'E'"))
.to("activemq:queue:electronic/us")
.otherwise()
.recipientList(simple("http4://otherservice"));
8
WHAT IS APACHE CAMEL?
<route id="cbr-route">
<from id="_from1" uri="file:work/cbr/input"/>
<split id="_split1">
<xpath>//orders</xpath>
<choice id="_choice1">
<when id="_when1">
<xpath>/order:order/order:type = 'E'</xpath>
<to id="_to1" uri="activemq:queue:electronic"/>
</when>
<otherwise id="_otherwise1">
<recipientList id="_recipientList1">
<simple>http4://otherservice</simple>
</recipientList>
</otherwise>
</choice>
</split>
</route>
9
PATTERN BASED
Split
orders
Send
each order
to it’s
process service
Electronics
Others
Aggregator
Normalizer
Content Enricher
Resequencer
10
CAMEL DSL
JBOSS
DEVELOPER
STUDIO
Java DSL
Blueprint DSL (XML)
Spring DSL (XML)
11
ENDPOINT CONFIGURATION
file://myfolder/directory? delete=true&readLock=changed
Programmatic Example:
FileEndpoint fileEp = new FileEndpoint();
fileEp.setFile(new File(“/myfolder/directory”));
fileEp.setDelete(true);
fileEp.setReadLock(“changed”);
from(fileEp).to(...);
URI Example:
Component
Name Configuration
Parameters
12
CAMEL BEAN INJECTION
<beans ....>
<bean class="org.apache.camel.component.servlet.CamelHttpTransportServlet"
id="camelHttpTransportServlet"/>
<bean
class="org.springframework.boot.web.servlet.ServletRegistrationBean" id="servlet">
<property name="name" value="CamelServlet"/>
<property name="servlet" ref="camelHttpTransportServlet"/>
<property name="urlMappings" value="/demos/*"/>
</bean>
<bean class="com.redhat.fisdemoblockchain.MockBitcoinApp" id="mockBitcoinApp"/>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route>
<!-- … -->
<route>
</camelContext>
</beans>
@BeanInject("mockBitcoinApp")
MockBitcoinApp mockBitcoinApp;
13
160+ ENDPOINT COMPONENTS
14
160+ ENDPOINT COMPONENTS
15
CAMEL ROUTE
Producer
● Produce requests
● End of route
● Dispatching outgoing
requests
Consumer
● Consume requests
● Start of a route
● Dispatching
outgoing replies
Processor
● Intermediate node in
the pipeline
● standard processors
or customized ones
TESTING
<route id="cbr-route">
<from id="_from1" uri="file:work/cbr/input"/>
<choice id="_choice1">
<when id="_when1">
<xpath>/order:order/order:type = 'E'</xpath>
<to id="_to1" uri="activemq:queue:electronic"/>
</when>
<otherwise id="_otherwise1">
<to id="_to1" uri="activemq:queue:others"/>
</otherwise>
</choice>
</route> public void configure() throws Exception {
// mock the for testing
interceptSendToEndpoint("activemq:queue:electronic")
.skipSendToOriginalEndpoint()
.to("mock:catchElectronic");
}
CAMEL SPRING BOOT TESTING EXAMPLE
@RunWith(SpringRunner.class)
@ActiveProfiles("dev")
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class ApplicationTest {
@Autowired
private TestRestTemplate restTemplate;
@Autowired
private CamelContext camelContext;
@Test
public void testProfile() {
ResponseEntity<Accounts> profileResponse
= restTemplate.getForEntity("/demos/account/profile/123456", Accounts.class);
assertThat(profileResponse.getStatusCode()).isEqualTo(HttpStatus.OK);
Accounts account = profileResponse.getBody();
assertThat(account.getAcctname()).isEqualTo("Simon C");
assertThat(account.getBalance()).isEqualTo(5000);
assertThat(account.getAddr()).isEqualTo("43 SLIVER EAGLE ST, RIVER");
}
}
INSERT DESIGNATOR, IF NEEDED18
CAMEL BLUEPRINT TESTING EXAMPLE
public class BlueprintCBRTest extends CamelBlueprintTestSupport {
@Produce(uri = "file:work/cbr/input")
protected ProducerTemplate inputEndpoint;
@EndpointInject(uri = "mock:outputUK")
protected MockEndpoint outputEndpointUK;
@Test
public void testCamelRoute() throws Exception {
// Create routes from the output endpoints to our mock endpoints so we
// can assert expectations
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("file:work/cbr/output/uk").to(outputEndpointUK);
}
});
String value1 = getFileContents("src/test/resources/data/order1.xml");
outputEndpointUK.expectedMessageCount(2);
assertMockEndpointsSatisfied();
}
}
Building microservice with Fuse
RED HAT JBOSS FUSE
microservice
160+
Smart Endpoints
Twitter
FB
Salesforce
SaaS
Database
Msg
Broker
Kafka
….
XML
JSON
HL7
…...
HTTP
Netty
FTP
….
REST
API
Resource
Connector
….
Composing Microservice with FUSE
RED HAT JBOSS FUSE
microservice microservice microservice microservice
microservice
Enterprise
Integration
Patterns
INSERT DESIGNATOR, IF NEEDED21
MORE INFORMATION
● Camel in Action
● Apache Camel Developer’s
Cookbook
● Community website
○ http://camel.apache.org/
LAB ONE
API First
API
Multiple Device
Support
Device are not
limited to
screen
Voice enable
Drome, VR
Customer/
Vendor/
Partner
More complex
ecosystem
SaaS
Frequency
Data volume
Monetize
Service
Increased
revenue
market share
Open up new
opportunities
Modularize and
agility
Enhanced
developer
experience
Reuse code
Hide
implementation
details
Scalability in
Distributed
System
Able to flexibly
allocate
resource
Cloud enabled
Agile Integration
● Well defined, re-usable, and
well managed end-points
● Ecosystem leverage● Lightweight
● Pattern Based
● Reusable
Connectors
● Microservice Based
● Cloud native
solutions
● Lean artifacts,
individually
deployable
● Container based
scaling and high
availability
Re-UsabilityFlexibility Scalability
API
API FIRST
microservice by
RED HAT JBOSS FUSE
REST DSL
Swagger
API Doc
API
Data
Format Transform
microservice by
RED HAT JBOSS FUSE
API
microservice by
RED HAT JBOSS FUSE
Consume
Exposes
3ScaleAPImanagement
External clients
Community,
Partners,
Customers
INSERT DESIGNATOR, IF NEEDED27
CONVERTING BETWEEN DATA FORMAT
● Marshal
○ Java Bean → Textual format
● Unmarshal
○ Textual, Binary format → Java Bean
● Dozer
○ Fine-grained integration
■ mapping literal values
■ Use expressions
28
DIFFERENT DATA FORMAT
29
MARSHAL/UNMARSHAL WITH TOOLS
<marshal>
<xmljson/>
</marshal>
<marshal>
<bindy classtype=”example.Product" type="Csv">
</marshal>
<marshal>
<jaxb partClass=“example.TradeOrder” contextPath=“example"/>
</marshal>
30
DATA FORMAT EXAMPLE
Input XML File:
<root>
<child1>text1</child1>
<child2>text2</child2>
</root>
Camel Route:
...
from(“file:///xmlsourcedir”)
.unmarshal().jaxb()
.process(...)
.marshal().json()
.to(“file:///jsondestdir”);
...
Output JSON File:
{"root":
{"child1": "text1",
"child2": "text2"}
}
DOZER and TOOLING
XML
JSON
JAVA
Customize
Drag and drop
mapping
Set property
Set variable
Set expression
Add transformation
Add custom
transformation
REST DSL
<camelContext xmlns="http://camel.apache.org/schema/spring">
<rest path="/say">
<get uri="/hello">
<to uri="direct:hello"/>
</get>
<get uri="/bye" consumes="application/json">
<to uri="direct:bye"/>
</get>
<post uri="/bye">
<to uri="mock:update"/>
</post>
</rest>
<route>
<from uri="direct:hello"/> …
</route>
<route>
<from uri="direct:bye"> …
</route>
</camelContext>
Verb
defining
http
method
Basepath
The service
path
Uri template
The service
method and
parameters
Consumes
Accept data format
setting
REST DSL
<restConfiguration bindingMode="auto" component="servlet" port="8080"/>
Message Body Direction Binding Mode Message Body
XML Incoming auto, xml, json_xml POJO
POJO Outgoing auto, xml, json_xml XML
JSON Incoming auto, xml, json_xml POJO
POJO Outgoing auto, xml, json_xml JSON
● camel-netty4-http
● camel-jetty
● camel-servlet
● camel-undertow
APPLYING API BEST PRACTICES
Simply but concrete naming for the URI.
Use HTTP Method for CRUD if possible:
● READ -> GET
● CREATE -> PUT
● UPDATE -> POST
● DELETE -> DELETE
● Globally recognized standard, easy consumable
<get uri="customer/{customerid}">
<to uri="direct:getCustomerinfo"/>
</get>
<get uri="product/{id}">
<to uri="direct:productInventory"/>
</get>
<get uri="account/profile/{acctid}">
<to uri="direct:getprofile"/>
</get>
APPLYING API BEST PRACTICES
Make the most out of HTTP Errors
Setting the right granularity of data and using the common data format
Clear automatic generated documentation
SERVICE RESILIENCE
JBoss Fuse
microservice
API
JBoss Fuse
microservice
API
microservice
microservice
API
microservice
microservice
API
Chain reaction
JBoss Fuse
microservice
API
SLOW!!
Client
Circuit Breaker
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:start"/>
<hystrix>
<to uri="http://fooservice.com/slow"/>
<onFallback>
<transform>
<constant>Fallback message</constant>
</transform>
</onFallback>
</hystrix>
<to uri="mock:result"/>
</route>
</camelContext>
JBoss Fuse
microservice
API
API
Service SaaS
Slow! No
response!
Timeout
Fallback
Continuous Improvement
Building APIs
● Native support
● Intuitive tooling
● Light weight
● Flexible service
and code re-use
from backend
Deploy APIs
● Flexibility to scale
● Load balancing
● zero downtime
● Security
Distributing APIs
● Authorization
● Clear documentation
● Enforce policies
● Community
Performance Analyst
● Number of Hits
● Average response time
● Revenue earned
Business alignment
● Change in market
● Government regulation
● New service launch
Versioning
● Retire
● Update
● New Service
● Internal service
re-creation
API
API FIRST
microservice by
RED HAT JBOSS FUSE
REST DSL
Swagger
API Doc
API
Data
Format Transform
microservice by
RED HAT JBOSS FUSE
API
microservice by
RED HAT JBOSS FUSE
Consume
Exposes
3ScaleAPImanagement
External clients
Community,
Partners,
Customers
LAB TWO
CONTAINER
Agile Integration
●
●
● Cloud native solutions
● Lean artifacts, individually
deployable
● Container based scaling
and high availability
● Lightweight
● Pattern Based
● Reusable
Connectors
● Community
Sourced
● Well defined,
re-usable, and well
managed
end-points
● Ecosystem
leverage
ScalabilityFlexibility Re-Usability
Container
OPENSHIFT
CONTAINER
Developer’s Local Env (laptop, desktop)
CDK
JBDS
VCS (Git)
Build
Run
Test
Jenkins
Nexus
(Library
Management)
Deployment Pipeline
Automatic Testing
Release management
Failure feedback
● Speed, Size, Stability
● Sandboxed application processes on a shared
Linux OS kernel
● Simpler, lighter, and denser than virtual
machines
● Portable across different environments
● Speed, Choice, Sandbox
● Package my application and all of its
dependencies
● Deploy to any environment in seconds and
enable CI/CD
● Easily access and share containerized
components
Sys-Admins / Ops Developers
It Depends on Who You Ask
What Are Containers?
4
5
RUN CONTAINERS AT SCALE - SOLVE THESE
JBOSS EAP
JBOSS DATA GRID
JBOSS DATA
VIRTUALIZATION
JBOSS AM-Q
JBOSS BRMS
JBOSS BPM
JBOSS FUSE
RED HAT MOBILE
3 Scale
Container
Business
Automation
Container
Integration
Container
Data &
Storage
Container
Web &
Mobile
Traditional, Stateful, and Microservices-based Apps
OpenShift Application Lifecycle Management
(CI/CD)
Build Automation Deployment Automation
Service Catalog
(Language Runtimes, Middleware, Databases)
Self-Service
Infrastructure Automation & Cockpit
Networking Storage Registry
Logs &
Metrics
Security
Container Orchestration & Cluster Management
(kubernetes)
Container Runtime & Packaging
(Docker)
Enterprise Container Host
Red Hat Enterprise LinuxAtomic Host
OPENSHIFT TECHNICAL OVERVIEW47
OPENSHIFT ARCHITECTURE
EXISTING
AUTOMATION
TOOLSETS
SCM
(GIT)
CI/CD
SERVICE LAYER
ROUTING LAYER
PERSISTENT
STORAGE
REGISTRY
RHEL
NODE
c
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
C
C
C C
C
C
C CC C
RED HAT
ENTERPRISE LINUX
MASTER
API/AUTHENTICATION
DATA STORE
SCHEDULER
HEALTH/SCALING
PHYSICAL VIRTUAL PRIVATE PUBLIC HYBRID
OPENSHIFT TECHNICAL OVERVIEW48
YOUR CHOICE OF INFRASTRUCTURE
PHYSICAL VIRTUAL PRIVATE PUBLIC HYBRID
OPENSHIFT TECHNICAL OVERVIEW
NODES RHEL INSTANCES WHERE APPS RUN
49
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
PHYSICAL VIRTUAL PRIVATE PUBLIC HYBRID
OPENSHIFT TECHNICAL OVERVIEW
RHEL
NODE
c
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
C
C
C C
C
C
C CC C
APPS RUN IN CONTAINERS
50
Container
Image
Container
Pod
OPENSHIFT TECHNICAL OVERVIEW51
PODS ARE THE UNIT OF ORCHESTRATION
RHEL
NODE
c
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
C
C
C C
C
C
C CC C
OPENSHIFT TECHNICAL OVERVIEW
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
RHEL
NODE
52
MASTERS ARE THE CONTROL PLANE
RED HAT
ENTERPRISE LINUX
MASTER
PHYSICAL VIRTUAL PRIVATE PUBLIC HYBRID
OPENSHIFT
POD
● A small group of tightly coupled
Containers
● Ensures collocation
● Docker containers share resources
within the pod
○ Volumes
○ Network / IP
○ Port space
○ CPU / Mem allocations
● Pod health probes
OPENSHIFT
PODS EXPOSE AS SERVICE
● Defines a group of Pods and how to access them
○ Labels and Selectors
● Decouple providers and accessors of services
● Don’t depend on Pod IPs directly
● Use a single IP that doesn’t change
● Virtual IP load balancing and discovery
POD
SERVICE
POD
10.0.1.1 10.0.1.2
CLIENT Name: amq
IP: 170.30.10.10
SERVICE DISCOVERY
POD
SERVICE
POD
10.0.1.
1
10.0.1.2
CLIENT Name: amq
IP: 170.30.10.10
POD
10.0.1.3
Service label
common label you apply to
each of the pods
Service proxy
single IP address that other
services can call
OPENSHIFT
FAILURE RECOVERY
POD
SERVICE
PODPOD
SERVICE
POD
ROUTE
POD
Rebalance traffics
Redirect request to
available Pods
Replace failing pod
Starts another pod and
bind to serviceHealth Checks
periodically performs
diagnostics on a running
container.
REPLICATION CONTROLLER
● Ensures that a specified number of Pod
replicas is running
● Holds Pod Templates for creating new
Pods
● Autoscaling
● Rolling Updates
OPENSHIFT
BUILDING IMAGES
● Build strategies
○ Source Source-to-Image (S2I)
○ Binary Source-to-Image (S2I)
OPENSHIFT
S2I
Docker
Custom
Git
Dockerfile
Binary
Image Build Docker Image
Build
Source
Build
Strategy
OPENSHIFT
codeGit
Repository
Source-to-Image
(S2I)
Application
Container
deploy
CODE
BUILD
DEPLOY
Container
Image
Image
Registry
OPSDEV
BUILDING IMAGES
OPENSHIFT
PIPELINE
OpenShift
Jekins
Image
Repository
Git
Pods
Build
Deploy
Webhook
Git push
Pipeline
starts
Build
application
image
Running application
container in different
environment
OPENSHIFT
PIPELINE
node('maven') {
stage('build') {
openshiftBuild(buildConfig: 'buildconfigname', showBuildLogs: 'true')
}
stage('staging') {
openshiftDeploy(deploymentConfig: 'deploymentconfigame')
}
….
}
OPENSHIFT
● Deployment strategy determines the deployment process for containers
● Rolling strategy
○ Performs rolling updates
○ Supports life-cycle hooks for injecting code into deployment process
○ Waits for pods to pass readiness check before scaling down old components
○ Used by default if no strategy specified on deployment configuration
● Recreate strategy
○ Has basic rollout behavior
○ Scales down previous deployment before deploying the new one
○ Supports life-cycle hooks for injecting code into deployment process
● Custom strategy for custom deployment behaviour
DEPLOYMENTS
OPENSHIFT
● Reducing downtime and risk associated with release
● Two identical environments in containing two
different releases (Blue and Green)
● After validating new release, can switch all traffic to
new version
● Quickly roll application back if you find issues
BLUE-GREEN DEPLOYMENT
router
OPENSHIFT
● A/B testing is a way of testing features in
application for various reasons like usability,
popularity, noticeability, etc
● Usually associated with application UI however
the back-end services need to be available
● Can implement with either application-level or
static switches
A/B DEPLOYMENT
OPENSHIFT
CONTAINER
Developer’s Local Env (laptop, desktop)
CDK
JBDS
VCS (Git)
Build
Run
Test
Jenkins
Nexus
(Library
Management)
Deployment Pipeline
Automatic Testing
Release management
Failure feedback
LAB THREE
API Management
Take Control of Your APIs
Creating & Exposing APIs is just the start
Security &
Authentication
Version Control
Documentation
Policies
Access Control
Monitoring
Lifecycle
Management
Provisioning
Alerts
Metering & Billing
Testing
Portal
Scalability
Reliability
API Life-cycle
The API Lifecycle Management Approach
DEFINE: Identify the API services that deliver value to
the business layer
DEVELOP: Design, code, test, document standardize
templates
PUBLISH: Run security with defined policies and
controls
SUPPORT: Offer community, forums, documentation to
interact and collaborate
RETIRE: EOL, un-publish, communicate and remove
from market place following version control best
practice
3scale API Management
RBDMS
SAP
NoSQL
WS
REST
JMS
+ more
FUSE INTEGRATION
SERVICE
JBoss Fuse
Service API
JBoss Fuse
Service API
JBoss Fuse
Service API
Developers
Partners
Mobile App
Affiliates
Internal Projects
+ more
API MANAGEMENT
Access control and
security
API contracts and
rate limits
Analytics and
reporting
Developer portal and
docs
Billing and payments
3Scale API Management
Stack
Access control Security
API contracts Rate limits
Analytics Reporting
Dev portal Docs
Billing Payments
Admin Console
Dev Portal
API
Management
Traffic Manager
APIs
Applications
Consumers
HTTP / HTTPS
Security, usage &
rate limits
3Scale API Management
Components - Flexible Distributed Control
Developers
Sync / Authorize
Mobile
Apps
Developer
Apps
Real Time
Admin Portal
Branded
Developer Portal
Swagger
Doc API Provider
Administrators
API ProvidersAPI GatewayAPI Consumers
API Manager
3scale on OpenShift
microservice
microservice
microservice
OpenShift
3scale
Proxy
CLIENT
JBoss Fuse
microservice
API
3scale API Management
Platform
Deployment Options
Full SaaS: Hosted API Manager & API Gateways
Real Time Admin Portal
Sync / Authorize
API Provider
API Gateway API Manager
API Provider
Administrators
Mobile Apps Developer Apps
Branded Dev PortalSwagger Doc
API Consumers
Developers
Deployment Options
Hybrid: Hosted Manager - Self-managed Gateway
Real Time Admin Portal
Sync / Authorize
API Provider
API Gateway API Manager
API Provider
Administrators
Mobile Apps Developer Apps
Branded Dev PortalSwagger Doc
Developers
API Consumers
Deployment Options
Full On-Premise
Real Time Admin Portal
Sync / Authorize
API Provider
API Gateway
(Openshift)
API Manager
API Provider
Administrators
Mobile Apps Developer Apps
Branded Dev PortalSwagger Doc
API Consumers
Developers
Deployment Options
On-premise: Self-managed APIs
Real Time Admin Portal
Sync / Authorize
API Provider
API Gateway
(Openshift)
API Manager
API Provider
Administrators
Mobile Apps Developer Apps
Branded Dev PortalSwagger Doc
API Consumers
Developers
Deployment Options
On-premise: Self-managed APIs & External Self-managed Gateway
Real Time Admin Portal
Sync / Authorize
API Provider
API Gateway
(Native/Docker)
API Manager
API Provider
Administrators
Mobile Apps Developer Apps
Branded Dev PortalSwagger Doc
API Consumers
Developers
3scale API Management
RBDMS
SAP
NoSQL
WS
REST
JMS
+ more
FUSE INTEGRATION
SERVICE
JBoss Fuse
Service API
JBoss Fuse
Service API
JBoss Fuse
Service API
Developers
Partners
Mobile App
Affiliates
Internal Projects
+ more
API MANAGEMENT
Access control and
security
API contracts and
rate limits
Analytics and
reporting
Developer portal and
docs
Billing and payments
LAB FOUR
Summary
83
Gartner
Magic Quadrant
Full API Lifecycle Management
(2016)
AGILE INTEGRATION
API Management
PaaS
Gateway
Automation
Layered microservice
AGILE INTEGRATION
Cloud native solutions
Lean artifacts,
individually deployable
Container based scaling
and high availability
● Lightweight
● Pattern Based
● Reusable
Connectors
● Microservice Based
● Cloud native
solutions
● Lean artifacts,
individually
deployable
● Container based
scaling and high
availability
● Well defined,
re-usable, and well
managed end-points
● Ecosystem leverage
Flexibility Scalability Re-Usability
THANK YOU
plus.google.com/+RedHat
linkedin.com/company/red-hat
youtube.com/user/RedHatVideos
facebook.com/redhatinc
twitter.com/RedHatNews

Weitere ähnliche Inhalte

Was ist angesagt?

Portfolio
PortfolioPortfolio
Portfolio
addl D
 
Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud
Shekhar Gulati
 

Was ist angesagt? (20)

Cloud Foundry for Spring Developers
Cloud Foundry for Spring DevelopersCloud Foundry for Spring Developers
Cloud Foundry for Spring Developers
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
What’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBWhat’s New in Spring Data MongoDB
What’s New in Spring Data MongoDB
 
Spring5 New Features - Nov, 2017
Spring5 New Features - Nov, 2017Spring5 New Features - Nov, 2017
Spring5 New Features - Nov, 2017
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
ApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platformApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platform
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
Portfolio
PortfolioPortfolio
Portfolio
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
 
Java 9 Modularity in Action
Java 9 Modularity in ActionJava 9 Modularity in Action
Java 9 Modularity in Action
 
Micro service architecture
Micro service architectureMicro service architecture
Micro service architecture
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
JavaOne 2015: 12 Factor App
JavaOne 2015: 12 Factor AppJavaOne 2015: 12 Factor App
JavaOne 2015: 12 Factor App
 
Game of Streams: How to Tame and Get the Most from Your Messaging Platforms
Game of Streams: How to Tame and Get the Most from Your Messaging PlatformsGame of Streams: How to Tame and Get the Most from Your Messaging Platforms
Game of Streams: How to Tame and Get the Most from Your Messaging Platforms
 
Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud
 
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan FelchGR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
 
Modern web application development with java ee 7
Modern web application development with java ee 7Modern web application development with java ee 7
Modern web application development with java ee 7
 

Ähnlich wie Red Hat Agile integration Workshop Labs

Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
Ted Pennings
 
Using Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel JockeyUsing Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel Jockey
Bruce Snyder
 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.js
Soós Gábor
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
intelliyole
 
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
 

Ähnlich wie Red Hat Agile integration Workshop Labs (20)

Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012Integrating SAP the Java EE Way - JBoss One Day talk 2012
Integrating SAP the Java EE Way - JBoss One Day talk 2012
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShift
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Cutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQueryCutting Edge Data Processing with PHP & XQuery
Cutting Edge Data Processing with PHP & XQuery
 
Using Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel JockeyUsing Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel Jockey
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
Kerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit eastKerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit east
 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.js
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMS
 
Spring framework part 2
Spring framework part 2Spring framework part 2
Spring framework part 2
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
JBoss AS Upgrade
JBoss AS UpgradeJBoss AS Upgrade
JBoss AS Upgrade
 
Single page webapps & javascript-testing
Single page webapps & javascript-testingSingle page webapps & javascript-testing
Single page webapps & javascript-testing
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
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...
 
Azure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshopAzure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshop
 

Mehr von Judy Breedlove

Mehr von Judy Breedlove (20)

Putting data to work
Putting data to workPutting data to work
Putting data to work
 
Agile integration activation: get hands on with ap-is
Agile integration activation: get hands on with ap-isAgile integration activation: get hands on with ap-is
Agile integration activation: get hands on with ap-is
 
The 3 pillars of agile integration: Container, Connector and API
The 3 pillars of agile integration:  Container, Connector and APIThe 3 pillars of agile integration:  Container, Connector and API
The 3 pillars of agile integration: Container, Connector and API
 
Preparing your organization for microservices
Preparing your organization for microservicesPreparing your organization for microservices
Preparing your organization for microservices
 
Transform the internal it landscape with APIs and integration
Transform the internal it landscape with APIs and integrationTransform the internal it landscape with APIs and integration
Transform the internal it landscape with APIs and integration
 
An API-focused approach to Agile Integration
An API-focused approach to Agile IntegrationAn API-focused approach to Agile Integration
An API-focused approach to Agile Integration
 
Introduction to red hat agile integration (Red Hat Workshop)
Introduction to red hat agile integration (Red Hat Workshop)Introduction to red hat agile integration (Red Hat Workshop)
Introduction to red hat agile integration (Red Hat Workshop)
 
An API-focused approach to Agile Integration
An API-focused approach to Agile IntegrationAn API-focused approach to Agile Integration
An API-focused approach to Agile Integration
 
Transform the internal it landscape with APIs
Transform the internal it landscape with APIsTransform the internal it landscape with APIs
Transform the internal it landscape with APIs
 
The Three Pillars of Agile Integration: Connector, Container & API
The Three Pillars of Agile Integration: Connector, Container & APIThe Three Pillars of Agile Integration: Connector, Container & API
The Three Pillars of Agile Integration: Connector, Container & API
 
Microservices, containers and event driven architecture - key factors in agil...
Microservices, containers and event driven architecture - key factors in agil...Microservices, containers and event driven architecture - key factors in agil...
Microservices, containers and event driven architecture - key factors in agil...
 
Navigating Cloud Adoption: Trends that Challenge and Inspire Designers
Navigating Cloud Adoption:  Trends that Challenge and Inspire DesignersNavigating Cloud Adoption:  Trends that Challenge and Inspire Designers
Navigating Cloud Adoption: Trends that Challenge and Inspire Designers
 
Monoliths to microservices workshop
Monoliths to microservices workshopMonoliths to microservices workshop
Monoliths to microservices workshop
 
Evolution of integration and microservices patterns with service mesh
Evolution of integration and microservices patterns with service meshEvolution of integration and microservices patterns with service mesh
Evolution of integration and microservices patterns with service mesh
 
The Future of Cloud Native Apps - Chicago Intro
The Future of Cloud Native Apps - Chicago IntroThe Future of Cloud Native Apps - Chicago Intro
The Future of Cloud Native Apps - Chicago Intro
 
Serverless and serverfull - where microservices compliments serverless
Serverless and serverfull - where microservices compliments serverlessServerless and serverfull - where microservices compliments serverless
Serverless and serverfull - where microservices compliments serverless
 
Cloud-Native Microservices
Cloud-Native MicroservicesCloud-Native Microservices
Cloud-Native Microservices
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolithAgile integration: Decomposing the monolith
Agile integration: Decomposing the monolith
 
Microservices, containers and event driven architecture - key factors in agil...
Microservices, containers and event driven architecture - key factors in agil...Microservices, containers and event driven architecture - key factors in agil...
Microservices, containers and event driven architecture - key factors in agil...
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Red Hat Agile integration Workshop Labs

  • 2. Agile Integration ● Lightweight ● Pattern Based ● Reusable Connectors ● Microservices Based ● Cloud native solutions ● Lean artifacts, individually deployable ● Container based scaling and high availability ● Well defined, re-usable, and well managed end-points ● Ecosystem leverage Flexibility Scalability Re-Usability Distributed Integration
  • 3. DISTRIBUTED INTEGRATION - Microservice microservice by Red Hat JBoss Fuse ● Lightweight ○ Spring Boot deployment ○ DSL ○ S2i ● Pattern Based ○ Enterprise Integration Pattern ● Reusable Connector ○ Camel components
  • 4. Building microservice with Fuse RED HAT JBOSS FUSE microservice 160+ Smart Endpoints Twitter FB Salesforce SaaS Database Msg Broker Kafka …. XML JSON HL7 …... HTTP Netty FTP …. REST API Resource Connector ….
  • 5. Composing Microservice with Fuse RED HAT JBOSS FUSE microservice microservice microservice microservice microservice Enterprise Integration Patterns
  • 6. Red Hat JBoss Fuse APACHE CAMEL SPRING-BOOT APACHE KARAF CONTAINER OPENSHIFT JBOSS DEVELOPER STUDIO Camel define routing and mediation rules based on Enterprise Integration Pattern and with 160+ built-in components
  • 7. 7 WHAT IS APACHE CAMEL? Split orders Send each order to it’s process service Electronics Others Customer Purchase from("file:work/cbr/input") .split(xpath("//orders")) .choice() .when(xpath("/order:order/order:type = 'E'")) .to("activemq:queue:electronic/us") .otherwise() .recipientList(simple("http4://otherservice"));
  • 8. 8 WHAT IS APACHE CAMEL? <route id="cbr-route"> <from id="_from1" uri="file:work/cbr/input"/> <split id="_split1"> <xpath>//orders</xpath> <choice id="_choice1"> <when id="_when1"> <xpath>/order:order/order:type = 'E'</xpath> <to id="_to1" uri="activemq:queue:electronic"/> </when> <otherwise id="_otherwise1"> <recipientList id="_recipientList1"> <simple>http4://otherservice</simple> </recipientList> </otherwise> </choice> </split> </route>
  • 9. 9 PATTERN BASED Split orders Send each order to it’s process service Electronics Others Aggregator Normalizer Content Enricher Resequencer
  • 11. 11 ENDPOINT CONFIGURATION file://myfolder/directory? delete=true&readLock=changed Programmatic Example: FileEndpoint fileEp = new FileEndpoint(); fileEp.setFile(new File(“/myfolder/directory”)); fileEp.setDelete(true); fileEp.setReadLock(“changed”); from(fileEp).to(...); URI Example: Component Name Configuration Parameters
  • 12. 12 CAMEL BEAN INJECTION <beans ....> <bean class="org.apache.camel.component.servlet.CamelHttpTransportServlet" id="camelHttpTransportServlet"/> <bean class="org.springframework.boot.web.servlet.ServletRegistrationBean" id="servlet"> <property name="name" value="CamelServlet"/> <property name="servlet" ref="camelHttpTransportServlet"/> <property name="urlMappings" value="/demos/*"/> </bean> <bean class="com.redhat.fisdemoblockchain.MockBitcoinApp" id="mockBitcoinApp"/> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <route> <!-- … --> <route> </camelContext> </beans> @BeanInject("mockBitcoinApp") MockBitcoinApp mockBitcoinApp;
  • 15. 15 CAMEL ROUTE Producer ● Produce requests ● End of route ● Dispatching outgoing requests Consumer ● Consume requests ● Start of a route ● Dispatching outgoing replies Processor ● Intermediate node in the pipeline ● standard processors or customized ones
  • 16. TESTING <route id="cbr-route"> <from id="_from1" uri="file:work/cbr/input"/> <choice id="_choice1"> <when id="_when1"> <xpath>/order:order/order:type = 'E'</xpath> <to id="_to1" uri="activemq:queue:electronic"/> </when> <otherwise id="_otherwise1"> <to id="_to1" uri="activemq:queue:others"/> </otherwise> </choice> </route> public void configure() throws Exception { // mock the for testing interceptSendToEndpoint("activemq:queue:electronic") .skipSendToOriginalEndpoint() .to("mock:catchElectronic"); }
  • 17. CAMEL SPRING BOOT TESTING EXAMPLE @RunWith(SpringRunner.class) @ActiveProfiles("dev") @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) public class ApplicationTest { @Autowired private TestRestTemplate restTemplate; @Autowired private CamelContext camelContext; @Test public void testProfile() { ResponseEntity<Accounts> profileResponse = restTemplate.getForEntity("/demos/account/profile/123456", Accounts.class); assertThat(profileResponse.getStatusCode()).isEqualTo(HttpStatus.OK); Accounts account = profileResponse.getBody(); assertThat(account.getAcctname()).isEqualTo("Simon C"); assertThat(account.getBalance()).isEqualTo(5000); assertThat(account.getAddr()).isEqualTo("43 SLIVER EAGLE ST, RIVER"); } }
  • 18. INSERT DESIGNATOR, IF NEEDED18 CAMEL BLUEPRINT TESTING EXAMPLE public class BlueprintCBRTest extends CamelBlueprintTestSupport { @Produce(uri = "file:work/cbr/input") protected ProducerTemplate inputEndpoint; @EndpointInject(uri = "mock:outputUK") protected MockEndpoint outputEndpointUK; @Test public void testCamelRoute() throws Exception { // Create routes from the output endpoints to our mock endpoints so we // can assert expectations context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("file:work/cbr/output/uk").to(outputEndpointUK); } }); String value1 = getFileContents("src/test/resources/data/order1.xml"); outputEndpointUK.expectedMessageCount(2); assertMockEndpointsSatisfied(); } }
  • 19. Building microservice with Fuse RED HAT JBOSS FUSE microservice 160+ Smart Endpoints Twitter FB Salesforce SaaS Database Msg Broker Kafka …. XML JSON HL7 …... HTTP Netty FTP …. REST API Resource Connector ….
  • 20. Composing Microservice with FUSE RED HAT JBOSS FUSE microservice microservice microservice microservice microservice Enterprise Integration Patterns
  • 21. INSERT DESIGNATOR, IF NEEDED21 MORE INFORMATION ● Camel in Action ● Apache Camel Developer’s Cookbook ● Community website ○ http://camel.apache.org/
  • 24. API Multiple Device Support Device are not limited to screen Voice enable Drome, VR Customer/ Vendor/ Partner More complex ecosystem SaaS Frequency Data volume Monetize Service Increased revenue market share Open up new opportunities Modularize and agility Enhanced developer experience Reuse code Hide implementation details Scalability in Distributed System Able to flexibly allocate resource Cloud enabled
  • 25. Agile Integration ● Well defined, re-usable, and well managed end-points ● Ecosystem leverage● Lightweight ● Pattern Based ● Reusable Connectors ● Microservice Based ● Cloud native solutions ● Lean artifacts, individually deployable ● Container based scaling and high availability Re-UsabilityFlexibility Scalability API
  • 26. API FIRST microservice by RED HAT JBOSS FUSE REST DSL Swagger API Doc API Data Format Transform microservice by RED HAT JBOSS FUSE API microservice by RED HAT JBOSS FUSE Consume Exposes 3ScaleAPImanagement External clients Community, Partners, Customers
  • 27. INSERT DESIGNATOR, IF NEEDED27 CONVERTING BETWEEN DATA FORMAT ● Marshal ○ Java Bean → Textual format ● Unmarshal ○ Textual, Binary format → Java Bean ● Dozer ○ Fine-grained integration ■ mapping literal values ■ Use expressions
  • 29. 29 MARSHAL/UNMARSHAL WITH TOOLS <marshal> <xmljson/> </marshal> <marshal> <bindy classtype=”example.Product" type="Csv"> </marshal> <marshal> <jaxb partClass=“example.TradeOrder” contextPath=“example"/> </marshal>
  • 30. 30 DATA FORMAT EXAMPLE Input XML File: <root> <child1>text1</child1> <child2>text2</child2> </root> Camel Route: ... from(“file:///xmlsourcedir”) .unmarshal().jaxb() .process(...) .marshal().json() .to(“file:///jsondestdir”); ... Output JSON File: {"root": {"child1": "text1", "child2": "text2"} }
  • 31. DOZER and TOOLING XML JSON JAVA Customize Drag and drop mapping Set property Set variable Set expression Add transformation Add custom transformation
  • 32. REST DSL <camelContext xmlns="http://camel.apache.org/schema/spring"> <rest path="/say"> <get uri="/hello"> <to uri="direct:hello"/> </get> <get uri="/bye" consumes="application/json"> <to uri="direct:bye"/> </get> <post uri="/bye"> <to uri="mock:update"/> </post> </rest> <route> <from uri="direct:hello"/> … </route> <route> <from uri="direct:bye"> … </route> </camelContext> Verb defining http method Basepath The service path Uri template The service method and parameters Consumes Accept data format setting
  • 33. REST DSL <restConfiguration bindingMode="auto" component="servlet" port="8080"/> Message Body Direction Binding Mode Message Body XML Incoming auto, xml, json_xml POJO POJO Outgoing auto, xml, json_xml XML JSON Incoming auto, xml, json_xml POJO POJO Outgoing auto, xml, json_xml JSON ● camel-netty4-http ● camel-jetty ● camel-servlet ● camel-undertow
  • 34. APPLYING API BEST PRACTICES Simply but concrete naming for the URI. Use HTTP Method for CRUD if possible: ● READ -> GET ● CREATE -> PUT ● UPDATE -> POST ● DELETE -> DELETE ● Globally recognized standard, easy consumable <get uri="customer/{customerid}"> <to uri="direct:getCustomerinfo"/> </get> <get uri="product/{id}"> <to uri="direct:productInventory"/> </get> <get uri="account/profile/{acctid}"> <to uri="direct:getprofile"/> </get>
  • 35. APPLYING API BEST PRACTICES Make the most out of HTTP Errors Setting the right granularity of data and using the common data format Clear automatic generated documentation
  • 36. SERVICE RESILIENCE JBoss Fuse microservice API JBoss Fuse microservice API microservice microservice API microservice microservice API Chain reaction JBoss Fuse microservice API SLOW!! Client
  • 37. Circuit Breaker <camelContext xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="direct:start"/> <hystrix> <to uri="http://fooservice.com/slow"/> <onFallback> <transform> <constant>Fallback message</constant> </transform> </onFallback> </hystrix> <to uri="mock:result"/> </route> </camelContext> JBoss Fuse microservice API API Service SaaS Slow! No response! Timeout Fallback
  • 38. Continuous Improvement Building APIs ● Native support ● Intuitive tooling ● Light weight ● Flexible service and code re-use from backend Deploy APIs ● Flexibility to scale ● Load balancing ● zero downtime ● Security Distributing APIs ● Authorization ● Clear documentation ● Enforce policies ● Community Performance Analyst ● Number of Hits ● Average response time ● Revenue earned Business alignment ● Change in market ● Government regulation ● New service launch Versioning ● Retire ● Update ● New Service ● Internal service re-creation API
  • 39. API FIRST microservice by RED HAT JBOSS FUSE REST DSL Swagger API Doc API Data Format Transform microservice by RED HAT JBOSS FUSE API microservice by RED HAT JBOSS FUSE Consume Exposes 3ScaleAPImanagement External clients Community, Partners, Customers
  • 42. Agile Integration ● ● ● Cloud native solutions ● Lean artifacts, individually deployable ● Container based scaling and high availability ● Lightweight ● Pattern Based ● Reusable Connectors ● Community Sourced ● Well defined, re-usable, and well managed end-points ● Ecosystem leverage ScalabilityFlexibility Re-Usability Container
  • 43. OPENSHIFT CONTAINER Developer’s Local Env (laptop, desktop) CDK JBDS VCS (Git) Build Run Test Jenkins Nexus (Library Management) Deployment Pipeline Automatic Testing Release management Failure feedback
  • 44. ● Speed, Size, Stability ● Sandboxed application processes on a shared Linux OS kernel ● Simpler, lighter, and denser than virtual machines ● Portable across different environments ● Speed, Choice, Sandbox ● Package my application and all of its dependencies ● Deploy to any environment in seconds and enable CI/CD ● Easily access and share containerized components Sys-Admins / Ops Developers It Depends on Who You Ask What Are Containers?
  • 45. 4 5 RUN CONTAINERS AT SCALE - SOLVE THESE
  • 46. JBOSS EAP JBOSS DATA GRID JBOSS DATA VIRTUALIZATION JBOSS AM-Q JBOSS BRMS JBOSS BPM JBOSS FUSE RED HAT MOBILE 3 Scale Container Business Automation Container Integration Container Data & Storage Container Web & Mobile Traditional, Stateful, and Microservices-based Apps OpenShift Application Lifecycle Management (CI/CD) Build Automation Deployment Automation Service Catalog (Language Runtimes, Middleware, Databases) Self-Service Infrastructure Automation & Cockpit Networking Storage Registry Logs & Metrics Security Container Orchestration & Cluster Management (kubernetes) Container Runtime & Packaging (Docker) Enterprise Container Host Red Hat Enterprise LinuxAtomic Host
  • 47. OPENSHIFT TECHNICAL OVERVIEW47 OPENSHIFT ARCHITECTURE EXISTING AUTOMATION TOOLSETS SCM (GIT) CI/CD SERVICE LAYER ROUTING LAYER PERSISTENT STORAGE REGISTRY RHEL NODE c RHEL NODE RHEL NODE RHEL NODE RHEL NODE RHEL NODE C C C C C C C CC C RED HAT ENTERPRISE LINUX MASTER API/AUTHENTICATION DATA STORE SCHEDULER HEALTH/SCALING PHYSICAL VIRTUAL PRIVATE PUBLIC HYBRID
  • 48. OPENSHIFT TECHNICAL OVERVIEW48 YOUR CHOICE OF INFRASTRUCTURE PHYSICAL VIRTUAL PRIVATE PUBLIC HYBRID
  • 49. OPENSHIFT TECHNICAL OVERVIEW NODES RHEL INSTANCES WHERE APPS RUN 49 RHEL NODE RHEL NODE RHEL NODE RHEL NODE RHEL NODE RHEL NODE PHYSICAL VIRTUAL PRIVATE PUBLIC HYBRID
  • 50. OPENSHIFT TECHNICAL OVERVIEW RHEL NODE c RHEL NODE RHEL NODE RHEL NODE RHEL NODE RHEL NODE C C C C C C C CC C APPS RUN IN CONTAINERS 50 Container Image Container Pod
  • 51. OPENSHIFT TECHNICAL OVERVIEW51 PODS ARE THE UNIT OF ORCHESTRATION RHEL NODE c RHEL NODE RHEL NODE RHEL NODE RHEL NODE RHEL NODE C C C C C C C CC C
  • 52. OPENSHIFT TECHNICAL OVERVIEW RHEL NODE RHEL NODE RHEL NODE RHEL NODE RHEL NODE RHEL NODE 52 MASTERS ARE THE CONTROL PLANE RED HAT ENTERPRISE LINUX MASTER PHYSICAL VIRTUAL PRIVATE PUBLIC HYBRID
  • 53. OPENSHIFT POD ● A small group of tightly coupled Containers ● Ensures collocation ● Docker containers share resources within the pod ○ Volumes ○ Network / IP ○ Port space ○ CPU / Mem allocations ● Pod health probes
  • 54. OPENSHIFT PODS EXPOSE AS SERVICE ● Defines a group of Pods and how to access them ○ Labels and Selectors ● Decouple providers and accessors of services ● Don’t depend on Pod IPs directly ● Use a single IP that doesn’t change ● Virtual IP load balancing and discovery POD SERVICE POD 10.0.1.1 10.0.1.2 CLIENT Name: amq IP: 170.30.10.10
  • 55. SERVICE DISCOVERY POD SERVICE POD 10.0.1. 1 10.0.1.2 CLIENT Name: amq IP: 170.30.10.10 POD 10.0.1.3 Service label common label you apply to each of the pods Service proxy single IP address that other services can call
  • 56. OPENSHIFT FAILURE RECOVERY POD SERVICE PODPOD SERVICE POD ROUTE POD Rebalance traffics Redirect request to available Pods Replace failing pod Starts another pod and bind to serviceHealth Checks periodically performs diagnostics on a running container.
  • 57. REPLICATION CONTROLLER ● Ensures that a specified number of Pod replicas is running ● Holds Pod Templates for creating new Pods ● Autoscaling ● Rolling Updates
  • 58. OPENSHIFT BUILDING IMAGES ● Build strategies ○ Source Source-to-Image (S2I) ○ Binary Source-to-Image (S2I)
  • 62. OPENSHIFT PIPELINE node('maven') { stage('build') { openshiftBuild(buildConfig: 'buildconfigname', showBuildLogs: 'true') } stage('staging') { openshiftDeploy(deploymentConfig: 'deploymentconfigame') } …. }
  • 63. OPENSHIFT ● Deployment strategy determines the deployment process for containers ● Rolling strategy ○ Performs rolling updates ○ Supports life-cycle hooks for injecting code into deployment process ○ Waits for pods to pass readiness check before scaling down old components ○ Used by default if no strategy specified on deployment configuration ● Recreate strategy ○ Has basic rollout behavior ○ Scales down previous deployment before deploying the new one ○ Supports life-cycle hooks for injecting code into deployment process ● Custom strategy for custom deployment behaviour DEPLOYMENTS
  • 64. OPENSHIFT ● Reducing downtime and risk associated with release ● Two identical environments in containing two different releases (Blue and Green) ● After validating new release, can switch all traffic to new version ● Quickly roll application back if you find issues BLUE-GREEN DEPLOYMENT router
  • 65. OPENSHIFT ● A/B testing is a way of testing features in application for various reasons like usability, popularity, noticeability, etc ● Usually associated with application UI however the back-end services need to be available ● Can implement with either application-level or static switches A/B DEPLOYMENT
  • 66. OPENSHIFT CONTAINER Developer’s Local Env (laptop, desktop) CDK JBDS VCS (Git) Build Run Test Jenkins Nexus (Library Management) Deployment Pipeline Automatic Testing Release management Failure feedback
  • 69. Take Control of Your APIs Creating & Exposing APIs is just the start Security & Authentication Version Control Documentation Policies Access Control Monitoring Lifecycle Management Provisioning Alerts Metering & Billing Testing Portal Scalability Reliability
  • 70. API Life-cycle The API Lifecycle Management Approach DEFINE: Identify the API services that deliver value to the business layer DEVELOP: Design, code, test, document standardize templates PUBLISH: Run security with defined policies and controls SUPPORT: Offer community, forums, documentation to interact and collaborate RETIRE: EOL, un-publish, communicate and remove from market place following version control best practice
  • 71. 3scale API Management RBDMS SAP NoSQL WS REST JMS + more FUSE INTEGRATION SERVICE JBoss Fuse Service API JBoss Fuse Service API JBoss Fuse Service API Developers Partners Mobile App Affiliates Internal Projects + more API MANAGEMENT Access control and security API contracts and rate limits Analytics and reporting Developer portal and docs Billing and payments
  • 72. 3Scale API Management Stack Access control Security API contracts Rate limits Analytics Reporting Dev portal Docs Billing Payments Admin Console Dev Portal API Management Traffic Manager APIs Applications Consumers HTTP / HTTPS Security, usage & rate limits
  • 73. 3Scale API Management Components - Flexible Distributed Control Developers Sync / Authorize Mobile Apps Developer Apps Real Time Admin Portal Branded Developer Portal Swagger Doc API Provider Administrators API ProvidersAPI GatewayAPI Consumers API Manager
  • 75. Deployment Options Full SaaS: Hosted API Manager & API Gateways Real Time Admin Portal Sync / Authorize API Provider API Gateway API Manager API Provider Administrators Mobile Apps Developer Apps Branded Dev PortalSwagger Doc API Consumers Developers
  • 76. Deployment Options Hybrid: Hosted Manager - Self-managed Gateway Real Time Admin Portal Sync / Authorize API Provider API Gateway API Manager API Provider Administrators Mobile Apps Developer Apps Branded Dev PortalSwagger Doc Developers API Consumers
  • 77. Deployment Options Full On-Premise Real Time Admin Portal Sync / Authorize API Provider API Gateway (Openshift) API Manager API Provider Administrators Mobile Apps Developer Apps Branded Dev PortalSwagger Doc API Consumers Developers
  • 78. Deployment Options On-premise: Self-managed APIs Real Time Admin Portal Sync / Authorize API Provider API Gateway (Openshift) API Manager API Provider Administrators Mobile Apps Developer Apps Branded Dev PortalSwagger Doc API Consumers Developers
  • 79. Deployment Options On-premise: Self-managed APIs & External Self-managed Gateway Real Time Admin Portal Sync / Authorize API Provider API Gateway (Native/Docker) API Manager API Provider Administrators Mobile Apps Developer Apps Branded Dev PortalSwagger Doc API Consumers Developers
  • 80. 3scale API Management RBDMS SAP NoSQL WS REST JMS + more FUSE INTEGRATION SERVICE JBoss Fuse Service API JBoss Fuse Service API JBoss Fuse Service API Developers Partners Mobile App Affiliates Internal Projects + more API MANAGEMENT Access control and security API contracts and rate limits Analytics and reporting Developer portal and docs Billing and payments
  • 83. 83 Gartner Magic Quadrant Full API Lifecycle Management (2016)
  • 85. AGILE INTEGRATION Cloud native solutions Lean artifacts, individually deployable Container based scaling and high availability ● Lightweight ● Pattern Based ● Reusable Connectors ● Microservice Based ● Cloud native solutions ● Lean artifacts, individually deployable ● Container based scaling and high availability ● Well defined, re-usable, and well managed end-points ● Ecosystem leverage Flexibility Scalability Re-Usability