SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
LAGOM
TOURAINE TECH 2018
Fabrice Sznajderman - @fsznajderman
Un framework CQRS pour votre projet de lundi prochain, bonne idée ou pas?
AGENDA
‣Révisions : CQRS & Event sourcing
‣Framework Lagom
‣Live coding
‣Alors? lundi, on fait quoi ?
AGENDA
QUI VOUS PARLE ?
FABRICE SZNAJDERMAN - DEVELOPPER
‣Lead dev Scala @Lunatech
‣Brown Bag Lunch (Lagom, Scala)
‣Organisateur Scala IO
CQRS
Command
Query
Responsability
Segregation

CQRS
RAPPEL
CQRSCQRS
APPROCHE CLASSIQUE
LAGOM FRAMEWORK
LE PROBLÈME
‣Ecriture : Opération rapide et atomique
‣Lecture : Données adaptés aux différents besoins métiers
CQRSCQRS
APPROCHE CQRS
CQRS
MAJ DE LA PARTIE LECTURE (READ)
EVENT SOURCING
EVENT SOURCING
BankAccount
Id : 3110
amount : 10
BankAccount
Id : 3110
amount : 100
BankAccount
Id : 3110
amount : 40
BankAccount
Id : 3110
amount : 50
Temps
UpdateUpdateUpdate
EVENT SOURCING
BankAccount
Id : 3110
amount : 10
BankAccount
Id : 3110
amount : 100
BankAccount
Id : 3110
amount : 40
BankAccount
Id : 3110
amount : 50
Temps
UpdateUpdateUpdate
EVENT SOURCING
AccountCreated
Id : 3110
amount : 0
DepositePerformed
Id : 3110
amount : 30
WithdrawalPerformed
Id : 3110
amount : 40
DepositePerformed
Id : 3110
amount : 50
Temps
Insert Insert Insert
LAGOM
FRAMEWORK
LAGOM FRAMEWORK
OVERVIEW
‣Editeur Ligthbend
‣Sortie du framework mars 2016
‣Java et Scala
‣Version actuelle: 1.4
LAGOM FRAMEWORK
OBJECTIFS
‣Construire un système de micro-services
‣CQRS & Event sourcing
‣Intégration dans l’environnement de développement
LAGOM FRAMEWORK
COMPOSANTS TECHNIQUES
‣Java8 - Scala
‣Maven - SBT
‣Play framework
‣Akka Persistence - Akka Cluster
‣Akka stream
‣Intégration avec Kafka
LAGOM FRAMEWORK
PRINCIPALES FONCTIONNALITÉS - API DE SERVICE
‣Description de l’API de service via un trait - interface
‣Request / response synchrone
‣Message asynchrone - streaming
LAGOM FRAMEWORK
PRINCIPALES FONCTIONNALITÉS - PERSISTANCE
‣Akka persistence
‣Capturer et persister les events
‣Read processor
‣Clustering / Sharding
LAGOM FRAMEWORK
PRINCIPALES FONCTIONNALITÉS - INTEGRATION ENV DE DEV.
‣Intégration dans l’IDE
‣Plusieurs services fournis par défaut
‣Rechargement à chaud du code
‣Une seule commande pour démarrer le système
LAGOM FRAMEWORK
PRINCIPALES FONCTIONNALITÉS - PRODUCTION
‣ConductR Kubernetes
‣Déploiement manuel (constructR, ETCD)
‣Docker
LAGOM FRAMEWORK
ANATOMIE D’UNE APPLICATION
Gateway
S1
S3
S2
KAFKA
LAGOM FRAMEWORK
ANATOMIE D’UN SERVICE
EVENT
STORE
API
SÈCURITE
VALIDATION
ETC…
COMMANDE(S)
PERSISTENT ENTITY
EVENT(S)
MAJ
STATE
ENTITY
READ SIDE EVENT
PROCESSOR
READ
SIDE
Event stream
CALCUL /
AGGREGATION /
DENORMALISATION
Composant Lagom
Read
LIVE
CODING
LAGOM FRAMEWORK
LIVE CODING - OBJECTIFS
‣Structure d’un projet
‣Les composants d’un service
‣Implémentation CQRS/Event Sourcing dans Lagom
ALORS LUNDI,
ON FAIT QUOI ?
BILAN
AUJOURD’HUI DANS UN VRAI PROJET
?
Mais …
BILAN
D’ABORD CE QUI EST COOL !
‣Intégration à l’environnement de dev
‣“Juste milieu technique” (cc play framework)
‣Offre un cadre standard
‣Facilité de prise en main
‣Une seule commande pour démarrer le système
BILAN
ATTENTION, CE QUE L’ON NE VOUS DIT PAS…
‣Idempotence du système
‣Design fonctionnel très important (DDD)
‣Abstraction du protocol
‣Bonne compréhension CQRS / Event Sourcing
‣et des architectures micro services
ALORS, LUNDI ON FAIT QUOI?
LAGOM FRAMEWORK - BILAN
‣Lagom est opiniâtre <> silver bullet
‣Productivité +++
‣Stack technique éprouvée (doc + communauté)
‣Beaucoup de concepts à appréhender et comprendre
MERCI!
Questions & Réponses

Contenu connexe

Similaire à Lagom framework - Touraine Tech 2018

Presentation sparklane aws
Presentation sparklane awsPresentation sparklane aws
Presentation sparklane awsSparklane
 
Spark Streaming
Spark StreamingSpark Streaming
Spark StreamingPALO IT
 
Développer sereinement avec Node.js
Développer sereinement avec Node.jsDévelopper sereinement avec Node.js
Développer sereinement avec Node.jsJulien Giovaresco
 
Spark Summit Europe Wrap Up and TASM State of the Community
Spark Summit Europe Wrap Up and TASM State of the CommunitySpark Summit Europe Wrap Up and TASM State of the Community
Spark Summit Europe Wrap Up and TASM State of the CommunityJean-Georges Perrin
 
[orleans-tech-19] Unifiez vos traitements Batch et Streaming avec Apache beam
[orleans-tech-19] Unifiez vos traitements Batch et Streaming avec Apache beam[orleans-tech-19] Unifiez vos traitements Batch et Streaming avec Apache beam
[orleans-tech-19] Unifiez vos traitements Batch et Streaming avec Apache beamAlexandre Touret
 
[tours-jug19] Unifiez vos traitements Batch et Streaming avec Apache beam
[tours-jug19] Unifiez vos traitements Batch et Streaming avec Apache beam[tours-jug19] Unifiez vos traitements Batch et Streaming avec Apache beam
[tours-jug19] Unifiez vos traitements Batch et Streaming avec Apache beamAlexandre Touret
 
Volcamp 2023 - Compter les moutons à grande échelle
Volcamp 2023 - Compter les moutons à grande échelleVolcamp 2023 - Compter les moutons à grande échelle
Volcamp 2023 - Compter les moutons à grande échelleKarim Bogtob
 
Présentation Microsoft Advanced Threat Analytics | Deep-Dive - MSCloud Summi...
Présentation Microsoft Advanced Threat Analytics  | Deep-Dive - MSCloud Summi...Présentation Microsoft Advanced Threat Analytics  | Deep-Dive - MSCloud Summi...
Présentation Microsoft Advanced Threat Analytics | Deep-Dive - MSCloud Summi...☁️Seyfallah Tagrerout☁ [MVP]
 
Tk08 Silverlight Une Cure De Jouvence Pour Vos Applications Asp Fr
Tk08 Silverlight Une Cure De Jouvence Pour Vos Applications Asp FrTk08 Silverlight Une Cure De Jouvence Pour Vos Applications Asp Fr
Tk08 Silverlight Une Cure De Jouvence Pour Vos Applications Asp FrValtech
 
Synchroniser ses applications plus rapidement avec du low-code
Synchroniser ses applications plus rapidement avec du low-codeSynchroniser ses applications plus rapidement avec du low-code
Synchroniser ses applications plus rapidement avec du low-codegplanchat
 
Retour expérience détection fraude temps réel
Retour expérience détection fraude temps réelRetour expérience détection fraude temps réel
Retour expérience détection fraude temps réelMartin Menestret
 
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way. Par Pascal Edoua...
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way.  Par Pascal Edoua...XebiCon'16 : WeScale - DNS as a Service, the OpenStack way.  Par Pascal Edoua...
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way. Par Pascal Edoua...Publicis Sapient Engineering
 
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...Publicis Sapient Engineering
 
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020SEO CAMP
 
Core Web Vitals, les indicateurs de vitesse qui réconcilient UX et SEO
Core Web Vitals, les indicateurs de vitesse qui réconcilient UX et SEOCore Web Vitals, les indicateurs de vitesse qui réconcilient UX et SEO
Core Web Vitals, les indicateurs de vitesse qui réconcilient UX et SEOWeLoveSEO
 
Pipeline Devops - Intégration continue : ansible, jenkins, docker, jmeter...
Pipeline Devops - Intégration continue : ansible, jenkins, docker, jmeter...Pipeline Devops - Intégration continue : ansible, jenkins, docker, jmeter...
Pipeline Devops - Intégration continue : ansible, jenkins, docker, jmeter...XavierPestel
 

Similaire à Lagom framework - Touraine Tech 2018 (20)

Presentation sparklane aws
Presentation sparklane awsPresentation sparklane aws
Presentation sparklane aws
 
Spark Streaming
Spark StreamingSpark Streaming
Spark Streaming
 
LyonJUG-2023-v1.0.pdf
LyonJUG-2023-v1.0.pdfLyonJUG-2023-v1.0.pdf
LyonJUG-2023-v1.0.pdf
 
Développer sereinement avec Node.js
Développer sereinement avec Node.jsDévelopper sereinement avec Node.js
Développer sereinement avec Node.js
 
Spark Summit Europe Wrap Up and TASM State of the Community
Spark Summit Europe Wrap Up and TASM State of the CommunitySpark Summit Europe Wrap Up and TASM State of the Community
Spark Summit Europe Wrap Up and TASM State of the Community
 
ParisJUG-2022-v0.4.pdf
ParisJUG-2022-v0.4.pdfParisJUG-2022-v0.4.pdf
ParisJUG-2022-v0.4.pdf
 
[orleans-tech-19] Unifiez vos traitements Batch et Streaming avec Apache beam
[orleans-tech-19] Unifiez vos traitements Batch et Streaming avec Apache beam[orleans-tech-19] Unifiez vos traitements Batch et Streaming avec Apache beam
[orleans-tech-19] Unifiez vos traitements Batch et Streaming avec Apache beam
 
[tours-jug19] Unifiez vos traitements Batch et Streaming avec Apache beam
[tours-jug19] Unifiez vos traitements Batch et Streaming avec Apache beam[tours-jug19] Unifiez vos traitements Batch et Streaming avec Apache beam
[tours-jug19] Unifiez vos traitements Batch et Streaming avec Apache beam
 
Volcamp 2023 - Compter les moutons à grande échelle
Volcamp 2023 - Compter les moutons à grande échelleVolcamp 2023 - Compter les moutons à grande échelle
Volcamp 2023 - Compter les moutons à grande échelle
 
Présentation Microsoft Advanced Threat Analytics | Deep-Dive - MSCloud Summi...
Présentation Microsoft Advanced Threat Analytics  | Deep-Dive - MSCloud Summi...Présentation Microsoft Advanced Threat Analytics  | Deep-Dive - MSCloud Summi...
Présentation Microsoft Advanced Threat Analytics | Deep-Dive - MSCloud Summi...
 
Service Workers
Service WorkersService Workers
Service Workers
 
Tk08 Silverlight Une Cure De Jouvence Pour Vos Applications Asp Fr
Tk08 Silverlight Une Cure De Jouvence Pour Vos Applications Asp FrTk08 Silverlight Une Cure De Jouvence Pour Vos Applications Asp Fr
Tk08 Silverlight Une Cure De Jouvence Pour Vos Applications Asp Fr
 
Synchroniser ses applications plus rapidement avec du low-code
Synchroniser ses applications plus rapidement avec du low-codeSynchroniser ses applications plus rapidement avec du low-code
Synchroniser ses applications plus rapidement avec du low-code
 
Retour expérience détection fraude temps réel
Retour expérience détection fraude temps réelRetour expérience détection fraude temps réel
Retour expérience détection fraude temps réel
 
Meetup laravel
Meetup laravelMeetup laravel
Meetup laravel
 
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way. Par Pascal Edoua...
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way.  Par Pascal Edoua...XebiCon'16 : WeScale - DNS as a Service, the OpenStack way.  Par Pascal Edoua...
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way. Par Pascal Edoua...
 
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
 
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
 
Core Web Vitals, les indicateurs de vitesse qui réconcilient UX et SEO
Core Web Vitals, les indicateurs de vitesse qui réconcilient UX et SEOCore Web Vitals, les indicateurs de vitesse qui réconcilient UX et SEO
Core Web Vitals, les indicateurs de vitesse qui réconcilient UX et SEO
 
Pipeline Devops - Intégration continue : ansible, jenkins, docker, jmeter...
Pipeline Devops - Intégration continue : ansible, jenkins, docker, jmeter...Pipeline Devops - Intégration continue : ansible, jenkins, docker, jmeter...
Pipeline Devops - Intégration continue : ansible, jenkins, docker, jmeter...
 

Plus de Fabrice Sznajderman

Plus de Fabrice Sznajderman (10)

The beauty of pictures
 The beauty of pictures The beauty of pictures
The beauty of pictures
 
Lagom, reactive framework(paris jug2017)
Lagom, reactive framework(paris jug2017)Lagom, reactive framework(paris jug2017)
Lagom, reactive framework(paris jug2017)
 
Lagom, reactive framework(chtijug2016)
Lagom, reactive framework(chtijug2016) Lagom, reactive framework(chtijug2016)
Lagom, reactive framework(chtijug2016)
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice framework
 
Universitélang scala tools
Universitélang scala toolsUniversitélang scala tools
Universitélang scala tools
 
Université des langages scala
Université des langages   scalaUniversité des langages   scala
Université des langages scala
 
Les monades Scala, Java 8
Les monades Scala, Java 8Les monades Scala, Java 8
Les monades Scala, Java 8
 
Maven c'est bien, SBT c'est mieux
Maven c'est bien, SBT c'est mieuxMaven c'est bien, SBT c'est mieux
Maven c'est bien, SBT c'est mieux
 
La gestion des droits numériques - CNAM
La gestion des droits numériques - CNAMLa gestion des droits numériques - CNAM
La gestion des droits numériques - CNAM
 
Paris jug option
Paris jug optionParis jug option
Paris jug option
 

Lagom framework - Touraine Tech 2018