SlideShare a Scribd company logo
1 of 51
Download to read offline
Python & Serverless
Refactor your monolith piece by piece
With @giuseppe_valla
500
Internal server error
Mmm.. That fresh fragrance of production bugs (*)
* Said nobody ever
Problem scenario
Each customer can check the perf. of
their own investment, with a private
dashboard.
Each investment is composed of
different financial instruments which
are categorised by a specific asset and
sub-asset class
Problem scenario
WebApp
DB
Investment
DB
Team
Finance
Lots of Read/Write Ops Mostly Read Ops
Team
IT
Problem scenario
The Investment DB and WebApp DB have similar db tables
related to the financial instruments (taxonomies and perf.
tracking).
Problem scenario
The Investment DB and WebApp DB have similar db tables
related to the financial instruments (taxonomies and perf.
tracking).
Databases are handled by two different teams and the update
of investment portfolios require human intervention.
Problem scenario
The Investment DB and WebApp DB have similar db tables
related to the financial instruments (taxonomies and perf.
tracking).
Databases are handled by two different teams and the update
of investment portfolios require human intervention.
Although the UI shows a hierarchical structure, data is
organised differently and the web servers rebuild this
structure for frontend consumption.
What can go wrong ?
The solution we adopted
WebApp
DB
Investment
DB
Border
DB
WebApp
Team
Finance
Team
IT
Command Query
Responsibility Segregation
“At its heart is the notion that you can
use a different model to update
information than the model you use to
read information…” (Martin Fowler)
The end ?
About me and…
• Software developer with an interest in
distributed systems and cloud computing
• Working in the finance domain for the past
5 years
• @giuseppe_valla / giuseppe.vallarelli@pm.me
Professional grade investment
portfolios for everybody, regardless
of the amount of capital invested
Transparent pricing, first company in Italy
publishing Mifid2 compliant report on
costs in April 2019
Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o
Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ?
Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼
Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠
Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
Serverless simply explained
Serverless simply explained again!
Any technology that cost you nothing to run if no one is using it. 
Serverless simply explained again!
Any technology that cost you nothing to run if no one is using it. 
Uptime of a Serverless solution is completely delegated to third party
providers, we are free from managing, scaling cloud resources and all
kind of security concerns
What if…
Are we there yet ?Are we there yet ?
Current limitations
Current limitations
Limited
Lifetime
Current limitations
Limited
Lifetime
I/O
Bottlenecks
Current limitations
Limited
Lifetime
I/O
Bottlenecks
No
Specialized
HW
Current limitations
Limited
Lifetime
I/O
Bottlenecks
No
Specialized
HW
“Serverless Computing: One Step Forward, Two Steps Back” (UC Berkley Paper)
FaaS a data-shipping architecture
https://aws.amazon.com/blogs/machine-learning/build-your-own-text-to-speech-applications-with-amazon-polly/
Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o
Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ?
Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼
Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠
Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
A Monolith, a microservice
“Software whose design, information
model and interface combine multiple
competing and interfering domains into
a single application and data model”
(Jimmy Bogard)
A Monolith, a microservice
“A service with a design focus towards
the smallest autonomous boundary”
(Jimmy Bogard)
Who uses microservices ?
Why ?
Should you ?
Pros / Cons Microservices
PROS CONS
Independent *
* deployment, scalability,
technology stack,
reusability
Increased Effort *
* monitoring, operations,
coordination, higher
complexity, requires serious
expertise
Distributed Systems are
everywhere…
Better get ready
Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o
Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ?
Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼
Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠
Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
Meet Euclidea Monoliths
Onboarding
Digital Signature *
Order Mgmt Finance *
Backoffice
Private Area
* Third party integration
Fund Selection
Portfolio Optimization
Risk Management
Portfolio Analytics
A service extraction recipe
Start by defining the APIs for the
service “A” to be extracted,
update the code to depend on this
new wrapping APIs.A
A service extraction recipe
Start by defining the APIs for the
service “A” to be extracted,
update the code to depend on this
new wrapping APIs.A
Create a new DB containing the
tables of interest for the service A.
Later switch the datastore from D1
to D2 (consider data migration).
D1
D2
A service extraction recipe
Start by defining the APIs for the
service “A” to be extracted,
update the code to depend on this
new wrapping APIs.A
Create a new DB containing the
tables of interest for the service A.
Later switch the datastore from D1
to D2 (consider data migration).
D1
D2
A
Extract the API and expose it
through a REST and Event
Interface.
But let’s not forget the spices…
Each service should be
autonomous depending
only on his own data to
avoid unnecessary coupling.
Data dependencies
But let’s not forget the spices…
Each service should be
autonomous depending
only on his own data to
avoid unnecessary coupling.
Data dependencies
Some data duplication is
allowed provided the
existence of a single source
which is deemed as
authoritative for the data.
And the main course!
• Synchronous/asynchronous
interaction
• Message observed/consumed
• Patterns: Request/Reply,
Request/Reaction, Inversion
of Communication, Saga and
more…
Integration patterns
Failure is the new happy path
Things we need to think about
• What if a service is a down ? Hint: fallbacks, idempotent
behaviour for consumer services.
• How do we keep evolving a service ? Hint: consumer contracts.
Migrate in small safe steps
Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o
Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ?
Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼
Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠
Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
Testing & Monitoring (1/2)
Unit
Integration
End-to-end
Test in
production
Contract
testing
Unit
Testing & Monitoring (2/2)
• Log Aggregation and the ability to trace a user’s request
through different subsystems
• Metrics of different kinds: system, application.
Very important to invest in tooling to analyse and understand
the distributed system’s whole behaviour.
Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o
Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ?
Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼
Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠
Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
References & Credits
• The Serverless Sea Change
• Serverless Computing: One Step Forward, Two Steps Back
• Serverless Best Practices
• Build Your Own Text-to-Speech Applications with Amazon Polly
• The Tao of Microservices
• Soa Patterns
• Honeycomb’s Charity Majors: Go Ahead, Test in Production
Photos credits: Vangelis Batsikostas, Ardian Lumi, Miguel Andrade, Louis Hansel,
Quino Al, Michal Parzuchowski
500 times
Thanks!

More Related Content

What's hot

Jan van der Vegt. Challenges faced with machine learning in practice
Jan van der Vegt. Challenges faced with machine learning in practiceJan van der Vegt. Challenges faced with machine learning in practice
Jan van der Vegt. Challenges faced with machine learning in practiceLviv Startup Club
 
Bhagvan Kommadi [Value Momentum] | TeleHealth Platform: DevOps-Based Progress...
Bhagvan Kommadi [Value Momentum] | TeleHealth Platform: DevOps-Based Progress...Bhagvan Kommadi [Value Momentum] | TeleHealth Platform: DevOps-Based Progress...
Bhagvan Kommadi [Value Momentum] | TeleHealth Platform: DevOps-Based Progress...InfluxData
 
Transform 2014: Kofax Altosoft™ Insight - Deep Dive
 Transform 2014: Kofax Altosoft™ Insight - Deep Dive Transform 2014: Kofax Altosoft™ Insight - Deep Dive
Transform 2014: Kofax Altosoft™ Insight - Deep DiveKofax
 
Migrating Monitoring to Observability – How to Transform DevOps from being Re...
Migrating Monitoring to Observability – How to Transform DevOps from being Re...Migrating Monitoring to Observability – How to Transform DevOps from being Re...
Migrating Monitoring to Observability – How to Transform DevOps from being Re...Liz Masters Lovelace
 
Ibm machine learning for z os
Ibm machine learning for z osIbm machine learning for z os
Ibm machine learning for z osCuneyt Goksu
 
Saving Human Lives with the IoT
Saving Human Lives with the IoTSaving Human Lives with the IoT
Saving Human Lives with the IoTDat Tran
 
How Customers Are Using the IBM Data Science Experience - Expected Cases and ...
How Customers Are Using the IBM Data Science Experience - Expected Cases and ...How Customers Are Using the IBM Data Science Experience - Expected Cases and ...
How Customers Are Using the IBM Data Science Experience - Expected Cases and ...Databricks
 
Comment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitablesComment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitablesElasticsearch
 
Feature Store as a Data Foundation for Machine Learning
Feature Store as a Data Foundation for Machine LearningFeature Store as a Data Foundation for Machine Learning
Feature Store as a Data Foundation for Machine LearningProvectus
 
Domain Driven Data: Apache Kafka® and the Data Mesh
Domain Driven Data: Apache Kafka® and the Data MeshDomain Driven Data: Apache Kafka® and the Data Mesh
Domain Driven Data: Apache Kafka® and the Data Meshconfluent
 
Bridging the Industrial IoT Gap
Bridging the Industrial IoT GapBridging the Industrial IoT Gap
Bridging the Industrial IoT GapJohn Speck
 
IBM CDS Overview
IBM CDS OverviewIBM CDS Overview
IBM CDS OverviewJean Tan
 
Unified Analytics in GE’s Predix for the IIoT: Tying Operational Technology t...
Unified Analytics in GE’s Predix for the IIoT: Tying Operational Technology t...Unified Analytics in GE’s Predix for the IIoT: Tying Operational Technology t...
Unified Analytics in GE’s Predix for the IIoT: Tying Operational Technology t...Altoros
 
Modern Reporting at Scale: How to Distribute Information and Answers to the M...
Modern Reporting at Scale: How to Distribute Information and Answers to the M...Modern Reporting at Scale: How to Distribute Information and Answers to the M...
Modern Reporting at Scale: How to Distribute Information and Answers to the M...TIBCO Jaspersoft
 
Postgres Vision 2018: Taking Postgres Everywhere
Postgres Vision 2018: Taking Postgres EverywherePostgres Vision 2018: Taking Postgres Everywhere
Postgres Vision 2018: Taking Postgres EverywhereEDB
 
Challenges of Operationalising Data Science in Production
Challenges of Operationalising Data Science in ProductionChallenges of Operationalising Data Science in Production
Challenges of Operationalising Data Science in Productioniguazio
 
PgConf 2018 - Postgres in a World of DevOps
PgConf 2018 - Postgres in a World of DevOpsPgConf 2018 - Postgres in a World of DevOps
PgConf 2018 - Postgres in a World of DevOpsEDB
 
Flight Delay Compensation: How SwissRe is exploring new territories in Busine...
Flight Delay Compensation: How SwissRe is exploring new territories in Busine...Flight Delay Compensation: How SwissRe is exploring new territories in Busine...
Flight Delay Compensation: How SwissRe is exploring new territories in Busine...Codit
 

What's hot (20)

MLOps with Kubeflow
MLOps with Kubeflow MLOps with Kubeflow
MLOps with Kubeflow
 
Jan van der Vegt. Challenges faced with machine learning in practice
Jan van der Vegt. Challenges faced with machine learning in practiceJan van der Vegt. Challenges faced with machine learning in practice
Jan van der Vegt. Challenges faced with machine learning in practice
 
Bhagvan Kommadi [Value Momentum] | TeleHealth Platform: DevOps-Based Progress...
Bhagvan Kommadi [Value Momentum] | TeleHealth Platform: DevOps-Based Progress...Bhagvan Kommadi [Value Momentum] | TeleHealth Platform: DevOps-Based Progress...
Bhagvan Kommadi [Value Momentum] | TeleHealth Platform: DevOps-Based Progress...
 
Global ai conf_final
Global ai conf_finalGlobal ai conf_final
Global ai conf_final
 
Transform 2014: Kofax Altosoft™ Insight - Deep Dive
 Transform 2014: Kofax Altosoft™ Insight - Deep Dive Transform 2014: Kofax Altosoft™ Insight - Deep Dive
Transform 2014: Kofax Altosoft™ Insight - Deep Dive
 
Migrating Monitoring to Observability – How to Transform DevOps from being Re...
Migrating Monitoring to Observability – How to Transform DevOps from being Re...Migrating Monitoring to Observability – How to Transform DevOps from being Re...
Migrating Monitoring to Observability – How to Transform DevOps from being Re...
 
Ibm machine learning for z os
Ibm machine learning for z osIbm machine learning for z os
Ibm machine learning for z os
 
Saving Human Lives with the IoT
Saving Human Lives with the IoTSaving Human Lives with the IoT
Saving Human Lives with the IoT
 
How Customers Are Using the IBM Data Science Experience - Expected Cases and ...
How Customers Are Using the IBM Data Science Experience - Expected Cases and ...How Customers Are Using the IBM Data Science Experience - Expected Cases and ...
How Customers Are Using the IBM Data Science Experience - Expected Cases and ...
 
Comment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitablesComment transformer vos données en informations exploitables
Comment transformer vos données en informations exploitables
 
Feature Store as a Data Foundation for Machine Learning
Feature Store as a Data Foundation for Machine LearningFeature Store as a Data Foundation for Machine Learning
Feature Store as a Data Foundation for Machine Learning
 
Domain Driven Data: Apache Kafka® and the Data Mesh
Domain Driven Data: Apache Kafka® and the Data MeshDomain Driven Data: Apache Kafka® and the Data Mesh
Domain Driven Data: Apache Kafka® and the Data Mesh
 
Bridging the Industrial IoT Gap
Bridging the Industrial IoT GapBridging the Industrial IoT Gap
Bridging the Industrial IoT Gap
 
IBM CDS Overview
IBM CDS OverviewIBM CDS Overview
IBM CDS Overview
 
Unified Analytics in GE’s Predix for the IIoT: Tying Operational Technology t...
Unified Analytics in GE’s Predix for the IIoT: Tying Operational Technology t...Unified Analytics in GE’s Predix for the IIoT: Tying Operational Technology t...
Unified Analytics in GE’s Predix for the IIoT: Tying Operational Technology t...
 
Modern Reporting at Scale: How to Distribute Information and Answers to the M...
Modern Reporting at Scale: How to Distribute Information and Answers to the M...Modern Reporting at Scale: How to Distribute Information and Answers to the M...
Modern Reporting at Scale: How to Distribute Information and Answers to the M...
 
Postgres Vision 2018: Taking Postgres Everywhere
Postgres Vision 2018: Taking Postgres EverywherePostgres Vision 2018: Taking Postgres Everywhere
Postgres Vision 2018: Taking Postgres Everywhere
 
Challenges of Operationalising Data Science in Production
Challenges of Operationalising Data Science in ProductionChallenges of Operationalising Data Science in Production
Challenges of Operationalising Data Science in Production
 
PgConf 2018 - Postgres in a World of DevOps
PgConf 2018 - Postgres in a World of DevOpsPgConf 2018 - Postgres in a World of DevOps
PgConf 2018 - Postgres in a World of DevOps
 
Flight Delay Compensation: How SwissRe is exploring new territories in Busine...
Flight Delay Compensation: How SwissRe is exploring new territories in Busine...Flight Delay Compensation: How SwissRe is exploring new territories in Busine...
Flight Delay Compensation: How SwissRe is exploring new territories in Busine...
 

Similar to Python & Serverless: Refactor your monolith piece by piece

The Value of Postgres to IT and Finance
The Value of Postgres to IT and FinanceThe Value of Postgres to IT and Finance
The Value of Postgres to IT and FinanceEDB
 
The Three Stages of Cloud Adoption - RightScale Compute 2013
The Three Stages of Cloud Adoption - RightScale Compute 2013The Three Stages of Cloud Adoption - RightScale Compute 2013
The Three Stages of Cloud Adoption - RightScale Compute 2013RightScale
 
How to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeHow to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeVMware Tanzu
 
20110514 PMI San Diego Keynote
20110514 PMI San Diego Keynote20110514 PMI San Diego Keynote
20110514 PMI San Diego KeynotePeter Coffee
 
Wicsa2011 cloud tutorial
Wicsa2011 cloud tutorialWicsa2011 cloud tutorial
Wicsa2011 cloud tutorialAnna Liu
 
Open Source and the New Economics of IT - Ingres CIO Doug Harr
Open Source and the New Economics of IT - Ingres CIO Doug HarrOpen Source and the New Economics of IT - Ingres CIO Doug Harr
Open Source and the New Economics of IT - Ingres CIO Doug HarrAlfresco Software
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database RoundtableEric Kavanagh
 
apidays LIVE Paris 2021 - APIs - How did we get here and where are we going n...
apidays LIVE Paris 2021 - APIs - How did we get here and where are we going n...apidays LIVE Paris 2021 - APIs - How did we get here and where are we going n...
apidays LIVE Paris 2021 - APIs - How did we get here and where are we going n...apidays
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCapgemini
 
Monitoring End User Experiences with New Relic & Splunk
Monitoring End User Experiences with New Relic & SplunkMonitoring End User Experiences with New Relic & Splunk
Monitoring End User Experiences with New Relic & SplunkAbner Germanow
 
The future of scaling forrester research - GigaSpaces Road Show 2011
The future of scaling forrester research - GigaSpaces Road Show 2011The future of scaling forrester research - GigaSpaces Road Show 2011
The future of scaling forrester research - GigaSpaces Road Show 2011Nati Shalom
 
MuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureMuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureKim Clark
 
Confluent Partner Tech Talk with BearingPoint
Confluent Partner Tech Talk with BearingPointConfluent Partner Tech Talk with BearingPoint
Confluent Partner Tech Talk with BearingPointconfluent
 
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...QuickBase, Inc.
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science PlatformDecision Science Community
 
Salesforce Multitenant Architecture: How We Do the Magic We Do
Salesforce Multitenant Architecture: How We Do the Magic We DoSalesforce Multitenant Architecture: How We Do the Magic We Do
Salesforce Multitenant Architecture: How We Do the Magic We DoSalesforce Developers
 
Single Source of Truth for Network Automation
Single Source of Truth for Network AutomationSingle Source of Truth for Network Automation
Single Source of Truth for Network AutomationAndy Davidson
 
Class conference 2014 daffara
Class conference 2014   daffaraClass conference 2014   daffara
Class conference 2014 daffaraCarlo Daffara
 

Similar to Python & Serverless: Refactor your monolith piece by piece (20)

The Value of Postgres to IT and Finance
The Value of Postgres to IT and FinanceThe Value of Postgres to IT and Finance
The Value of Postgres to IT and Finance
 
The Three Stages of Cloud Adoption - RightScale Compute 2013
The Three Stages of Cloud Adoption - RightScale Compute 2013The Three Stages of Cloud Adoption - RightScale Compute 2013
The Three Stages of Cloud Adoption - RightScale Compute 2013
 
How to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeHow to Migrate Applications Off a Mainframe
How to Migrate Applications Off a Mainframe
 
20110514 PMI San Diego Keynote
20110514 PMI San Diego Keynote20110514 PMI San Diego Keynote
20110514 PMI San Diego Keynote
 
Wicsa2011 cloud tutorial
Wicsa2011 cloud tutorialWicsa2011 cloud tutorial
Wicsa2011 cloud tutorial
 
Open Source and the New Economics of IT - Ingres CIO Doug Harr
Open Source and the New Economics of IT - Ingres CIO Doug HarrOpen Source and the New Economics of IT - Ingres CIO Doug Harr
Open Source and the New Economics of IT - Ingres CIO Doug Harr
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database Roundtable
 
apidays LIVE Paris 2021 - APIs - How did we get here and where are we going n...
apidays LIVE Paris 2021 - APIs - How did we get here and where are we going n...apidays LIVE Paris 2021 - APIs - How did we get here and where are we going n...
apidays LIVE Paris 2021 - APIs - How did we get here and where are we going n...
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der wal
 
Ibt Soa Babson Talk V8
Ibt Soa Babson Talk V8Ibt Soa Babson Talk V8
Ibt Soa Babson Talk V8
 
Monitoring End User Experiences with New Relic & Splunk
Monitoring End User Experiences with New Relic & SplunkMonitoring End User Experiences with New Relic & Splunk
Monitoring End User Experiences with New Relic & Splunk
 
The future of scaling forrester research - GigaSpaces Road Show 2011
The future of scaling forrester research - GigaSpaces Road Show 2011The future of scaling forrester research - GigaSpaces Road Show 2011
The future of scaling forrester research - GigaSpaces Road Show 2011
 
MuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureMuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration Architecture
 
Confluent Partner Tech Talk with BearingPoint
Confluent Partner Tech Talk with BearingPointConfluent Partner Tech Talk with BearingPoint
Confluent Partner Tech Talk with BearingPoint
 
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science Platform
 
Api enablement-mainframe
Api enablement-mainframeApi enablement-mainframe
Api enablement-mainframe
 
Salesforce Multitenant Architecture: How We Do the Magic We Do
Salesforce Multitenant Architecture: How We Do the Magic We DoSalesforce Multitenant Architecture: How We Do the Magic We Do
Salesforce Multitenant Architecture: How We Do the Magic We Do
 
Single Source of Truth for Network Automation
Single Source of Truth for Network AutomationSingle Source of Truth for Network Automation
Single Source of Truth for Network Automation
 
Class conference 2014 daffara
Class conference 2014   daffaraClass conference 2014   daffara
Class conference 2014 daffara
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Python & Serverless: Refactor your monolith piece by piece

  • 1. Python & Serverless Refactor your monolith piece by piece With @giuseppe_valla
  • 2. 500 Internal server error Mmm.. That fresh fragrance of production bugs (*) * Said nobody ever
  • 3.
  • 4. Problem scenario Each customer can check the perf. of their own investment, with a private dashboard. Each investment is composed of different financial instruments which are categorised by a specific asset and sub-asset class
  • 5. Problem scenario WebApp DB Investment DB Team Finance Lots of Read/Write Ops Mostly Read Ops Team IT
  • 6. Problem scenario The Investment DB and WebApp DB have similar db tables related to the financial instruments (taxonomies and perf. tracking).
  • 7. Problem scenario The Investment DB and WebApp DB have similar db tables related to the financial instruments (taxonomies and perf. tracking). Databases are handled by two different teams and the update of investment portfolios require human intervention.
  • 8. Problem scenario The Investment DB and WebApp DB have similar db tables related to the financial instruments (taxonomies and perf. tracking). Databases are handled by two different teams and the update of investment portfolios require human intervention. Although the UI shows a hierarchical structure, data is organised differently and the web servers rebuild this structure for frontend consumption.
  • 9. What can go wrong ?
  • 10. The solution we adopted WebApp DB Investment DB Border DB WebApp Team Finance Team IT
  • 11. Command Query Responsibility Segregation “At its heart is the notion that you can use a different model to update information than the model you use to read information…” (Martin Fowler)
  • 13. About me and… • Software developer with an interest in distributed systems and cloud computing • Working in the finance domain for the past 5 years • @giuseppe_valla / giuseppe.vallarelli@pm.me
  • 14. Professional grade investment portfolios for everybody, regardless of the amount of capital invested Transparent pricing, first company in Italy publishing Mifid2 compliant report on costs in April 2019
  • 15. Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ? Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼 Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠 Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
  • 17. Serverless simply explained again! Any technology that cost you nothing to run if no one is using it. 
  • 18. Serverless simply explained again! Any technology that cost you nothing to run if no one is using it.  Uptime of a Serverless solution is completely delegated to third party providers, we are free from managing, scaling cloud resources and all kind of security concerns
  • 20. Are we there yet ?Are we there yet ?
  • 26. FaaS a data-shipping architecture https://aws.amazon.com/blogs/machine-learning/build-your-own-text-to-speech-applications-with-amazon-polly/
  • 27. Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ? Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼 Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠 Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
  • 28. A Monolith, a microservice “Software whose design, information model and interface combine multiple competing and interfering domains into a single application and data model” (Jimmy Bogard)
  • 29. A Monolith, a microservice “A service with a design focus towards the smallest autonomous boundary” (Jimmy Bogard)
  • 31. Why ?
  • 33. Pros / Cons Microservices PROS CONS Independent * * deployment, scalability, technology stack, reusability Increased Effort * * monitoring, operations, coordination, higher complexity, requires serious expertise
  • 35. Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ? Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼 Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠 Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
  • 36. Meet Euclidea Monoliths Onboarding Digital Signature * Order Mgmt Finance * Backoffice Private Area * Third party integration Fund Selection Portfolio Optimization Risk Management Portfolio Analytics
  • 37. A service extraction recipe Start by defining the APIs for the service “A” to be extracted, update the code to depend on this new wrapping APIs.A
  • 38. A service extraction recipe Start by defining the APIs for the service “A” to be extracted, update the code to depend on this new wrapping APIs.A Create a new DB containing the tables of interest for the service A. Later switch the datastore from D1 to D2 (consider data migration). D1 D2
  • 39. A service extraction recipe Start by defining the APIs for the service “A” to be extracted, update the code to depend on this new wrapping APIs.A Create a new DB containing the tables of interest for the service A. Later switch the datastore from D1 to D2 (consider data migration). D1 D2 A Extract the API and expose it through a REST and Event Interface.
  • 40. But let’s not forget the spices… Each service should be autonomous depending only on his own data to avoid unnecessary coupling. Data dependencies
  • 41. But let’s not forget the spices… Each service should be autonomous depending only on his own data to avoid unnecessary coupling. Data dependencies Some data duplication is allowed provided the existence of a single source which is deemed as authoritative for the data.
  • 42. And the main course! • Synchronous/asynchronous interaction • Message observed/consumed • Patterns: Request/Reply, Request/Reaction, Inversion of Communication, Saga and more… Integration patterns
  • 43. Failure is the new happy path
  • 44. Things we need to think about • What if a service is a down ? Hint: fallbacks, idempotent behaviour for consumer services. • How do we keep evolving a service ? Hint: consumer contracts.
  • 45. Migrate in small safe steps
  • 46. Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ? Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼 Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠 Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
  • 47. Testing & Monitoring (1/2) Unit Integration End-to-end Test in production Contract testing Unit
  • 48. Testing & Monitoring (2/2) • Log Aggregation and the ability to trace a user’s request through different subsystems • Metrics of different kinds: system, application. Very important to invest in tooling to analyse and understand the distributed system’s whole behaviour.
  • 49. Ser󰉏󰈩󰈹l󰇵󰈻󰈼 In󰉃󰈹o Fro󰈚 󰈀 󰈛󰈢no󰈗󰈎󰉄h 󰉃󰈢 󰈛ic󰈸󰈡 󰈼󰇵r󰉏i󰇸󰈩s ? Ex󰉃󰈹ac󰉃󰈎󰈞g 󰈻󰈢󰈛e m󰈡󰇷󰉊󰈘es 󰈎󰈝󰉄󰈢 in󰇷󰈩󰈦󰇵n󰇷e󰈞t 󰈻󰈩󰈹v󰈏󰇹e󰈼 Usi󰈝󰈈 󰈩v󰇵󰈝󰉄s a󰈻 󰉄r󰈎󰈇󰈈󰇵r 󰉃o 󰈡󰉊󰈹 Fa󰈀󰈠 Tes󰉃󰈎󰈞g & Mo󰈝󰈎󰉄󰈢ri󰈝󰈈
  • 50. References & Credits • The Serverless Sea Change • Serverless Computing: One Step Forward, Two Steps Back • Serverless Best Practices • Build Your Own Text-to-Speech Applications with Amazon Polly • The Tao of Microservices • Soa Patterns • Honeycomb’s Charity Majors: Go Ahead, Test in Production Photos credits: Vangelis Batsikostas, Ardian Lumi, Miguel Andrade, Louis Hansel, Quino Al, Michal Parzuchowski