Apache Camel & The Art of Entreprise Integration

28
Apache Camel & l’Art de l'intégration Abdellatif BOUCHAMA @a_bouchama #ApacheCamel #microservices

Transcript of Apache Camel & The Art of Entreprise Integration

Page 1: Apache Camel & The Art of Entreprise Integration

Apache Camel & l’Art de l'intégration

Abdellatif BOUCHAMA

@a_bouchama

#ApacheCamel #microservices

Page 2: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Abdellatif BOUCHAMASenior Middleware Engineer

I work at Red Hat on Open Source Integration technology.

ContactTwitter: @a_bouchamaLinkedin: https://fr.linkedin.com/in/abouchamaBlog: http://bushorn.com/author/a_bouchama/

Page 3: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

AGENDAEIP : Entreprise Integration Patterns

Faire connaissance à Apache Camel ?

Mon Aventure avec Camel:

Défi #Microservices : Spring-boot, Docker & OpenShift / KubernetesDéfi #DevOps : CI/CD

Page 4: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

EIPEntreprise Integration Patterns

Page 5: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

EIPEssentiel Integration Patterns

Conclusion

Page 6: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache Camel est un framework d’intégration open source

qui fournit la mise en œuvre des EIP.

Page 7: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Pourquoi utiliser Apache Camel ?

❏ Routage et médiation

❏ EIP (Entreprise Integration patterns)

❏ Domain-spécific language (DSL)

❏ Libraries extensibles

❏ Architecture modulaire

❏ Conversion automatique de typesTrés léger

GrandeCommunauté

Testable

Facilement Configurable

Page 8: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache Camel

Extrait de Camel In Action 2nd Edition

Composants

Page 9: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache Camel

Camel XML<route><from uri="activemq:queue:newOrder"/><choice><when><xpath>/order/product = widget</xpath><to uri="activemq:queue:widget"/></when><otherwise><to uri="activemq:queue:gadget"/></otherwise></choice></route>

Configuration

Camel Java DSLimport org.apache.camel.builder.RouteBuilder;public class MyRoute extends RouteBuilder

{public void configure() throws Exception {

from("activemq:queue:newOrder").choice().when(xpath("/order/product = widget")).to("activemq:queue:widget").otherwise().to("activemq:queue:gadget").end();}

}

Page 10: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache CamelExemple

</route>

<from uri="timer:foo?period=5000"/>

<choice>

</choice>

<transform> <method ref="myTransformer"/> </transform>

</otherwise>

<otherwise>

<when> <simple>${body} > 500</simple>

</when><log message="High priority message : ${body}"/>

<log message="Low priority message : ${body}"/>

<route id="cbr-route">

Page 11: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Mon Aventure avec Camel

Page 12: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Parler #microservices c’est bien, en faire c’est mieux

Page 13: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: Spring Boot

●Déploiement simple: jar “self-contained”●Cloud ready●Démarrage ultra rapide●Une configuration par défault d’un certain nombre de paramétres via application.properties

Page 14: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: Spring Boot

Page 15: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: Docker

●Isolation de l’environnement d’exécution d’un service●Déploiement rapide et sans couture●Portabilité et de la scalabilité●Compatibilité avec des solutions d’hébergement dans un Cloud privé, public ou hybride

Page 16: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

let's develop #microservices faster and have fun!

Page 17: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservice: Docker

fabric8:build

Page 18: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: OpenShift / Kubernetes

Page 19: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

OpenShift ?

Bro, I’m lost with my all Docker containers ?

You need certainly Kubernetes, this will help you to orchestrate the lifecycle of your containers, ...

What ? again a new thing, and what about managing my applications (Build, develop, deployment. scale...) with this thing.

Sorry, new thing again: you need OpenShift

Page 20: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

OpenShift: How it works?

Page 21: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: OpenShift / Kubernetes

fabric8:build

fabric8:deploy

fabric8:log

fabric8:start

fabric8:debug

MasterNode

API / Authentication

Data Store

Scheduler

Management/Replication

PodPod

fabric8:stop

Page 22: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

#DevOps à portée de main

Page 23: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Page 24: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Apache Camel#DevOps (CI /CD) Workflow

Automated Workflow

Testing Staging Production

fabric8:importDocker

Registry

Page 25: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

Notre voyage avec Camel

DevOps microservices

Page 26: Apache Camel & The Art of Entreprise Integration

@a_bouchama#ApacheCamel #microservices

http://developers.redhat.comdevelopers.redhat.com

Page 27: Apache Camel & The Art of Entreprise Integration

Questions ?

#ApacheCamel #microservices

Page 28: Apache Camel & The Art of Entreprise Integration

Thank youAbdellatif BOUCHAMA@a_bouchama

#ApacheCamel #microservices