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

What's hot

Apache 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 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 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...
Simplifying training deep and serving learning models with big data in python...
Holden Karau
 

What's hot (20)

Add a backend and deploy!
Add a backend and deploy!Add a backend and deploy!
Add a backend and deploy!
 
JSUG - QTJambi by Jan Zarnikov
JSUG - QTJambi by Jan ZarnikovJSUG - QTJambi by Jan Zarnikov
JSUG - QTJambi by Jan Zarnikov
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Hidden Dragons of CGO
Hidden Dragons of CGOHidden Dragons of CGO
Hidden Dragons of CGO
 
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 ...
Carlo Sciolla - Above and beyond type systems with clojure.spec - Codemotion ...
 
Machine Learning on Your Hand - Introduction to Tensorflow Lite Preview
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
 
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)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
 
Real time-collaborative-editor-presentation
Real time-collaborative-editor-presentationReal time-collaborative-editor-presentation
Real time-collaborative-editor-presentation
 
AddisDev Meetup ii: Golang and Flow-based Programming
AddisDev Meetup ii: Golang and Flow-based ProgrammingAddisDev Meetup ii: Golang and Flow-based Programming
AddisDev Meetup ii: Golang and Flow-based Programming
 
Offscreen canvas 2021 update
Offscreen canvas 2021 updateOffscreen canvas 2021 update
Offscreen canvas 2021 update
 
From C++ to JS via Emscripten
From C++ to JS via EmscriptenFrom C++ to JS via Emscripten
From C++ to JS via Emscripten
 
Pulumi. Modern Infrastructure as Code.
Pulumi. Modern Infrastructure as Code.Pulumi. Modern Infrastructure as Code.
Pulumi. Modern Infrastructure as Code.
 
mpandya_poster
mpandya_postermpandya_poster
mpandya_poster
 
Porting and Maintaining your C++ Game on Android without losing your mind
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
 
平行化你的工作 part1
平行化你的工作 part1平行化你的工作 part1
平行化你的工作 part1
 
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...
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
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
 
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...
Simplifying training deep and serving learning models with big data in python...
 
OMNeT Simulation Projects Guidance
OMNeT Simulation Projects GuidanceOMNeT Simulation Projects Guidance
OMNeT Simulation Projects Guidance
 
Build a chatroom!
Build a chatroom!Build a chatroom!
Build a chatroom!
 

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

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
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
 
Serverless - DevOps Lessons Learned From Production
Serverless - DevOps Lessons Learned From ProductionServerless - DevOps Lessons Learned From Production
Serverless - DevOps Lessons Learned From Production
 
From prototype to production - The journey of re-designing SmartUp.io
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
 
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...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
 
AirBNB's ML platform - BigHead
AirBNB's ML platform - BigHeadAirBNB's ML platform - BigHead
AirBNB's ML platform - BigHead
 
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...
Bighead: Airbnb’s End-to-End Machine Learning Platform with Krishna Puttaswa...
 
Evolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand Rao
 
Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015
 
Rapid app building with loopback framework
Rapid app building with loopback frameworkRapid app building with loopback framework
Rapid app building with loopback framework
 
Services, dependencies, and you
Services, dependencies, and youServices, dependencies, and you
Services, dependencies, and you
 
Evolving your api architecture with the strangler pattern
Evolving your api architecture with the strangler patternEvolving your api architecture with the strangler pattern
Evolving your api architecture with the strangler pattern
 
Yotpo microservices
Yotpo microservicesYotpo microservices
Yotpo microservices
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
 
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 ...
The working architecture of node js applications open tech week javascript ...
 
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...
Guidelines to understand durable functions with .net core, c# and stateful se...
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Cloud-Native Progressive Delivery
Cloud-Native Progressive DeliveryCloud-Native Progressive Delivery
Cloud-Native Progressive Delivery
 
On component interface
On component interfaceOn component interface
On component interface
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Ledingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in actionLedingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in action
 

More from Pôle Systematic Paris-Region

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

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...
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 : 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 ...
 
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 ...
OSIS19_Cloud : Qu’apporte l’observabilité à la gestion de configuration? par ...
 
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, ...
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 : 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 ...
 
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...
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 : State of the art in security for embedded systems and IoT, by Pi...OSIS19_IoT : State of the art in security for embedded systems and IoT, by Pi...
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
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick MoyOsis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
Osis19_IoT: Proof of Pointer Programs with Ownership in SPARK, by Yannick Moy
 
Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Pas de commun sans communauté ?Osis18_Cloud : Pas de commun sans communauté ?
Osis18_Cloud : Pas de commun sans communauté ?
 
Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Projet Wolphin Osis18_Cloud : Projet Wolphin
Osis18_Cloud : Projet Wolphin
 
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMAOsis18_Cloud : Virtualisation efficace d’architectures NUMA
Osis18_Cloud : Virtualisation efficace d’architectures NUMA
 
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentOsis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
 
Osis18_Cloud : Software-heritage
Osis18_Cloud : Software-heritageOsis18_Cloud : Software-heritage
Osis18_Cloud : Software-heritage
 
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...OSIS18_IoT: L'approche machine virtuelle pour les microcontrôleurs, le projet...
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: La securite des objets connectes a bas cout avec l'os et riotOSIS18_IoT: La securite des objets connectes a bas cout avec l'os et riot
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 : Solution de mise au point pour les systemes embarques, par Julio...OSIS18_IoT : Solution de mise au point pour les systemes embarques, par Julio...
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 : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...OSIS18_IoT : Securisation du reseau des objets connectes, par Nicolas LE SAUZ...
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 : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...OSIS18_IoT : Ada and SPARK - Defense in Depth for Safe Micro-controller Progr...
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)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
OSIS18_IoT : RTEMS pour l'IoT professionnel, par Pierre Ficheux (Smile ECS)
 
PyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelatPyParis 2017 / Un mooc python, by thierry parmentelat
PyParis 2017 / Un mooc python, by thierry parmentelat
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

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