SlideShare a Scribd company logo
1 of 37
Download to read offline
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

More Related Content

More from 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
 

More from 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
 

Recently uploaded

Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
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
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
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
 
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
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
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
 
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
 
Lecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptLecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptesrabilgic2
 
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
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 

Recently uploaded (20)

Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
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
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.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
 
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...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
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
 
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
 
Lecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptLecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).ppt
 
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
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 

Leaving The Monolith thanks to #EventSourcing @ #scpna