SlideShare a Scribd company logo
1 of 35
Download to read offline
Cloud Native Aarhus 2018
Lunar Way’s road to microservices
OR
How we learned to love async events
Cloud Native Aarhus April 2018
Thomas Bøgh Fangel
Cloud Native Aarhus 2018
• Started programming on the C64 and the Amiga back in 80s
• M.Sc. in Maths
• Professional software developer since 2004
• Started my career in Java
• Left Java in favour of Scala and FP
• Now primarily working in Go and Typescript
• Joined Lunar Way in June 2016
About me
Thomas Bøgh Fangel
Web Architect @ Lunar Way
@tbfangel
Cloud Native Aarhus 2018
• Setting the Scene
• Microservices and Inter
Service Communication
• Our Road to Microservices
• Use Cases of Async
Message Passing
AGENDA
Video
Cloud Native Aarhus 2018
Cloud Native Aarhus 2018
The Lunar Way
platform of
Summer 2016
Cloud Native Aarhus 2018
NemID Integration
NemID
Native iOS
and Android
apps
Bank Integration
DK Bank
Backend
Platform assessment
Cloud Native Aarhus 2018
• Well structured REST API for
the app
The Good
• Tightly coupled data model on
the backend
• App and backend tightly coupled
• One data entity all over the place
• Big Bang deployments
• Hard to do fast experiments
• Hard to scale
The Bad
Change required!
Cloud Native Aarhus 2018
• Scalability
• Resilience
• Autonomy
• Decoupling
• Fast experiments
• Small, independent and fast deployments
Goals
Cloud Native Aarhus 2018
Microservices
and inter service
communication
https://pixabay.com/en/team-motivation-teamwork-together-386673/
So, what is a microservice?
Cloud Native Aarhus 2018
– Sam Newman
Microservices are small,
autonomous services that
work together.
– Martin Fowler
…a single application as a suite of
small services, each running in its
own process and communicating
with lightweight mechanisms…
…services are built around business
capabilities and independently
deployable by fully automated
deployment machinery
Why microservices – or why not?
Cloud Native Aarhus 2018
• Modularity
• Coherence and low coupling
• Fault tolerance
• Fast development
• Autonomy
• Independent deployment
Benefits
• Sharing data across services
• Debugging and tracing
• Orchestration
• Deployment
• Increased overall complexity
• Insight across service boundaries
Challenges
Inter service communication
Cloud Native Aarhus 2018
• Closed communication
• Trusted/ “secure”
• High coupling (code/space/time)
• Works good when synchronous
app request involved
Synchronous req/resp
• Open ended communication (pub/sub)
• Low coupling (data only)
• “Insecure” from a dev perspective

Flow orchestration is complex
• Works bad when synchronous app
request involved
Async messages
Communication shapes coupling
Cloud Native Aarhus 2018
Synchronous req/resp
Service A Service B
Request
Response
Temporal coupling
Spatial coupling
Behavioural coupling - Service A
commands the behaviour of Service B
Example: Signup commands user service
to CreateUser
Async messages
No spatial and temporal coupling
No behavioural coupling - Service B
determines its own behaviour based on the
behaviour of Service A
Example: Signup publishes UserApplied. User
service consumes event, creates user and
publishes UserCreated. Signup service
consumes and changes state
Service A Service B
Q

U

E

U

E
https://iansrobinson.com/2009/04/27/temporal-and-behavioural-coupling/
Event driven systems
Cloud Native Aarhus 2018
• All changes published as events
• Events drive behaviour
• Traditional system design focus on only the state
changes - events disappear after they happen
• Event driven systems complete the picture
Service C Service D
Service A Service B
Event
Event Event
https://hackernoon.com/events-as-first-class-citizens-8633e8479493
Cloud Native Aarhus 2018
Our Road to
Microservices
https://pixabay.com/en/road-winding-street-bridge-1030789/
The first microservice
Cloud Native Aarhus 2018
Backend Backend
Feed
Cloud Native Aarhus 2018
Learning 1 Never allow microservice
A to access the data of
microservice B directly
Cloud Native Aarhus 2018
Learning 2 Reduce the number of 

new technologies 

introduced in one go
http://mcfunley.com/choose-boring-technology
Microservice 2, 3 and 4
Cloud Native Aarhus 2018
Backend
Feed
Backend
Feed
Goals
Signup
Support
Cloud Native Aarhus 2018
Learning 3 Prioritise your
deployment pipeline
and runtime platform
Microservice X, Y and Z
Cloud Native Aarhus 2018
vs
Cloud Native Aarhus 2018
Learning 4 Choose your
toolbox wisely
Cloud Native Aarhus 2018
Learning 5 Insist on paying
off technical debt
Microservice N,
N+1, N+2…
Cloud Native Aarhus 2018
Beyond
counting…
Cloud Native Aarhus 2018
Learning 6 Be systematic!
Cloud Native Aarhus 2018
Learning 7 DRY up your services
– factor out common
functionality into 

new services
Cloud Native Aarhus 2018
Learning 8 Appreciate the value
of publishing all
business model
changes as events
Cloud Native Aarhus 2018
NemID
Bank
Integration
DK Bank
Native iOS
and Android
apps
Legacy API
Auth
User
Feature
Feed
Stream
Goals
Travel
Card
Signup
Social
Move
Money
Referral
Topup
Push Credit
Tracking
Appsync
User
Settings
Time
Rules
KPI
Support
NemID
Integration
Partner 1
Integration
Parter 3
Integration
Insight
Locali-
zation
Split
Intercom
Sync
Promo
TC

Support
Houston
(Support)
Partner 3
Integration
Partner 1
Partner 2
Partner 3
KPI

CLI
App Facing Internal Integrations
Sync
Cloud Native Aarhus 2018
Use Cases of
Async Message
Passing
https://pixabay.com/en/message-in-a-bottle-bottle-post-1694868/
Data enrichment
Cloud Native Aarhus 2018
AggregateSource
Enrichment 1
Enrichment 2
One source of data, multiple
enrichments
1. Source publishes event
2. Aggregate stores entity
3. Enrichments runs and publishes
event
4. Aggregate updates aggregate with
enrichment
Business insight
Cloud Native Aarhus 2018
Business requires insight across
services
1. Sources publish events
2. KPI subscribes on events and
converts to own model
3. Tooling on top to provide insight
KPI
Source 1
Source 2
Source 3
DB
External APIs and web hooks
Cloud Native Aarhus 2018
3rd parties require access to your
data
1. Sources publish events
2. External API subscribes on events
and converts to own model
3. 3rd parties access external API
and may register web hooks
External API
Source 1
Source 2
Source 3
DB
External 1
External 2
From pull to push
Cloud Native Aarhus 2018
AppSync
Rails
DK 

Partner
Native iOS
and Android
app DB
DK 

PartnerRails
DB
Native iOS
and Android
app
App triggers a pull (3-5 requests ~ 1-2
seconds) from partner bank with a DB
transaction open
Queue
Never let an app request trigger a sync! Control
the sync process and use async events to push
data to the app on a web socket
Wrapping up
Cloud Native Aarhus 2018
Adapt to the size of your team
Use asynchronous communication
between services… preferably
event driven
Prioritise your deployment pipeline
and runtime platform from the
start
Be systematic!
Key takeaways
if entering
microservice
land
Cloud Native Aarhus 2018
?

More Related Content

What's hot

Changing Landscape of Development_Stephen Liedig_AWS
Changing Landscape of Development_Stephen Liedig_AWSChanging Landscape of Development_Stephen Liedig_AWS
Changing Landscape of Development_Stephen Liedig_AWSHelen Rogers
 
Demystifying Cloud Economics – Think Big: How to Build an Investment Case for...
Demystifying Cloud Economics – Think Big: How to Build an Investment Case for...Demystifying Cloud Economics – Think Big: How to Build an Investment Case for...
Demystifying Cloud Economics – Think Big: How to Build an Investment Case for...Amazon Web Services
 
Modern Data Architectures for Business Outcomes
Modern Data Architectures for Business OutcomesModern Data Architectures for Business Outcomes
Modern Data Architectures for Business OutcomesAmazon Web Services
 
ACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWS
ACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWSACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWS
ACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWSAWS User Group Kochi
 
AWS re:Invent 2016: Choosing the Right Partner for Your AWS Journey (ENT310)
AWS re:Invent 2016: Choosing the Right Partner for Your AWS Journey (ENT310)AWS re:Invent 2016: Choosing the Right Partner for Your AWS Journey (ENT310)
AWS re:Invent 2016: Choosing the Right Partner for Your AWS Journey (ENT310)Amazon Web Services
 
Interconnect with Ecosystems and Things- AWS Summit SG 2017
Interconnect with Ecosystems and Things- AWS Summit SG 2017Interconnect with Ecosystems and Things- AWS Summit SG 2017
Interconnect with Ecosystems and Things- AWS Summit SG 2017Amazon Web Services
 
Simplifying migration to aws - everett dolgner
Simplifying migration to aws -   everett dolgnerSimplifying migration to aws -   everett dolgner
Simplifying migration to aws - everett dolgnerAmazon Web Services
 
How to Manage Cloud Costs with RightScale Optima
How to Manage Cloud Costs with RightScale OptimaHow to Manage Cloud Costs with RightScale Optima
How to Manage Cloud Costs with RightScale OptimaRightScale
 
Serverless 2019 and Beyond
Serverless 2019 and Beyond Serverless 2019 and Beyond
Serverless 2019 and Beyond Mark Hinkle
 
Lessons & Use-Cases at Scale - Dr. Pete Stanski
Lessons & Use-Cases at Scale - Dr. Pete StanskiLessons & Use-Cases at Scale - Dr. Pete Stanski
Lessons & Use-Cases at Scale - Dr. Pete StanskiAmazon Web Services
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)AWS Vietnam Community
 
Vn introduction to cloud computing with amazon web services
Vn   introduction to cloud computing with amazon web servicesVn   introduction to cloud computing with amazon web services
Vn introduction to cloud computing with amazon web servicesAWS Vietnam Community
 
Trova ed utilizza in modo sicuro nel Cloud il software che ti serve con l'AWS...
Trova ed utilizza in modo sicuro nel Cloud il software che ti serve con l'AWS...Trova ed utilizza in modo sicuro nel Cloud il software che ti serve con l'AWS...
Trova ed utilizza in modo sicuro nel Cloud il software che ti serve con l'AWS...Amazon Web Services
 
Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...
Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...
Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...HostedbyConfluent
 
IDC and AWS Joint Webinar: Getting the most bang for your buck with EC2 Spot -
IDC and AWS Joint Webinar: Getting the most bang for your buck with EC2 Spot - IDC and AWS Joint Webinar: Getting the most bang for your buck with EC2 Spot -
IDC and AWS Joint Webinar: Getting the most bang for your buck with EC2 Spot - Amazon Web Services
 
Building a Data Processing Pipeline on AWS - AWS Summit SG 2017
Building a Data Processing Pipeline on AWS - AWS Summit SG 2017Building a Data Processing Pipeline on AWS - AWS Summit SG 2017
Building a Data Processing Pipeline on AWS - AWS Summit SG 2017Amazon Web Services
 
My CIO Says That We are Going All-In and Migrating to AWS, Now What? | AWS Pu...
My CIO Says That We are Going All-In and Migrating to AWS, Now What? | AWS Pu...My CIO Says That We are Going All-In and Migrating to AWS, Now What? | AWS Pu...
My CIO Says That We are Going All-In and Migrating to AWS, Now What? | AWS Pu...Amazon Web Services
 
Serverless Design Patterns for Rethinking Traditional Enterprise Application ...
Serverless Design Patterns for Rethinking Traditional Enterprise Application ...Serverless Design Patterns for Rethinking Traditional Enterprise Application ...
Serverless Design Patterns for Rethinking Traditional Enterprise Application ...Amazon Web Services
 
Introduction to Cloud Computing - (Eng Session)
Introduction to Cloud Computing - (Eng Session)Introduction to Cloud Computing - (Eng Session)
Introduction to Cloud Computing - (Eng Session)Amazon Web Services
 

What's hot (20)

Changing Landscape of Development_Stephen Liedig_AWS
Changing Landscape of Development_Stephen Liedig_AWSChanging Landscape of Development_Stephen Liedig_AWS
Changing Landscape of Development_Stephen Liedig_AWS
 
Demystifying Cloud Economics – Think Big: How to Build an Investment Case for...
Demystifying Cloud Economics – Think Big: How to Build an Investment Case for...Demystifying Cloud Economics – Think Big: How to Build an Investment Case for...
Demystifying Cloud Economics – Think Big: How to Build an Investment Case for...
 
Modern Data Architectures for Business Outcomes
Modern Data Architectures for Business OutcomesModern Data Architectures for Business Outcomes
Modern Data Architectures for Business Outcomes
 
ACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWS
ACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWSACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWS
ACDKOCHI19 - Rapid development, CI/CD for Chatbots on AWS
 
AWS re:Invent 2016: Choosing the Right Partner for Your AWS Journey (ENT310)
AWS re:Invent 2016: Choosing the Right Partner for Your AWS Journey (ENT310)AWS re:Invent 2016: Choosing the Right Partner for Your AWS Journey (ENT310)
AWS re:Invent 2016: Choosing the Right Partner for Your AWS Journey (ENT310)
 
Interconnect with Ecosystems and Things- AWS Summit SG 2017
Interconnect with Ecosystems and Things- AWS Summit SG 2017Interconnect with Ecosystems and Things- AWS Summit SG 2017
Interconnect with Ecosystems and Things- AWS Summit SG 2017
 
Simplifying migration to aws - everett dolgner
Simplifying migration to aws -   everett dolgnerSimplifying migration to aws -   everett dolgner
Simplifying migration to aws - everett dolgner
 
How to Manage Cloud Costs with RightScale Optima
How to Manage Cloud Costs with RightScale OptimaHow to Manage Cloud Costs with RightScale Optima
How to Manage Cloud Costs with RightScale Optima
 
Serverless 2019 and Beyond
Serverless 2019 and Beyond Serverless 2019 and Beyond
Serverless 2019 and Beyond
 
Lessons & Use-Cases at Scale - Dr. Pete Stanski
Lessons & Use-Cases at Scale - Dr. Pete StanskiLessons & Use-Cases at Scale - Dr. Pete Stanski
Lessons & Use-Cases at Scale - Dr. Pete Stanski
 
AWSome Day Brussels - Keynote
AWSome Day Brussels - Keynote AWSome Day Brussels - Keynote
AWSome Day Brussels - Keynote
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
 
Vn introduction to cloud computing with amazon web services
Vn   introduction to cloud computing with amazon web servicesVn   introduction to cloud computing with amazon web services
Vn introduction to cloud computing with amazon web services
 
Trova ed utilizza in modo sicuro nel Cloud il software che ti serve con l'AWS...
Trova ed utilizza in modo sicuro nel Cloud il software che ti serve con l'AWS...Trova ed utilizza in modo sicuro nel Cloud il software che ti serve con l'AWS...
Trova ed utilizza in modo sicuro nel Cloud il software che ti serve con l'AWS...
 
Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...
Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...
Kafka & InfluxDB: BFFs for Enterprise Data Applications | Russ Savage, Influx...
 
IDC and AWS Joint Webinar: Getting the most bang for your buck with EC2 Spot -
IDC and AWS Joint Webinar: Getting the most bang for your buck with EC2 Spot - IDC and AWS Joint Webinar: Getting the most bang for your buck with EC2 Spot -
IDC and AWS Joint Webinar: Getting the most bang for your buck with EC2 Spot -
 
Building a Data Processing Pipeline on AWS - AWS Summit SG 2017
Building a Data Processing Pipeline on AWS - AWS Summit SG 2017Building a Data Processing Pipeline on AWS - AWS Summit SG 2017
Building a Data Processing Pipeline on AWS - AWS Summit SG 2017
 
My CIO Says That We are Going All-In and Migrating to AWS, Now What? | AWS Pu...
My CIO Says That We are Going All-In and Migrating to AWS, Now What? | AWS Pu...My CIO Says That We are Going All-In and Migrating to AWS, Now What? | AWS Pu...
My CIO Says That We are Going All-In and Migrating to AWS, Now What? | AWS Pu...
 
Serverless Design Patterns for Rethinking Traditional Enterprise Application ...
Serverless Design Patterns for Rethinking Traditional Enterprise Application ...Serverless Design Patterns for Rethinking Traditional Enterprise Application ...
Serverless Design Patterns for Rethinking Traditional Enterprise Application ...
 
Introduction to Cloud Computing - (Eng Session)
Introduction to Cloud Computing - (Eng Session)Introduction to Cloud Computing - (Eng Session)
Introduction to Cloud Computing - (Eng Session)
 

Similar to Our road to microservices - or how we learned to love async events

Your Business at the Speed of Cloud. Innovate with Cloud-Native App Delivery,...
Your Business at the Speed of Cloud. Innovate with Cloud-Native App Delivery,...Your Business at the Speed of Cloud. Innovate with Cloud-Native App Delivery,...
Your Business at the Speed of Cloud. Innovate with Cloud-Native App Delivery,...Amazon Web Services
 
Building and Successfully Selling ISV Solutions with AWS Partner-Summit-Singa...
Building and Successfully Selling ISV Solutions with AWS Partner-Summit-Singa...Building and Successfully Selling ISV Solutions with AWS Partner-Summit-Singa...
Building and Successfully Selling ISV Solutions with AWS Partner-Summit-Singa...Amazon Web Services
 
Data Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudData Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudTom Laszewski
 
API Integration: Red Hat integration perspective
API Integration: Red Hat integration perspectiveAPI Integration: Red Hat integration perspective
API Integration: Red Hat integration perspectiveJudy Breedlove
 
One-stop Solution for Mass Migration with Disaster Recovery Methodology with ...
One-stop Solution for Mass Migration with Disaster Recovery Methodology with ...One-stop Solution for Mass Migration with Disaster Recovery Methodology with ...
One-stop Solution for Mass Migration with Disaster Recovery Methodology with ...Amazon Web Services
 
AWS Partner Webcast - Data Center Migration to the AWS Cloud
AWS Partner Webcast - Data Center Migration to the AWS CloudAWS Partner Webcast - Data Center Migration to the AWS Cloud
AWS Partner Webcast - Data Center Migration to the AWS CloudAmazon Web Services
 
Dan Crawford - Canadian Executive Cloud & DevOps Summit Presentation
Dan Crawford - Canadian Executive Cloud & DevOps Summit PresentationDan Crawford - Canadian Executive Cloud & DevOps Summit Presentation
Dan Crawford - Canadian Executive Cloud & DevOps Summit PresentationTriNimbus
 
Cloud Native Patterns with Bluemix Developer Console
Cloud Native Patterns with Bluemix Developer ConsoleCloud Native Patterns with Bluemix Developer Console
Cloud Native Patterns with Bluemix Developer ConsoleMatthew Perrins
 
Cloud Azure Market Research and Service Offerings by RapidValue
Cloud Azure Market Research and Service Offerings by RapidValueCloud Azure Market Research and Service Offerings by RapidValue
Cloud Azure Market Research and Service Offerings by RapidValueRapidValue
 
B5 modernise your_cloud_to_on_premises_integration
B5 modernise your_cloud_to_on_premises_integrationB5 modernise your_cloud_to_on_premises_integration
B5 modernise your_cloud_to_on_premises_integrationDr. Wilfred Lin (Ph.D.)
 
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...Amazon Web Services
 
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...Amazon Web Services
 
HANA Cloud Platform Overview
HANA Cloud Platform OverviewHANA Cloud Platform Overview
HANA Cloud Platform OverviewVictor Ionescu
 
Applying systems thinking to AWS enterprise application migration
Applying systems thinking to AWS enterprise application migrationApplying systems thinking to AWS enterprise application migration
Applying systems thinking to AWS enterprise application migrationKacy Clarke
 
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...Codit
 
Using cloud native development to achieve digital transformation
Using cloud native development to achieve digital transformationUsing cloud native development to achieve digital transformation
Using cloud native development to achieve digital transformationUni Systems S.M.S.A.
 

Similar to Our road to microservices - or how we learned to love async events (20)

Your Business at the Speed of Cloud. Innovate with Cloud-Native App Delivery,...
Your Business at the Speed of Cloud. Innovate with Cloud-Native App Delivery,...Your Business at the Speed of Cloud. Innovate with Cloud-Native App Delivery,...
Your Business at the Speed of Cloud. Innovate with Cloud-Native App Delivery,...
 
Building and Successfully Selling ISV Solutions with AWS Partner-Summit-Singa...
Building and Successfully Selling ISV Solutions with AWS Partner-Summit-Singa...Building and Successfully Selling ISV Solutions with AWS Partner-Summit-Singa...
Building and Successfully Selling ISV Solutions with AWS Partner-Summit-Singa...
 
Data Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudData Center Migration to the AWS Cloud
Data Center Migration to the AWS Cloud
 
API Integration: Red Hat integration perspective
API Integration: Red Hat integration perspectiveAPI Integration: Red Hat integration perspective
API Integration: Red Hat integration perspective
 
Cloudy with SaaS shine
Cloudy with SaaS shineCloudy with SaaS shine
Cloudy with SaaS shine
 
One-stop Solution for Mass Migration with Disaster Recovery Methodology with ...
One-stop Solution for Mass Migration with Disaster Recovery Methodology with ...One-stop Solution for Mass Migration with Disaster Recovery Methodology with ...
One-stop Solution for Mass Migration with Disaster Recovery Methodology with ...
 
AWS Partner Webcast - Data Center Migration to the AWS Cloud
AWS Partner Webcast - Data Center Migration to the AWS CloudAWS Partner Webcast - Data Center Migration to the AWS Cloud
AWS Partner Webcast - Data Center Migration to the AWS Cloud
 
Dan Crawford - Canadian Executive Cloud & DevOps Summit Presentation
Dan Crawford - Canadian Executive Cloud & DevOps Summit PresentationDan Crawford - Canadian Executive Cloud & DevOps Summit Presentation
Dan Crawford - Canadian Executive Cloud & DevOps Summit Presentation
 
SmartCLIDE: Stairway to Cloud
SmartCLIDE: Stairway to CloudSmartCLIDE: Stairway to Cloud
SmartCLIDE: Stairway to Cloud
 
Migrating to the Cloud
Migrating to the CloudMigrating to the Cloud
Migrating to the Cloud
 
Cloud Native Patterns with Bluemix Developer Console
Cloud Native Patterns with Bluemix Developer ConsoleCloud Native Patterns with Bluemix Developer Console
Cloud Native Patterns with Bluemix Developer Console
 
Cloud Azure Market Research and Service Offerings by RapidValue
Cloud Azure Market Research and Service Offerings by RapidValueCloud Azure Market Research and Service Offerings by RapidValue
Cloud Azure Market Research and Service Offerings by RapidValue
 
B5 modernise your_cloud_to_on_premises_integration
B5 modernise your_cloud_to_on_premises_integrationB5 modernise your_cloud_to_on_premises_integration
B5 modernise your_cloud_to_on_premises_integration
 
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
 
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
Building Your AWS Migration Practice with Toolkits AWS-Partner-Summit-Singapo...
 
The HANA Cloud Platform
The HANA Cloud PlatformThe HANA Cloud Platform
The HANA Cloud Platform
 
HANA Cloud Platform Overview
HANA Cloud Platform OverviewHANA Cloud Platform Overview
HANA Cloud Platform Overview
 
Applying systems thinking to AWS enterprise application migration
Applying systems thinking to AWS enterprise application migrationApplying systems thinking to AWS enterprise application migration
Applying systems thinking to AWS enterprise application migration
 
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
 
Using cloud native development to achieve digital transformation
Using cloud native development to achieve digital transformationUsing cloud native development to achieve digital transformation
Using cloud native development to achieve digital transformation
 

Recently uploaded

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
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 TerraformAndrey Devyatkin
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
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 DiscoveryTrustArc
 
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 2024Victor Rentea
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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...apidays
 
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...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
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 Pakistandanishmna97
 
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.pdfOrbitshub
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
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
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
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
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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...
 
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...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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
 
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
 

Our road to microservices - or how we learned to love async events

  • 1. Cloud Native Aarhus 2018 Lunar Way’s road to microservices OR How we learned to love async events Cloud Native Aarhus April 2018 Thomas Bøgh Fangel
  • 2. Cloud Native Aarhus 2018 • Started programming on the C64 and the Amiga back in 80s • M.Sc. in Maths • Professional software developer since 2004 • Started my career in Java • Left Java in favour of Scala and FP • Now primarily working in Go and Typescript • Joined Lunar Way in June 2016 About me Thomas Bøgh Fangel Web Architect @ Lunar Way @tbfangel
  • 3. Cloud Native Aarhus 2018 • Setting the Scene • Microservices and Inter Service Communication • Our Road to Microservices • Use Cases of Async Message Passing AGENDA
  • 5. Cloud Native Aarhus 2018 The Lunar Way platform of Summer 2016
  • 6. Cloud Native Aarhus 2018 NemID Integration NemID Native iOS and Android apps Bank Integration DK Bank Backend
  • 7. Platform assessment Cloud Native Aarhus 2018 • Well structured REST API for the app The Good • Tightly coupled data model on the backend • App and backend tightly coupled • One data entity all over the place • Big Bang deployments • Hard to do fast experiments • Hard to scale The Bad
  • 8. Change required! Cloud Native Aarhus 2018 • Scalability • Resilience • Autonomy • Decoupling • Fast experiments • Small, independent and fast deployments Goals
  • 9. Cloud Native Aarhus 2018 Microservices and inter service communication https://pixabay.com/en/team-motivation-teamwork-together-386673/
  • 10. So, what is a microservice? Cloud Native Aarhus 2018 – Sam Newman Microservices are small, autonomous services that work together. – Martin Fowler …a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms… …services are built around business capabilities and independently deployable by fully automated deployment machinery
  • 11. Why microservices – or why not? Cloud Native Aarhus 2018 • Modularity • Coherence and low coupling • Fault tolerance • Fast development • Autonomy • Independent deployment Benefits • Sharing data across services • Debugging and tracing • Orchestration • Deployment • Increased overall complexity • Insight across service boundaries Challenges
  • 12. Inter service communication Cloud Native Aarhus 2018 • Closed communication • Trusted/ “secure” • High coupling (code/space/time) • Works good when synchronous app request involved Synchronous req/resp • Open ended communication (pub/sub) • Low coupling (data only) • “Insecure” from a dev perspective
 Flow orchestration is complex • Works bad when synchronous app request involved Async messages
  • 13. Communication shapes coupling Cloud Native Aarhus 2018 Synchronous req/resp Service A Service B Request Response Temporal coupling Spatial coupling Behavioural coupling - Service A commands the behaviour of Service B Example: Signup commands user service to CreateUser Async messages No spatial and temporal coupling No behavioural coupling - Service B determines its own behaviour based on the behaviour of Service A Example: Signup publishes UserApplied. User service consumes event, creates user and publishes UserCreated. Signup service consumes and changes state Service A Service B Q
 U
 E
 U
 E https://iansrobinson.com/2009/04/27/temporal-and-behavioural-coupling/
  • 14. Event driven systems Cloud Native Aarhus 2018 • All changes published as events • Events drive behaviour • Traditional system design focus on only the state changes - events disappear after they happen • Event driven systems complete the picture Service C Service D Service A Service B Event Event Event https://hackernoon.com/events-as-first-class-citizens-8633e8479493
  • 15. Cloud Native Aarhus 2018 Our Road to Microservices https://pixabay.com/en/road-winding-street-bridge-1030789/
  • 16. The first microservice Cloud Native Aarhus 2018 Backend Backend Feed
  • 17. Cloud Native Aarhus 2018 Learning 1 Never allow microservice A to access the data of microservice B directly
  • 18. Cloud Native Aarhus 2018 Learning 2 Reduce the number of 
 new technologies 
 introduced in one go http://mcfunley.com/choose-boring-technology
  • 19. Microservice 2, 3 and 4 Cloud Native Aarhus 2018 Backend Feed Backend Feed Goals Signup Support
  • 20. Cloud Native Aarhus 2018 Learning 3 Prioritise your deployment pipeline and runtime platform
  • 21. Microservice X, Y and Z Cloud Native Aarhus 2018 vs
  • 22. Cloud Native Aarhus 2018 Learning 4 Choose your toolbox wisely
  • 23. Cloud Native Aarhus 2018 Learning 5 Insist on paying off technical debt
  • 24. Microservice N, N+1, N+2… Cloud Native Aarhus 2018 Beyond counting…
  • 25. Cloud Native Aarhus 2018 Learning 6 Be systematic!
  • 26. Cloud Native Aarhus 2018 Learning 7 DRY up your services – factor out common functionality into 
 new services
  • 27. Cloud Native Aarhus 2018 Learning 8 Appreciate the value of publishing all business model changes as events
  • 28. Cloud Native Aarhus 2018 NemID Bank Integration DK Bank Native iOS and Android apps Legacy API Auth User Feature Feed Stream Goals Travel Card Signup Social Move Money Referral Topup Push Credit Tracking Appsync User Settings Time Rules KPI Support NemID Integration Partner 1 Integration Parter 3 Integration Insight Locali- zation Split Intercom Sync Promo TC
 Support Houston (Support) Partner 3 Integration Partner 1 Partner 2 Partner 3 KPI
 CLI App Facing Internal Integrations Sync
  • 29. Cloud Native Aarhus 2018 Use Cases of Async Message Passing https://pixabay.com/en/message-in-a-bottle-bottle-post-1694868/
  • 30. Data enrichment Cloud Native Aarhus 2018 AggregateSource Enrichment 1 Enrichment 2 One source of data, multiple enrichments 1. Source publishes event 2. Aggregate stores entity 3. Enrichments runs and publishes event 4. Aggregate updates aggregate with enrichment
  • 31. Business insight Cloud Native Aarhus 2018 Business requires insight across services 1. Sources publish events 2. KPI subscribes on events and converts to own model 3. Tooling on top to provide insight KPI Source 1 Source 2 Source 3 DB
  • 32. External APIs and web hooks Cloud Native Aarhus 2018 3rd parties require access to your data 1. Sources publish events 2. External API subscribes on events and converts to own model 3. 3rd parties access external API and may register web hooks External API Source 1 Source 2 Source 3 DB External 1 External 2
  • 33. From pull to push Cloud Native Aarhus 2018 AppSync Rails DK 
 Partner Native iOS and Android app DB DK 
 PartnerRails DB Native iOS and Android app App triggers a pull (3-5 requests ~ 1-2 seconds) from partner bank with a DB transaction open Queue Never let an app request trigger a sync! Control the sync process and use async events to push data to the app on a web socket
  • 34. Wrapping up Cloud Native Aarhus 2018 Adapt to the size of your team Use asynchronous communication between services… preferably event driven Prioritise your deployment pipeline and runtime platform from the start Be systematic! Key takeaways if entering microservice land