Designing and coding for cloud-native applications using Python, Harjinder Mistry

Pôle Systematic Paris-Region
Pôle Systematic Paris-RegionPôle Systematic Paris-Region
Coding For Cloud
Harjindersingh Mistry
Bargava Subramanian
Red Hat
Grace
● Smart individual
● Just finished MBA
Mark
● A geek
● Just completed engineering
Grace & Mark
Online Store
Hey Mark,
We don’t have enough money to
buy our own servers !
So, can we rent some ?
That sounds like a good idea, Grace !
That’s called Cloud Computing. I
remember what Prof told about it ...
Cloud Computing
● Computers on rent
● Some guy has lot of computer infrastructure
○ He wants to give it on rent to make money
● Very similar to car-rental service like Europcar
● Cloud-native Application is a program that is designed and
developed specifically for cloud computing architecture
Alright, I have finished the
implementation !
Cloud, Take it and go !
Hey dude, customers are
reporting that our service is very
slow :(
Please check what is wrong
there.
Oh! is it ? But I had used best algo!
Ahha, there seems to be a scalability
issue. Let me call my Prof and get his
suggestions ...
Horizontal Scalability
● Think of data in terms of standard ‘collections’
● Write functional as much as possible
● Let the data flow through functions:
○ If data is static then we can do Parallel Processing
○ If data size is not fully known then we can be Reactive
○ There is also a possibility of mixing them together by using Stream
Processing
Alright, I have done cool
clustering and my architecture is
reactive now!
Cloud, …. take it and go !
Wow Mark, the customers seem
to be happy with performance
now :)
But one customer has reported a
bug ! Can you please fix it ?
Oh! is it ? Let me check that.
It might be something related to
“data-access” module.
Ok ! So, I have fixed the
“data-access” module.
Cloud, …. take it and go one
more time !
Hey dude, what are your
programming ?!?
There is another bug reported :(
Oh! is it ? Let me check that.
Oh man, this debugging is taking
forever :(
I need to configure the whole
system to repro the scenario !
...
Finally, I got it !!!
Bug is inside “business-logic”
module. I fixed it. Let me test the
whole app.
Come on Mark ! How much more
time do you need ?
Ok ! So, the tests passed. Cloud, ….
take it and go one more time !
Wait, now I remember what Prof
said about Micro Services ...
Micro Services
● Divide the whole application into smaller services, called
Micro Services
● It gives flexibility in testing and deploying in small
independent chunks
● This improves maintainability a lot
Ok ! So, I have done Micro
Services :)
Cloud, …. take it and go !
Awesome Mark ! We are doing
good !
How about adding one new
feature into our store !
Oh yes ! That will be fun :)
It has been while since I coded
something meaningful !
Alright ! The new feature is ready !
But I somehow don’t like all micro
services sharing same computing
resources :(
Let me talk to Prof ...
Containers
● Deploy services by using Containers
● Containers increase speed of deployment
● Developer can simulate production environment locally
● Moreover, each service runs in its own environment
○ So if one service goes down, others are still safe
So, now I have each micro
service containerized separately
! That looks good.
Cloud, take it and go !
Crux of the Story
● Current business model demands speed
○ Need to experiment: It’s ok to fail, but fail fast
○ Need the ability to react: Everything cannot be planned
● But, the software has to be good in terms of:
○ Correctness
○ Performance
○ Maintainability
○ Operability
Cloud Native Application
● It helps us experiment with an idea
● We can achieve those attributes of good software as follows:
○ Correctness: Test cases. This cannot change :)
○ Performance: Horizontal Scalability
○ Maintainability: Micro Services
○ Operability: Containers
Cloud Native Application: Example
● Movie Recommendation Service
● Cloud Native Machine Learning Application in Python
● There are two parts:
○ Offline Training Job:
○ Online Scoring Service:
Movie Data Training Job ML Model Cloud Storage
User Input + Model Scoring Service Recommendations
Layers of Cloud Native Application
Deployment
Output Channel
Functionality
Data Access
S3 Local Files ...
Functionality Layer
● Contains core business logic
● As much ‘functional’ as possible i.e. immutability and statelessness
● Data flows through pipeline of functions:
● For example:
Input Data Function-1 ... Function-N Output Result
Input Data Read/Split Transform Train ML Model
Data Access Layer
● Provides abstraction on various data sources
● Helps in testing the core logic locally
Abstract Class / Interface
S3 Local Files ...
Output Channel Layer
● Different channels for different consumers
● For micro service, it will have REST component
Functionality
CLI REST ...
Deployment Layer
● Contains the scripts for deployments
○ Docker files and/or YAML files for containers
○ Python scripts with calls to vendor-specific APIs e.g. AWS API run_job_flow()
Demo
● Functionality Layer: Training
● Functionality Layer: Scoring
● Deployment Layer: OpenShift
Input Data Read/Split Transform Train ML Model
User Input + Model Scoring Service Recommendations
Not Covered
● Continuous Integration / Continuous Delivery
● Security
● Monitoring
● Vendor APIs for deployment
Code, Slides and Contact
● Code:
○ https://github.com/harjinder-hari/cloud_native_analytics
● Slides:
○ https://speakerdeck.com/harjinderhari/coding-for-cloud
● Contact:
○ Harjinder email: harjinder.v2@gmail.com
○ Bargava twitter: @bargava
Conclusion
● Current business model demands speed
○ Need to experiment: It’s ok to fail, but fail fast
○ Need the ability to react: Everything cannot be planned
● Cloud Native Applications is a way to achieve it
○ We saw
■ Layers involved in a cloud native application
■ Techniques to achieve the required speed
■ Everything is written in Python ! :)
Images Courtesy
[1] Grace and Mark
https://image.freepik.com/free-vector/happy-university-students_23-2147531065.jpg
[2] Professor
https://image.freepik.com/free-vector/science-teacher_23-2147509483.jpg
[3] Rocket
https://image.freepik.com/free-vector/launching-business-concept_23-2147504957.jpg
1 of 33

Recommended

From Python to smartphones: neural nets @ Saint-Gobain, François Sausset by
From Python to smartphones: neural nets @ Saint-Gobain, François SaussetFrom Python to smartphones: neural nets @ Saint-Gobain, François Sausset
From Python to smartphones: neural nets @ Saint-Gobain, François SaussetPôle Systematic Paris-Region
404 views7 slides
Automatic image moderation in classifieds by
Automatic image moderation in classifiedsAutomatic image moderation in classifieds
Automatic image moderation in classifiedsJaroslaw Szymczak
721 views37 slides
Building a high-performance, scalable ML & NLP platform with Python, Sheer El... by
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...Pôle Systematic Paris-Region
3.1K views27 slides
Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and... by
Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and...Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and...
Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and...Pôle Systematic Paris-Region
2.3K views57 slides
GPU Computing for Data Science by
GPU Computing for Data Science GPU Computing for Data Science
GPU Computing for Data Science Domino Data Lab
33.5K views34 slides
C++ on the Web: Run your big 3D game in the browser by
C++ on the Web: Run your big 3D game in the browserC++ on the Web: Run your big 3D game in the browser
C++ on the Web: Run your big 3D game in the browserAndre Weissflog
49.7K views34 slides

More Related Content

What's hot

Add a backend and deploy! by
Add a backend and deploy!Add a backend and deploy!
Add a backend and deploy!SheilaJimenezMorejon
82 views9 slides
JSUG - QTJambi by Jan Zarnikov by
JSUG - QTJambi by Jan ZarnikovJSUG - QTJambi by Jan Zarnikov
JSUG - QTJambi by Jan ZarnikovChristoph Pickl
348 views10 slides
Intro to React by
Intro to ReactIntro to React
Intro to ReactSheilaJimenezMorejon
238 views15 slides
Hidden Dragons of CGO by
Hidden Dragons of CGOHidden Dragons of CGO
Hidden Dragons of CGOAll Things Open
201 views40 slides
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ... by
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...Codemotion
456 views27 slides
Machine Learning on Your Hand - Introduction to Tensorflow Lite Preview by
Machine Learning on Your Hand - Introduction to Tensorflow Lite PreviewMachine Learning on Your Hand - Introduction to Tensorflow Lite Preview
Machine Learning on Your Hand - Introduction to Tensorflow Lite PreviewModulabs
1.5K views53 slides

What's hot(20)

Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ... by Codemotion
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
Codemotion456 views
Machine Learning on Your Hand - Introduction to Tensorflow Lite Preview by Modulabs
Machine Learning on Your Hand - Introduction to Tensorflow Lite PreviewMachine Learning on Your Hand - Introduction to Tensorflow Lite Preview
Machine Learning on Your Hand - Introduction to Tensorflow Lite Preview
Modulabs1.5K views
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020) by Igalia
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
Igalia64 views
Real time-collaborative-editor-presentation by bflueras
Real time-collaborative-editor-presentationReal time-collaborative-editor-presentation
Real time-collaborative-editor-presentation
bflueras1.1K views
AddisDev Meetup ii: Golang and Flow-based Programming by Samuel Lampa
AddisDev Meetup ii: Golang and Flow-based ProgrammingAddisDev Meetup ii: Golang and Flow-based Programming
AddisDev Meetup ii: Golang and Flow-based Programming
Samuel Lampa5.1K views
Offscreen canvas 2021 update by Igalia
Offscreen canvas 2021 updateOffscreen canvas 2021 update
Offscreen canvas 2021 update
Igalia157 views
From C++ to JS via Emscripten by TomNickson
From C++ to JS via EmscriptenFrom C++ to JS via Emscripten
From C++ to JS via Emscripten
TomNickson903 views
Pulumi. Modern Infrastructure as Code. by Yurii Bychenok
Pulumi. Modern Infrastructure as Code.Pulumi. Modern Infrastructure as Code.
Pulumi. Modern Infrastructure as Code.
Yurii Bychenok696 views
Porting and Maintaining your C++ Game on Android without losing your mind by BeMyApp
Porting and Maintaining your C++ Game on Android without losing your mindPorting and Maintaining your C++ Game on Android without losing your mind
Porting and Maintaining your C++ Game on Android without losing your mind
BeMyApp2.8K views
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON... by Holden Karau
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...
Holden Karau259 views
Apache spark as a gateway drug to FP concepts taught and broken - Curry On 2018 by Holden Karau
Apache spark as a gateway drug to FP concepts taught and broken - Curry On 2018Apache spark as a gateway drug to FP concepts taught and broken - Curry On 2018
Apache spark as a gateway drug to FP concepts taught and broken - Curry On 2018
Holden Karau84 views
Simplifying training deep and serving learning models with big data in python... by Holden Karau
Simplifying training deep and serving learning models with big data in python...Simplifying training deep and serving learning models with big data in python...
Simplifying training deep and serving learning models with big data in python...
Holden Karau70 views

Similar to Designing and coding for cloud-native applications using Python, Harjinder Mistry

ML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning Infrastructure by
ML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning InfrastructureML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning Infrastructure
ML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning InfrastructureFei Chen
3.9K views52 slides
Serverless - DevOps Lessons Learned From Production by
Serverless - DevOps Lessons Learned From ProductionServerless - DevOps Lessons Learned From Production
Serverless - DevOps Lessons Learned From ProductionSteve Hogg
98 views39 slides
From prototype to production - The journey of re-designing SmartUp.io by
From prototype to production - The journey of re-designing SmartUp.ioFrom prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.ioMáté Lang
118 views80 slides
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric... by
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...Haggai Philip Zagury
8 views50 slides
AirBNB's ML platform - BigHead by
AirBNB's ML platform - BigHeadAirBNB's ML platform - BigHead
AirBNB's ML platform - BigHeadKarthik Murugesan
1K views54 slides
Bighead: Airbnb’s End-to-End Machine Learning Platform with Krishna Puttaswa... by
 Bighead: Airbnb’s End-to-End Machine Learning Platform with Krishna Puttaswa... Bighead: Airbnb’s End-to-End Machine Learning Platform with Krishna Puttaswa...
Bighead: Airbnb’s End-to-End Machine Learning Platform with Krishna Puttaswa...Databricks
35.3K views54 slides

Similar to Designing and coding for cloud-native applications using Python, Harjinder Mistry(20)

ML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning Infrastructure by Fei Chen
ML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning InfrastructureML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning Infrastructure
ML Platform Q1 Meetup: Airbnb's End-to-End Machine Learning Infrastructure
Fei Chen3.9K views
Serverless - DevOps Lessons Learned From Production by Steve Hogg
Serverless - DevOps Lessons Learned From ProductionServerless - DevOps Lessons Learned From Production
Serverless - DevOps Lessons Learned From Production
Steve Hogg98 views
From prototype to production - The journey of re-designing SmartUp.io by Máté Lang
From prototype to production - The journey of re-designing SmartUp.ioFrom prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.io
Máté Lang118 views
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric... by Haggai Philip Zagury
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
Bighead: Airbnb’s End-to-End Machine Learning Platform with Krishna Puttaswa... by Databricks
 Bighead: Airbnb’s End-to-End Machine Learning Platform with Krishna Puttaswa... Bighead: Airbnb’s End-to-End Machine Learning Platform with Krishna Puttaswa...
Bighead: Airbnb’s End-to-End Machine Learning Platform with Krishna Puttaswa...
Databricks35.3K views
Evolving to Cloud-Native - Anand Rao by VMware Tanzu
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand Rao
VMware Tanzu471 views
Triangle Devops Meetup 10/2015 by aspyker
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015
aspyker1.1K views
Rapid app building with loopback framework by Thomas Papaspiros
Rapid app building with loopback frameworkRapid app building with loopback framework
Rapid app building with loopback framework
Thomas Papaspiros347 views
Services, dependencies, and you by Sean Kelly
Services, dependencies, and youServices, dependencies, and you
Services, dependencies, and you
Sean Kelly919 views
Evolving your api architecture with the strangler pattern by dwcarter74
Evolving your api architecture with the strangler patternEvolving your api architecture with the strangler pattern
Evolving your api architecture with the strangler pattern
dwcarter74138 views
The working architecture of NodeJS applications, Виктор Турский by Sigma Software
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
Sigma Software115 views
The working architecture of node js applications open tech week javascript ... by Viktor Turskyi
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
Viktor Turskyi527 views
Guidelines to understand durable functions with .net core, c# and stateful se... by Concetto Labs
Guidelines to understand durable functions with .net core, c# and stateful se...Guidelines to understand durable functions with .net core, c# and stateful se...
Guidelines to understand durable functions with .net core, c# and stateful se...
Concetto Labs31 views
Viktor Turskyi "Effective NodeJS Application Development" by Fwdays
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
Fwdays521 views
Cloud-Native Progressive Delivery by Matt Turner
Cloud-Native Progressive DeliveryCloud-Native Progressive Delivery
Cloud-Native Progressive Delivery
Matt Turner119 views
Advanced web application architecture - Talk by Matthias Noback
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
Matthias Noback686 views
Ledingkart Meetup #1: Monolithic to microservices in action by Mukesh Singh
Ledingkart Meetup #1: Monolithic to microservices in actionLedingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in action
Mukesh Singh569 views

More from Pôle Systematic Paris-Region

OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na... by
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...Pôle Systematic Paris-Region
686 views39 slides
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ... by
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...Pôle Systematic Paris-Region
293 views24 slides
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ... by
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...Pôle Systematic Paris-Region
349 views38 slides
OSIS19_Cloud : Performance and power management in virtualized data centers, ... by
OSIS19_Cloud : Performance and power management in virtualized data centers, ...OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...Pôle Systematic Paris-Region
288 views27 slides
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ... by
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...Pôle Systematic Paris-Region
271 views30 slides
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt... by
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...Pôle Systematic Paris-Region
229 views9 slides

More from Pôle Systematic Paris-Region(20)

Recently uploaded

Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...ShapeBlue
154 views62 slides
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...ShapeBlue
85 views10 slides
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueShapeBlue
94 views13 slides
Network Source of Truth and Infrastructure as Code revisited by
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
52 views45 slides
The Power of Heat Decarbonisation Plans in the Built Environment by
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built EnvironmentIES VE
69 views20 slides
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...ShapeBlue
117 views25 slides

Recently uploaded(20)

Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue154 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue85 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue94 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE69 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue117 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue103 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue132 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue179 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue98 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue138 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue84 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu365 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
DRBD Deep Dive - Philipp Reisner - LINBIT by ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue140 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue93 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue197 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue222 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue253 views

Designing and coding for cloud-native applications using Python, Harjinder Mistry

  • 1. Coding For Cloud Harjindersingh Mistry Bargava Subramanian Red Hat
  • 2. Grace ● Smart individual ● Just finished MBA Mark ● A geek ● Just completed engineering
  • 4. Hey Mark, We don’t have enough money to buy our own servers ! So, can we rent some ? That sounds like a good idea, Grace ! That’s called Cloud Computing. I remember what Prof told about it ...
  • 5. Cloud Computing ● Computers on rent ● Some guy has lot of computer infrastructure ○ He wants to give it on rent to make money ● Very similar to car-rental service like Europcar ● Cloud-native Application is a program that is designed and developed specifically for cloud computing architecture
  • 6. Alright, I have finished the implementation ! Cloud, Take it and go !
  • 7. Hey dude, customers are reporting that our service is very slow :( Please check what is wrong there. Oh! is it ? But I had used best algo! Ahha, there seems to be a scalability issue. Let me call my Prof and get his suggestions ...
  • 8. Horizontal Scalability ● Think of data in terms of standard ‘collections’ ● Write functional as much as possible ● Let the data flow through functions: ○ If data is static then we can do Parallel Processing ○ If data size is not fully known then we can be Reactive ○ There is also a possibility of mixing them together by using Stream Processing
  • 9. Alright, I have done cool clustering and my architecture is reactive now! Cloud, …. take it and go !
  • 10. Wow Mark, the customers seem to be happy with performance now :) But one customer has reported a bug ! Can you please fix it ? Oh! is it ? Let me check that. It might be something related to “data-access” module.
  • 11. Ok ! So, I have fixed the “data-access” module. Cloud, …. take it and go one more time !
  • 12. Hey dude, what are your programming ?!? There is another bug reported :( Oh! is it ? Let me check that.
  • 13. Oh man, this debugging is taking forever :( I need to configure the whole system to repro the scenario ! ... Finally, I got it !!! Bug is inside “business-logic” module. I fixed it. Let me test the whole app. Come on Mark ! How much more time do you need ?
  • 14. Ok ! So, the tests passed. Cloud, …. take it and go one more time ! Wait, now I remember what Prof said about Micro Services ...
  • 15. Micro Services ● Divide the whole application into smaller services, called Micro Services ● It gives flexibility in testing and deploying in small independent chunks ● This improves maintainability a lot
  • 16. Ok ! So, I have done Micro Services :) Cloud, …. take it and go !
  • 17. Awesome Mark ! We are doing good ! How about adding one new feature into our store ! Oh yes ! That will be fun :) It has been while since I coded something meaningful !
  • 18. Alright ! The new feature is ready ! But I somehow don’t like all micro services sharing same computing resources :( Let me talk to Prof ...
  • 19. Containers ● Deploy services by using Containers ● Containers increase speed of deployment ● Developer can simulate production environment locally ● Moreover, each service runs in its own environment ○ So if one service goes down, others are still safe
  • 20. So, now I have each micro service containerized separately ! That looks good. Cloud, take it and go !
  • 21. Crux of the Story ● Current business model demands speed ○ Need to experiment: It’s ok to fail, but fail fast ○ Need the ability to react: Everything cannot be planned ● But, the software has to be good in terms of: ○ Correctness ○ Performance ○ Maintainability ○ Operability
  • 22. Cloud Native Application ● It helps us experiment with an idea ● We can achieve those attributes of good software as follows: ○ Correctness: Test cases. This cannot change :) ○ Performance: Horizontal Scalability ○ Maintainability: Micro Services ○ Operability: Containers
  • 23. Cloud Native Application: Example ● Movie Recommendation Service ● Cloud Native Machine Learning Application in Python ● There are two parts: ○ Offline Training Job: ○ Online Scoring Service: Movie Data Training Job ML Model Cloud Storage User Input + Model Scoring Service Recommendations
  • 24. Layers of Cloud Native Application Deployment Output Channel Functionality Data Access S3 Local Files ...
  • 25. Functionality Layer ● Contains core business logic ● As much ‘functional’ as possible i.e. immutability and statelessness ● Data flows through pipeline of functions: ● For example: Input Data Function-1 ... Function-N Output Result Input Data Read/Split Transform Train ML Model
  • 26. Data Access Layer ● Provides abstraction on various data sources ● Helps in testing the core logic locally Abstract Class / Interface S3 Local Files ...
  • 27. Output Channel Layer ● Different channels for different consumers ● For micro service, it will have REST component Functionality CLI REST ...
  • 28. Deployment Layer ● Contains the scripts for deployments ○ Docker files and/or YAML files for containers ○ Python scripts with calls to vendor-specific APIs e.g. AWS API run_job_flow()
  • 29. Demo ● Functionality Layer: Training ● Functionality Layer: Scoring ● Deployment Layer: OpenShift Input Data Read/Split Transform Train ML Model User Input + Model Scoring Service Recommendations
  • 30. Not Covered ● Continuous Integration / Continuous Delivery ● Security ● Monitoring ● Vendor APIs for deployment
  • 31. Code, Slides and Contact ● Code: ○ https://github.com/harjinder-hari/cloud_native_analytics ● Slides: ○ https://speakerdeck.com/harjinderhari/coding-for-cloud ● Contact: ○ Harjinder email: harjinder.v2@gmail.com ○ Bargava twitter: @bargava
  • 32. Conclusion ● Current business model demands speed ○ Need to experiment: It’s ok to fail, but fail fast ○ Need the ability to react: Everything cannot be planned ● Cloud Native Applications is a way to achieve it ○ We saw ■ Layers involved in a cloud native application ■ Techniques to achieve the required speed ■ Everything is written in Python ! :)
  • 33. Images Courtesy [1] Grace and Mark https://image.freepik.com/free-vector/happy-university-students_23-2147531065.jpg [2] Professor https://image.freepik.com/free-vector/science-teacher_23-2147509483.jpg [3] Rocket https://image.freepik.com/free-vector/launching-business-concept_23-2147504957.jpg