SlideShare a Scribd company logo
1 of 28
Microservices in Python
July 20th 2019
Victor Mshindi,
Ouma Rodgers,
Samuel Olembo
Twiga Foods Limited - Brief intro
“At Twiga, we help bridge the gap between farmers and vendors to fair,
trusted, modern markets. We help farmers get fresh produce to the
market efficiently and profitably”
Microservices - What now ?
$ 987
“Small autonomous services that work together,
modeled around a business domain.”
- Sam Newman
Microservices - Isn't just SOA?
$ 987
● SOA focused on the use of an ESB to allow services to communicate with one
another
● Martin Fowler's definition of microservices…
"… developing a single application as a suite of small services, each
running own process and communicating using light-weight
mechanisms (HTTP API)"
● Matt Bennett (OneFineStay - Nameko birthplace)…
"Maintainability at scale"
"Independently Deployable"
Flipside - Monoliths
$ 987
● A monolith is an application where everything is
bundled as one, has a single code base with multiple
modules and is designed to be self-contained.
● Modules are interconnected and interdependent in a
very tightly coupled architecture.
Flipside - Monoliths
$ 987
Monoliths - The Challenges
$ 987
● Less freedom, flexibility & decreased velocity.
● Limited to vertical scaling
● Harder to maintain our codebase
● Single point of failure
● Increased risk per commit
● Increased risk of system failure
Microservices - The Benefits
$ 987
● Increased freedom, flexibility & velocity.
● Suited for horizontal scaling
● Easier to maintain our codebase
● Reduced risk per commit
● Faster failure detection - devolved monitoring/ error reporting
Design Patterns
● Decomposition Patterns
■ Decompose by Business Capability
■ Decompose by Subdomain
● Integration Patterns
■ API Gateway Pattern
■ Aggregator Pattern
● Database Patterns
■ Single Database per service
■ Shared Database per service
Microservices Architecture
Service to Service Communication
● HTTP
● RPC
● Pub/Sub
● gRPC
Case Scenario
● An E-Commerce platform implemented with Nameko
● Domains
■ Authentication
■ Notification
■ Sales
■ Products
Nameko - What’s that?
Nameko
[ nah - meh - koh ]
A microservice framework for Python.
Nameko - Key Concepts
● Entrypoints - to your services (HTTP, AMQP [RPC, Pub/Sub]...)
● Dependencies - how your services will interact with external things
(DB, MQ, Redis ...)
● Dependency Providers
● Dependency Injection
Nameko - The Benefits?
● An extensible framework compatible with almost any protocol,
transport or database and helps one focus on business logic by
managing connections, transports, and concurrency for you.
● Provides easy concurrency model by yielding workers as they wait
for I/O
● RPC out of the box
Nameko - The Architecture
Auth Service
Product Service
Sales Service
Notification
Service
Auth DB
Auth Service
Notificati
on DB
Sales
DB
Product
DB
Pub/Sub
Pub/Sub
RPC
API Gateway
Live Demo
https://github.com/mshindi/Python-Nairobi-June-Meetup
Advanced Concepts
● GraphQl
● Containerisation (Docker)
● Container Orchestration (Kubernetes)
GraphQL Concepts
“is a query language for your API, and a server-side runtime for executing queries
by using a type system you define for your data. GraphQL isn’t tied to any specific
database or storage engine and is instead backed by your existing code and
data.”
- graphql.org
GraphQL Benefits
● Reduces Roundtrips
● Easily evolve our API
● Schema stitching
Docker Concepts
● Provides a way to run applications securely & isolated in a container,
packaged with all its libraries and dependencies, ensuring that your
application works seamlessly in any environment.
● Offers abstraction by which an application can quickly move or be set up
with minimal interaction and tinkering.
Kubernetes Concepts
“Kubernetes (K8s) is an open-source system for automating deployment, scaling,
and management of containerized applications”
- kubernetes.io
Kubernetes Benefits
● Used to orchestrate, deploy and manage container clusters, which are a
group of containers.
● Handles load balancing
● Self heals
● Scales horizontally with ease
Kubernetes Architecture
Microservices - When not to
● Starting out
● Don’t have a large team
● Microservices can be distributed monoliths
● Complex service to service relationships
● Too small to break
● Extremely dependant modules
● There is beauty in simplicity
Microservices - Reality Check!
$ 987
● Migrating to microservices was a challenge. It took 6 PAINFUL months
before we could report any successes to management. Steep learning
curves meant a lot of initial mistakes and time spent understanding this
paradigm shift.
Where To Get Help
Google StackOverflowNameko Docs
https://stackoverflow.com/que
stions/tagged/namekohttps://www.google.com https://nameko.io
Thank You
For Your Time

More Related Content

What's hot

Introduction to event based microservices
Introduction to event based microservicesIntroduction to event based microservices
Introduction to event based microservicesGrigoris Grigoriadis
 
Introduction to microservices Jornada Microservices
Introduction to microservices Jornada MicroservicesIntroduction to microservices Jornada Microservices
Introduction to microservices Jornada MicroservicesRoan Brasil Monteiro
 
Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?inovia
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knativeMofizur Rahman
 
Effective API Gateway
Effective API GatewayEffective API Gateway
Effective API GatewayHari Wiz
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureMohamad Farhani
 
Multicluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsMulticluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsChristian Posta
 
Ato Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by SystangoAto Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by SystangoSystango
 
The Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneThe Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneChristian Posta
 
Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Christian Posta
 
Multi-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshMulti-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshChristian Posta
 
NGINX KubeCon Copenhagen 2018
NGINX KubeCon Copenhagen 2018 NGINX KubeCon Copenhagen 2018
NGINX KubeCon Copenhagen 2018 NGINX, Inc.
 
The Service Mesh: It's about Traffic
The Service Mesh: It's about TrafficThe Service Mesh: It's about Traffic
The Service Mesh: It's about TrafficC4Media
 
Software architecture in practice
Software architecture in practiceSoftware architecture in practice
Software architecture in practiceErwannWernli
 
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...Christian Posta
 
OpenStack
OpenStackOpenStack
OpenStackNaLUG
 
How to Protect your AWS Environment
How to Protect your AWS EnvironmentHow to Protect your AWS Environment
How to Protect your AWS EnvironmentLahav Savir
 
Bexar network blueprint
Bexar network blueprintBexar network blueprint
Bexar network blueprintDan Wendlandt
 

What's hot (20)

Introduction to event based microservices
Introduction to event based microservicesIntroduction to event based microservices
Introduction to event based microservices
 
Introduction to microservices Jornada Microservices
Introduction to microservices Jornada MicroservicesIntroduction to microservices Jornada Microservices
Introduction to microservices Jornada Microservices
 
Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knative
 
Effective API Gateway
Effective API GatewayEffective API Gateway
Effective API Gateway
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Multicluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh PatternsMulticluster Kubernetes and Service Mesh Patterns
Multicluster Kubernetes and Service Mesh Patterns
 
Ato Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by SystangoAto Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by Systango
 
The Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data PlaneThe Truth About the Service Mesh Data Plane
The Truth About the Service Mesh Data Plane
 
Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1Intro Istio and what's new Istio 1.1
Intro Istio and what's new Istio 1.1
 
Service mesh
Service meshService mesh
Service mesh
 
Multi-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMeshMulti-cluster service mesh with GlooMesh
Multi-cluster service mesh with GlooMesh
 
NGINX KubeCon Copenhagen 2018
NGINX KubeCon Copenhagen 2018 NGINX KubeCon Copenhagen 2018
NGINX KubeCon Copenhagen 2018
 
The Service Mesh: It's about Traffic
The Service Mesh: It's about TrafficThe Service Mesh: It's about Traffic
The Service Mesh: It's about Traffic
 
Software architecture in practice
Software architecture in practiceSoftware architecture in practice
Software architecture in practice
 
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
KubeCon NA 2018: Evolution of Integration and Microservices with Service Mesh...
 
OpenStack
OpenStackOpenStack
OpenStack
 
How to Protect your AWS Environment
How to Protect your AWS EnvironmentHow to Protect your AWS Environment
How to Protect your AWS Environment
 
Kong
KongKong
Kong
 
Bexar network blueprint
Bexar network blueprintBexar network blueprint
Bexar network blueprint
 

Similar to PyCONKE meetup 2019: Microservices

[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...
[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...
[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...WSO2
 
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...apidays
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondUgo Landini
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Rodrigo Antonialli
 
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 actionMukesh Singh
 
AppDev with Microservices
AppDev with MicroservicesAppDev with Microservices
AppDev with MicroservicesRishabh Dugar
 
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
[WSO2 API Day Dallas 2019] Extending Service Mesh with API ManagementWSO2
 
Fun Times With Microservices
Fun Times With MicroservicesFun Times With Microservices
Fun Times With MicroservicesChristo Crampton
 
NGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service MeshNGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service MeshNGINX, Inc.
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMiki Lombardi
 
9 patterns of microservices
9 patterns of microservices9 patterns of microservices
9 patterns of microservicesAl Sayed Gamal
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for EnterprisesWSO2
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREAraf Karsh Hamid
 
Enterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices ArchitecturesEnterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices ArchitecturesCrishantha Nanayakkara
 
Microservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learningsMicroservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learningsMatthew Reynolds
 
MuleSoft Meetup Singapore #8 March 2021
MuleSoft Meetup Singapore #8 March 2021MuleSoft Meetup Singapore #8 March 2021
MuleSoft Meetup Singapore #8 March 2021Julian Douch
 
Containers and microservices create new performance challenges kowall - app...
Containers and microservices create new performance challenges   kowall - app...Containers and microservices create new performance challenges   kowall - app...
Containers and microservices create new performance challenges kowall - app...Jonah Kowall
 
AppSphere 15 - Containers and Microservices Create New Performance Challenges
AppSphere 15 - Containers and Microservices Create New Performance ChallengesAppSphere 15 - Containers and Microservices Create New Performance Challenges
AppSphere 15 - Containers and Microservices Create New Performance ChallengesAppDynamics
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to MicroservicesCisco DevNet
 

Similar to PyCONKE meetup 2019: Microservices (20)

[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...
[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...
[APIdays Paris 2019] API Management in Service Mesh Using Istio and WSO2 API ...
 
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
APIdays Paris 2019 - Cloud native API Management for Microservices on a Servi...
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
 
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
 
AppDev with Microservices
AppDev with MicroservicesAppDev with Microservices
AppDev with Microservices
 
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
[WSO2 API Day Dallas 2019] Extending Service Mesh with API Management
 
Fun Times With Microservices
Fun Times With MicroservicesFun Times With Microservices
Fun Times With Microservices
 
NGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service MeshNGINX, Istio, and the Move to Microservices and Service Mesh
NGINX, Istio, and the Move to Microservices and Service Mesh
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
9 patterns of microservices
9 patterns of microservices9 patterns of microservices
9 patterns of microservices
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Enterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices ArchitecturesEnterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices Architectures
 
Microservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learningsMicroservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learnings
 
MuleSoft Meetup Singapore #8 March 2021
MuleSoft Meetup Singapore #8 March 2021MuleSoft Meetup Singapore #8 March 2021
MuleSoft Meetup Singapore #8 March 2021
 
Containers and microservices create new performance challenges kowall - app...
Containers and microservices create new performance challenges   kowall - app...Containers and microservices create new performance challenges   kowall - app...
Containers and microservices create new performance challenges kowall - app...
 
AppSphere 15 - Containers and Microservices Create New Performance Challenges
AppSphere 15 - Containers and Microservices Create New Performance ChallengesAppSphere 15 - Containers and Microservices Create New Performance Challenges
AppSphere 15 - Containers and Microservices Create New Performance Challenges
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
 

Recently uploaded

(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 

Recently uploaded (20)

(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 

PyCONKE meetup 2019: Microservices

  • 1. Microservices in Python July 20th 2019 Victor Mshindi, Ouma Rodgers, Samuel Olembo
  • 2. Twiga Foods Limited - Brief intro “At Twiga, we help bridge the gap between farmers and vendors to fair, trusted, modern markets. We help farmers get fresh produce to the market efficiently and profitably”
  • 3. Microservices - What now ? $ 987 “Small autonomous services that work together, modeled around a business domain.” - Sam Newman
  • 4. Microservices - Isn't just SOA? $ 987 ● SOA focused on the use of an ESB to allow services to communicate with one another ● Martin Fowler's definition of microservices… "… developing a single application as a suite of small services, each running own process and communicating using light-weight mechanisms (HTTP API)" ● Matt Bennett (OneFineStay - Nameko birthplace)… "Maintainability at scale" "Independently Deployable"
  • 5. Flipside - Monoliths $ 987 ● A monolith is an application where everything is bundled as one, has a single code base with multiple modules and is designed to be self-contained. ● Modules are interconnected and interdependent in a very tightly coupled architecture.
  • 7. Monoliths - The Challenges $ 987 ● Less freedom, flexibility & decreased velocity. ● Limited to vertical scaling ● Harder to maintain our codebase ● Single point of failure ● Increased risk per commit ● Increased risk of system failure
  • 8. Microservices - The Benefits $ 987 ● Increased freedom, flexibility & velocity. ● Suited for horizontal scaling ● Easier to maintain our codebase ● Reduced risk per commit ● Faster failure detection - devolved monitoring/ error reporting
  • 9. Design Patterns ● Decomposition Patterns ■ Decompose by Business Capability ■ Decompose by Subdomain ● Integration Patterns ■ API Gateway Pattern ■ Aggregator Pattern ● Database Patterns ■ Single Database per service ■ Shared Database per service
  • 11. Service to Service Communication ● HTTP ● RPC ● Pub/Sub ● gRPC
  • 12. Case Scenario ● An E-Commerce platform implemented with Nameko ● Domains ■ Authentication ■ Notification ■ Sales ■ Products
  • 13. Nameko - What’s that? Nameko [ nah - meh - koh ] A microservice framework for Python.
  • 14. Nameko - Key Concepts ● Entrypoints - to your services (HTTP, AMQP [RPC, Pub/Sub]...) ● Dependencies - how your services will interact with external things (DB, MQ, Redis ...) ● Dependency Providers ● Dependency Injection
  • 15. Nameko - The Benefits? ● An extensible framework compatible with almost any protocol, transport or database and helps one focus on business logic by managing connections, transports, and concurrency for you. ● Provides easy concurrency model by yielding workers as they wait for I/O ● RPC out of the box
  • 16. Nameko - The Architecture Auth Service Product Service Sales Service Notification Service Auth DB Auth Service Notificati on DB Sales DB Product DB Pub/Sub Pub/Sub RPC API Gateway
  • 18. Advanced Concepts ● GraphQl ● Containerisation (Docker) ● Container Orchestration (Kubernetes)
  • 19. GraphQL Concepts “is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn’t tied to any specific database or storage engine and is instead backed by your existing code and data.” - graphql.org
  • 20. GraphQL Benefits ● Reduces Roundtrips ● Easily evolve our API ● Schema stitching
  • 21. Docker Concepts ● Provides a way to run applications securely & isolated in a container, packaged with all its libraries and dependencies, ensuring that your application works seamlessly in any environment. ● Offers abstraction by which an application can quickly move or be set up with minimal interaction and tinkering.
  • 22. Kubernetes Concepts “Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications” - kubernetes.io
  • 23. Kubernetes Benefits ● Used to orchestrate, deploy and manage container clusters, which are a group of containers. ● Handles load balancing ● Self heals ● Scales horizontally with ease
  • 25. Microservices - When not to ● Starting out ● Don’t have a large team ● Microservices can be distributed monoliths ● Complex service to service relationships ● Too small to break ● Extremely dependant modules ● There is beauty in simplicity
  • 26. Microservices - Reality Check! $ 987 ● Migrating to microservices was a challenge. It took 6 PAINFUL months before we could report any successes to management. Steep learning curves meant a lot of initial mistakes and time spent understanding this paradigm shift.
  • 27. Where To Get Help Google StackOverflowNameko Docs https://stackoverflow.com/que stions/tagged/namekohttps://www.google.com https://nameko.io