SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTSneha Padhiar
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHbirinder2
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfalene1
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackinghadarpinhas1
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunicationnovrain7111
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsResearcher Researcher
 
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 
ADM100 Running Book for sap basis domain study
ADM100 Running Book for sap basis domain studyADM100 Running Book for sap basis domain study
ADM100 Running Book for sap basis domain studydhruvamdhruvil123
 
Structural Integrity Assessment Standards in Nigeria by Engr Nimot Muili
Structural Integrity Assessment Standards in Nigeria by Engr Nimot MuiliStructural Integrity Assessment Standards in Nigeria by Engr Nimot Muili
Structural Integrity Assessment Standards in Nigeria by Engr Nimot MuiliNimot Muili
 
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...gerogepatton
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 

Kürzlich hochgeladen (20)

multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRH
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
ASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductosASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductos
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and tracking
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunication
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending Actuators
 
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
 
ADM100 Running Book for sap basis domain study
ADM100 Running Book for sap basis domain studyADM100 Running Book for sap basis domain study
ADM100 Running Book for sap basis domain study
 
Structural Integrity Assessment Standards in Nigeria by Engr Nimot Muili
Structural Integrity Assessment Standards in Nigeria by Engr Nimot MuiliStructural Integrity Assessment Standards in Nigeria by Engr Nimot Muili
Structural Integrity Assessment Standards in Nigeria by Engr Nimot Muili
 
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 

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