SlideShare a Scribd company logo
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

More Related Content

PPTX
From Python to smartphones: neural nets @ Saint-Gobain, François Sausset
PDF
Automatic image moderation in classifieds
PDF
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
PPTX
Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and...
PDF
GPU Computing for Data Science
PPTX
C++ on the Web: Run your big 3D game in the browser
PDF
Writing native Linux desktop apps with JavaScript
PPTX
JavaScript (without DOM)
From Python to smartphones: neural nets @ Saint-Gobain, François Sausset
Automatic image moderation in classifieds
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and...
GPU Computing for Data Science
C++ on the Web: Run your big 3D game in the browser
Writing native Linux desktop apps with JavaScript
JavaScript (without DOM)

What's hot (20)

PDF
Add a backend and deploy!
PDF
Intro to React
PDF
Hidden Dragons of CGO
PDF
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
PPTX
Machine Learning on Your Hand - Introduction to Tensorflow Lite Preview
PDF
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
ODP
Real time-collaborative-editor-presentation
PDF
AddisDev Meetup ii: Golang and Flow-based Programming
PDF
Offscreen canvas 2021 update
PDF
From C++ to JS via Emscripten
PPTX
Pulumi. Modern Infrastructure as Code.
PDF
mpandya_poster
PPT
Porting and Maintaining your C++ Game on Android without losing your mind
PDF
平行化你的工作 part1
PPTX
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...
PPTX
Apache spark as a gateway drug to FP concepts taught and broken - Curry On 2018
PPTX
Simplifying training deep and serving learning models with big data in python...
PPTX
OMNeT Simulation Projects Guidance
PDF
Build a chatroom!
PDF
How my visualization tools use little memory: A tale of incrementalization an...
Add a backend and deploy!
Intro to React
Hidden Dragons of CGO
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
Machine Learning on Your Hand - Introduction to Tensorflow Lite Preview
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
Real time-collaborative-editor-presentation
AddisDev Meetup ii: Golang and Flow-based Programming
Offscreen canvas 2021 update
From C++ to JS via Emscripten
Pulumi. Modern Infrastructure as Code.
mpandya_poster
Porting and Maintaining your C++ Game on Android without losing your mind
平行化你的工作 part1
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...
Apache spark as a gateway drug to FP concepts taught and broken - Curry On 2018
Simplifying training deep and serving learning models with big data in python...
OMNeT Simulation Projects Guidance
Build a chatroom!
How my visualization tools use little memory: A tale of incrementalization an...
Ad

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

PDF
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
PDF
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
PPTX
Cloud native fundamentals
PDF
Cloud Native In-Depth
PPTX
Cloud to hybrid edge cloud evolution Jun112020.pptx
PDF
Developing Enterprise Applications for the Cloud, from Monolith to Microservice
PPTX
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
PDF
Testing the Migration of Monolithic Applications to Microservices on the Cloud
PPTX
Pros & Cons of Microservices Architecture
PDF
Adopting the Cloud
PDF
Modern Software Architecture - Cloud Scale Computing
PDF
Evolving to Cloud-Native - Nate Schutta (2/2)
PDF
The Need of Cloud-Native Application
PPTX
Introduction to Microservices and Cloud Native Application Architecture
PDF
Building Microservices Software practics
PPTX
JavaOne 2016 "Java, Microservices, Cloud and Containers"
PPTX
Think Cloud, Develop Locally
PDF
Cloud Migration Cookbook: A Guide To Moving Your Apps To The Cloud
PPTX
The Journey to Becoming Cloud Native – A Three Step Path to Modernizing Appli...
PPTX
The Cloud Native Journey
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
Cloud native fundamentals
Cloud Native In-Depth
Cloud to hybrid edge cloud evolution Jun112020.pptx
Developing Enterprise Applications for the Cloud, from Monolith to Microservice
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Testing the Migration of Monolithic Applications to Microservices on the Cloud
Pros & Cons of Microservices Architecture
Adopting the Cloud
Modern Software Architecture - Cloud Scale Computing
Evolving to Cloud-Native - Nate Schutta (2/2)
The Need of Cloud-Native Application
Introduction to Microservices and Cloud Native Application Architecture
Building Microservices Software practics
JavaOne 2016 "Java, Microservices, Cloud and Containers"
Think Cloud, Develop Locally
Cloud Migration Cookbook: A Guide To Moving Your Apps To The Cloud
The Journey to Becoming Cloud Native – A Three Step Path to Modernizing Appli...
The Cloud Native Journey
Ad

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

PDF
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
PDF
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
PDF
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
PDF
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
PDF
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
PDF
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
PDF
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
PDF
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
PDF
Osis18_Cloud : Pas de commun sans communauté ?
PDF
Osis18_Cloud : Projet Wolphin
PDF
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
PDF
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
PDF
Osis18_Cloud : Software-heritage
PDF
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
PDF
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
PDF
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
PDF
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
PDF
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
PDF
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
PDF
PyParis 2017 / Un mooc python, by thierry parmentelat
OSIS19_IoT :Transparent remote connectivity to short-range IoT devices, by Na...
OSIS19_Cloud : SAFC: Scheduling and Allocation Framework for Containers in a ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
OSIS19_Cloud : Performance and power management in virtualized data centers, ...
OSIS19_Cloud : Des objets dans le cloud, et qui y restent -- L'expérience du ...
OSIS19_Cloud : Attribution automatique de ressources pour micro-services, Alt...
OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : Software-heritage
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
PyParis 2017 / Un mooc python, by thierry parmentelat

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
KodekX | Application Modernization Development
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Electronic commerce courselecture one. Pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Diabetes mellitus diagnosis method based random forest with bat algorithm
KodekX | Application Modernization Development
Programs and apps: productivity, graphics, security and other tools
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
sap open course for s4hana steps from ECC to s4
NewMind AI Weekly Chronicles - August'25 Week I
Chapter 3 Spatial Domain Image Processing.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Advanced methodologies resolving dimensionality complications for autism neur...
Empathic Computing: Creating Shared Understanding
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Electronic commerce courselecture one. Pdf
Dropbox Q2 2025 Financial Results & Investor Presentation

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