SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
Leaving The Monolith
thanks to Event Sourcing
Migrations, Event Sourcing, AWS, and other things of the meter
@JavierCane#scpna - Software Craftsmanship Pamplona
@JavierCane#scpna - Software Craftsmanship Pamplona
Saliendo del monolito,
al Rico Eventito
Migraciones, Event Sourcing, y otras cosas del meter
Welcome!
I’m Javier Ferrer González
@JavierCane
Greetings to Sergi!
@SergiGP
Welcome!
Contents
! Starting point
! Needs
! Action plan
! Flow example
! Conclusions
1.
Starting point
Context
Starting point
Context
! Mobile first application
! Crazy growth (ads in TV in USA and Turkey)
◕ External services (Parse, Kahuna…)
◕ In-house API
! Where do we go
◕ Microservices architecture
◕ Event Sourcing
◕ Orchestration Layer
2.
Needs
New chat system!
Needs
New chat system!
! From:
◕ REST API
◕ “Chat” (messaging system)
! To:
◕ WebSockets (better UX)
◕ Chat
◕ Isolated from API service
◕ Backwards Compatible (mobile!)
◕ Scale!
3.
Action plan
Maintaining Backwards Compatibility (BC)
Action plan
Maintaining BC
! Develop new chat with Scala and Akka, and WS
! Maintain BC taking advantage of Event Sourcing
Action plan
Maintaining BC
Action plan
Maintaining BC
Action plan
Maintaining BC
! Why not sync through DB?
◕ Share DB: K.A.O.S.
◕ Doesn’t scale
◕ Coupling
Action plan
Maintaining BC
Action plan
Maintaining BC
! Why not sync through SQS?
◕ Doesn’t scale
Action plan
Maintaining BC
Action plan
Maintaining BC
! Why?
◕ Scale
◕ Decoupled
◕ Open-Closed Principle compliant at a services level
4.
Flow example
Maintaining BC
From the new chat to
the legacy one
Flow example
Maintaining BC
From the legacy chat to
the new one
Flow example
Maintaining BC
5.
Conclusions
Conclusions
! Event Sourcing ~~ DIP at a services level
◕ Dependency Inversion Principle (CodelyTV video)
◕ Allow OCP: One SNS publishes to many SQS
◕ Encourage SRP
◕ Decoupleeeeee
Conclusions
Conclusions
! Isolated services
◕ Different technologies
◕ Different context
◕ Change context => Mental challenge
! AWS vs RabbitMQ
◕ Go fast => AWS
! From PHP to Scala: 🙃 🙂 🙃 💃 🙃 😀 😐 😳 🤔 🙂 🙃 🙂 …
! Know more at #SCBCN16! (October 1st & 2nd in BCN)
References / To take away
! A Series of Fortunate Events
! The anatomy of Domain Event
! 6 Code Smells with your CQRS Events and How to
Avoid Them
! json:api standard
! Sending Amazon SNS Messages to Amazon SQS
Queues
! Subscribing a Queue to an Amazon SNS Topic
Questions?
Thanks!
Contact
@JavierCane || @SergiGP
javier.mailserio@gmail.com
Codely.TV
Credits
! Presentation base template by SlidesCarnival
! Graphics generated using draw.io

Contenu connexe

Plus de Javier Ferrer González

#PhpirstAid - Replanteamiento de diseño de software
#PhpirstAid - Replanteamiento de diseño de software#PhpirstAid - Replanteamiento de diseño de software
#PhpirstAid - Replanteamiento de diseño de softwareJavier Ferrer González
 
Informática en El Mundo Real - Sesión de orientación
Informática en El Mundo Real - Sesión de orientaciónInformática en El Mundo Real - Sesión de orientación
Informática en El Mundo Real - Sesión de orientaciónJavier Ferrer González
 
#SpyFiles - Análisis de #FinFisher y los Conflictos Políticos del Malware-as-...
#SpyFiles - Análisis de #FinFisher y los Conflictos Políticos del Malware-as-...#SpyFiles - Análisis de #FinFisher y los Conflictos Políticos del Malware-as-...
#SpyFiles - Análisis de #FinFisher y los Conflictos Políticos del Malware-as-...Javier Ferrer González
 

Plus de Javier Ferrer González (7)

#PhpirstAid - Replanteamiento de diseño de software
#PhpirstAid - Replanteamiento de diseño de software#PhpirstAid - Replanteamiento de diseño de software
#PhpirstAid - Replanteamiento de diseño de software
 
Informática en El Mundo Real - Sesión de orientación
Informática en El Mundo Real - Sesión de orientaciónInformática en El Mundo Real - Sesión de orientación
Informática en El Mundo Real - Sesión de orientación
 
#SpyFiles - Análisis de #FinFisher y los Conflictos Políticos del Malware-as-...
#SpyFiles - Análisis de #FinFisher y los Conflictos Políticos del Malware-as-...#SpyFiles - Análisis de #FinFisher y los Conflictos Políticos del Malware-as-...
#SpyFiles - Análisis de #FinFisher y los Conflictos Políticos del Malware-as-...
 
Gestión proyecto DroidClic android app
Gestión proyecto DroidClic android appGestión proyecto DroidClic android app
Gestión proyecto DroidClic android app
 
Introducción a Ruby on rails
Introducción a Ruby on railsIntroducción a Ruby on rails
Introducción a Ruby on rails
 
Introducción a CoffeeScript
Introducción a CoffeeScriptIntroducción a CoffeeScript
Introducción a CoffeeScript
 
Charla IES Marianao
Charla IES MarianaoCharla IES Marianao
Charla IES Marianao
 

Dernier

Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 

Dernier (20)

Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 

Leaving The Monolith thanks to #EventSourcing @ #scpna