SlideShare a Scribd company logo
1 of 35
Download to read offline
Microservices Architecture
Haim Michael
January 3rd
, 2023
All logos, trade marks and brand names used in this presentation belong
to the respective owners.
life
michae
l
www.lifemichael.com
Design Patterns
Introduction
01/03/23 © Abelski eLearning 3
Design Pattern?
“Each pattern describes a problem which occurs over and
over again in our environment, and then describes the core
of the solution to that problem, in such a way that you can
use this solution a million times over, without ever doing it
the same way twice”
Christopher Alexander, Sara Ishikawa, Murray Silverstein, Max Jacobson, Ingrid Fiksdahl-King and
Shlomo Angel. A Pattern Language. Oxford University Press, New York, 1977.
01/03/23 © Abelski eLearning 4
Software Design Pattern?
“Software patterns are reusable solutions to recurring
problems that we encounter during software development.”
Mark Grand, Patterns in Java. John Wiley & Sons, 2002.
01/03/23 © Abelski eLearning 5
History
 The idea of using patterns evolves from the architecture field.
Christopher Alexander. A Pattern Language: Towns, Buildings, Construction
(Oxford University Press, 1977)
 The first GUI software patterns were set in 1987.
Ward Cunningham and Kent Beck. Using Pattern Languages for Object-Oriented
Programs. OOPSLA-87.
 The Gang of Four (AKA GOF) publish their “Design Patterns”
book in 1994.
Erich Gamma, Richard Helm, John Vlissides, and Ralph Johnson. Design
Patterns. Addison Wesley, 1994.
01/03/23 © Abelski eLearning 6
The Pattern Elements
 Each Pattern has the following elements:
Pattern Name
The official well known name we use to refer each one of the patterns.
Problem Description
A description of the problem the pattern comes to solve.
Solution Description
A description of the design solution. This element can include UML diagram and a
code sample.
Consequences
The benefits & costs of using a specific design pattern. This element is required in
order to evaluate one pattern comparing with others.
01/03/23 © Abelski eLearning 7
Continuous Evolvement
 Apart of the classic design patterns described by the Gang of
Four book, during the last 20 years we can identify many
more design patterns that evolved in specific domains (e.g.
Server Side), specific programming languages paradigms
(e.g. Functional Programming), specific architectures (e.g.
Microservices Architecture), and specific programming
languages (e.g. JavaScript).
Microservices
© 2008 Haim Michael 20150805
The Microservices Architecture
 The microservices architecture is a modern variation of the
Service-Oriented Architecture (SOA). Instead of developing
one monolithic application we develop multiple separated
small fine grained applications that provide their service using
a lightweight protocol.
© 2008 Haim Michael 20150805
Loosely Coupling Services
 Each and every micro-service is independent of the others.
This loosely coupling architecture reduced the dependencies
between the services.
© 2008 Haim Michael 20150805
REStful Web Services
 Representational state transfer (REST) is a software
architectural style that dominates the World Wide Web.
 REST emphasizes the scalability of interactions between
components, uniform interfaces, independent deployment of
components, and the creation of a layered architecture to
facilitate caching components to reduce user-perceived
latency, enforce security, and encapsulate legacy systems.
© 2008 Haim Michael 20150805
REStful Web Services
 REST has been employed throughout the software industry
and is a widely accepted set of guidelines for creating
stateless, reliable web APIs.
 Web APIs that obey the REST constraints is informally
described as RESTful.
© 2008 Haim Michael 20150805
REStful Web Services
 RESTful web APIs are typically loosely based on HTTP
methods to access resources via URL-encoded parameters
and the use of JSON or XML to transmit data.
© 2008 Haim Michael 20150805
REStful Web Services
This image was taken from https://en.wikipedia.org/wiki/Representational_state_transfer
© 2008 Haim Michael 20150805
The postman Platform
 Postman is an API platform for building and using APIs.
Postman simplifies each step of the API lifecycle and
streamlines collaboration.
 We can download the Postman application and use it for
checking web APIs we want to use.
https://postman.com
© 2008 Haim Michael 20150805
The postman Platform
© 2008 Haim Michael 20150805
The curl Utility
 The curl utility is a command line tool and library for
transferring data with URLs.
https://curl.se
© 2008 Haim Michael 20150805
The curl Utility
© 2008 Haim Michael 20150805
The grpc Framework
 gRPC is a modern open source high performance Remote
Procedure Call (RPC) framework.
 This framework allows us to connect services in and across
data centers with pluggable support for load balancing,
tracing, health checking and authentication.
© 2008 Haim Michael 20150805
The grpc Framework
 This framework is also relevant in last mile of distributed
computing. We can use gRPC for connecting devices, mobile
applications and browsers to backend services.
https://grpc.io
© 2008 Haim Michael 20150805
The grpc Framework
Data Management
01/03/23 © Abelski eLearning 23
Database Per Service
 Most services need to persist data, and they usually use a
database for doing so (e.g. invoices service stores
information about invoices we issue, customers service
stores information about customers, etc.).
 The Services must be loosely coupled in order to allow us to
develop, deploy and scale them independently.
The Problem
01/03/23 © Abelski eLearning 24
Database Per Service
 There are many cases in which there is a need to query data
managed by multiple micro services.
 Different micro services might have different requirements,
which might lead to the use of relational databases in some
of the cases, and the use of no-sql databases in others.
The Problem
01/03/23 © Abelski eLearning 25
Database Per Service
 The solution for these problems might be having a separated
persistent data for each and every micro service, and have a
separated API (for each and every micro service), that uses
that persist data only.
 We can allocate private tables per service, we can allocate
schema per service, and we can allocate a separated
database.
The Solution
01/03/23 © Abelski eLearning 26
Database Per Service
 Implementing this pattern ensures that the services are
loosely coupled. Changes to one service’s database won't
cause impact any other services.
 Each and every service can use the type of database that is
best suited to its needs.
Consequences
01/03/23 © Abelski eLearning 27
Shared Database
 Microservices might need to implement ACID (Atomicity,
Consistency, Isolation, and Durability) transactions.
The Problem
01/03/23 © Abelski eLearning 28
Shared Database
 We can share a single database between different micro
services in order to allow those micro services to implement
ACID transactions.
The Solution
01/03/23 © Abelski eLearning 29
Shared Database
 The developers can easily implement ACID transactions
when working with a single database. The single database is
simpler to handle.
 The development of the entire server side might be slower
due to the need to coordinate between different developers
that work on different micro services every schema change.
The coupling between the micro services increases.
Consequences
01/03/23 © Abelski eLearning 30
Shared Database
 When the server side is up and running the increased
coupling between the micro services might damage the
performance of our server side.
 Single database for multiple microservices might be not the
optimal one for some of the microservices.
Consequences
Communication
01/03/23 © Abelski eLearning 32
Message Queue Pattern
 When implementing the micro services architecture, we might
have micro services that need to communicate with each
other. This communication needs to be asynchronous in
order to keep the micro services loosely coupled.
The Problem
01/03/23 © Abelski eLearning 33
Message Queue Pattern
 The solution would be to implement a message queue
component that allows communication between processes or
between threads in the same process.
The Solution Image Credit to AWS
01/03/23 © Abelski eLearning 34
Message Queue Pattern
 The message queues provide an asynchronous
communication protocol in which the sender and receiver
don't need to interact at the same time. The messages are
held in a queue until the recipient retrieves them.
The Solution
01/03/23 © Abelski eLearning 35
Message Queue Pattern
 When implementing the micro services architecture, this
pattern allows multiple micro services to communicate with
each other asynchronously.
The Consequences

More Related Content

What's hot

Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To MicroservicesLalit Kale
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices Bozhidar Bozhanov
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services ArchitectureAraf Karsh Hamid
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureAbdelghani Azri
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecturetyrantbrian
 
What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...Edureka!
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
APIs in a Microservice Architecture
APIs in a Microservice ArchitectureAPIs in a Microservice Architecture
APIs in a Microservice ArchitectureWSO2
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing MicroservicesDavid Chou
 
SaaS Architecture.pdf
SaaS Architecture.pdfSaaS Architecture.pdf
SaaS Architecture.pdfSimform
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Microservices Tutorial for Beginners | Microservices Architecture | Microserv...
Microservices Tutorial for Beginners | Microservices Architecture | Microserv...Microservices Tutorial for Beginners | Microservices Architecture | Microserv...
Microservices Tutorial for Beginners | Microservices Architecture | Microserv...Edureka!
 

What's hot (20)

Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To Microservices
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services Architecture
 
Why to Cloud Native
Why to Cloud NativeWhy to Cloud Native
Why to Cloud Native
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
APIs in a Microservice Architecture
APIs in a Microservice ArchitectureAPIs in a Microservice Architecture
APIs in a Microservice Architecture
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing Microservices
 
SaaS Architecture.pdf
SaaS Architecture.pdfSaaS Architecture.pdf
SaaS Architecture.pdf
 
Elastic-Engineering
Elastic-EngineeringElastic-Engineering
Elastic-Engineering
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
DevOps for beginners
DevOps for beginnersDevOps for beginners
DevOps for beginners
 
Microservices
MicroservicesMicroservices
Microservices
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Microservices Tutorial for Beginners | Microservices Architecture | Microserv...
Microservices Tutorial for Beginners | Microservices Architecture | Microserv...Microservices Tutorial for Beginners | Microservices Architecture | Microserv...
Microservices Tutorial for Beginners | Microservices Architecture | Microserv...
 

Similar to Microservices Design Patterns

Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesAraf Karsh Hamid
 
Pitfalls & Challenges Faced During a Microservices Architecture Implementation
Pitfalls & Challenges Faced During a Microservices Architecture ImplementationPitfalls & Challenges Faced During a Microservices Architecture Implementation
Pitfalls & Challenges Faced During a Microservices Architecture ImplementationCognizant
 
Meetup6 microservices for the IoT
Meetup6 microservices for the IoTMeetup6 microservices for the IoT
Meetup6 microservices for the IoTFrancesco Rago
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsAraf Karsh Hamid
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Araf Karsh Hamid
 
Cloud MicroService Architecture
Cloud MicroService ArchitectureCloud MicroService Architecture
Cloud MicroService ArchitectureYakov Liskoff
 
Microservice final final
Microservice final finalMicroservice final final
Microservice final finalgaurav shukla
 
Web Application Architecture: Everything You Need to Know About
Web Application Architecture: Everything You Need to Know AboutWeb Application Architecture: Everything You Need to Know About
Web Application Architecture: Everything You Need to Know AboutNoman Shaikh
 
Microservices with mule
Microservices with muleMicroservices with mule
Microservices with muleGovind Mulinti
 
Webinar - Mobile Apps: Monolithic to Serverless
Webinar - Mobile Apps: Monolithic to ServerlessWebinar - Mobile Apps: Monolithic to Serverless
Webinar - Mobile Apps: Monolithic to ServerlessOpenXcell Technolabs
 
MuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureMuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureKim Clark
 
05 microservices microdeck
05 microservices microdeck05 microservices microdeck
05 microservices microdeckfenggang wang
 
A Comprehensive Guide to Web Application Architecture
A Comprehensive Guide to Web Application ArchitectureA Comprehensive Guide to Web Application Architecture
A Comprehensive Guide to Web Application Architecturestevefary
 
Web Application Architecture: A Comprehensive Guide for Success in 2023
Web Application Architecture: A Comprehensive Guide for Success in 2023Web Application Architecture: A Comprehensive Guide for Success in 2023
Web Application Architecture: A Comprehensive Guide for Success in 2023stevefary
 
Microservices Design Principles.pdf
Microservices Design Principles.pdfMicroservices Design Principles.pdf
Microservices Design Principles.pdfSimform
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureFaren faren
 
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 with mule
Microservices with muleMicroservices with mule
Microservices with mulealfa
 

Similar to Microservices Design Patterns (20)

Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
 
Microservices
MicroservicesMicroservices
Microservices
 
Pitfalls & Challenges Faced During a Microservices Architecture Implementation
Pitfalls & Challenges Faced During a Microservices Architecture ImplementationPitfalls & Challenges Faced During a Microservices Architecture Implementation
Pitfalls & Challenges Faced During a Microservices Architecture Implementation
 
Meetup6 microservices for the IoT
Meetup6 microservices for the IoTMeetup6 microservices for the IoT
Meetup6 microservices for the IoT
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration Patterns
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
 
Cloud MicroService Architecture
Cloud MicroService ArchitectureCloud MicroService Architecture
Cloud MicroService Architecture
 
Microservice final final
Microservice final finalMicroservice final final
Microservice final final
 
Web Application Architecture: Everything You Need to Know About
Web Application Architecture: Everything You Need to Know AboutWeb Application Architecture: Everything You Need to Know About
Web Application Architecture: Everything You Need to Know About
 
Microservices with mule
Microservices with muleMicroservices with mule
Microservices with mule
 
Webinar - Mobile Apps: Monolithic to Serverless
Webinar - Mobile Apps: Monolithic to ServerlessWebinar - Mobile Apps: Monolithic to Serverless
Webinar - Mobile Apps: Monolithic to Serverless
 
MuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration ArchitectureMuCon 2015 - Microservices in Integration Architecture
MuCon 2015 - Microservices in Integration Architecture
 
05 microservices microdeck
05 microservices microdeck05 microservices microdeck
05 microservices microdeck
 
A Comprehensive Guide to Web Application Architecture
A Comprehensive Guide to Web Application ArchitectureA Comprehensive Guide to Web Application Architecture
A Comprehensive Guide to Web Application Architecture
 
Web Application Architecture: A Comprehensive Guide for Success in 2023
Web Application Architecture: A Comprehensive Guide for Success in 2023Web Application Architecture: A Comprehensive Guide for Success in 2023
Web Application Architecture: A Comprehensive Guide for Success in 2023
 
Microservices Design Principles.pdf
Microservices Design Principles.pdfMicroservices Design Principles.pdf
Microservices Design Principles.pdf
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Microservices.pptx
Microservices.pptxMicroservices.pptx
Microservices.pptx
 
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 with mule
Microservices with muleMicroservices with mule
Microservices with mule
 

More from Haim Michael

Virtual Threads in Java
Virtual Threads in JavaVirtual Threads in Java
Virtual Threads in JavaHaim Michael
 
MongoDB Design Patterns
MongoDB Design PatternsMongoDB Design Patterns
MongoDB Design PatternsHaim Michael
 
Introduction to SQL Injections
Introduction to SQL InjectionsIntroduction to SQL Injections
Introduction to SQL InjectionsHaim Michael
 
Record Classes in Java
Record Classes in JavaRecord Classes in Java
Record Classes in JavaHaim Michael
 
Structural Pattern Matching in Python
Structural Pattern Matching in PythonStructural Pattern Matching in Python
Structural Pattern Matching in PythonHaim Michael
 
Unit Testing in Python
Unit Testing in PythonUnit Testing in Python
Unit Testing in PythonHaim Michael
 
OOP Best Practices in JavaScript
OOP Best Practices in JavaScriptOOP Best Practices in JavaScript
OOP Best Practices in JavaScriptHaim Michael
 
JavaScript Jump Start 20220214
JavaScript Jump Start 20220214JavaScript Jump Start 20220214
JavaScript Jump Start 20220214Haim Michael
 
Bootstrap Jump Start
Bootstrap Jump StartBootstrap Jump Start
Bootstrap Jump StartHaim Michael
 
What is new in PHP
What is new in PHPWhat is new in PHP
What is new in PHPHaim Michael
 
What is new in Python 3.9
What is new in Python 3.9What is new in Python 3.9
What is new in Python 3.9Haim Michael
 
Programming in Python on Steroid
Programming in Python on SteroidProgramming in Python on Steroid
Programming in Python on SteroidHaim Michael
 
The matplotlib Library
The matplotlib LibraryThe matplotlib Library
The matplotlib LibraryHaim Michael
 
Pandas meetup 20200908
Pandas meetup 20200908Pandas meetup 20200908
Pandas meetup 20200908Haim Michael
 
The num py_library_20200818
The num py_library_20200818The num py_library_20200818
The num py_library_20200818Haim Michael
 
Jupyter notebook 20200728
Jupyter notebook 20200728Jupyter notebook 20200728
Jupyter notebook 20200728Haim Michael
 
Node.js Crash Course (Jump Start)
Node.js Crash Course (Jump Start) Node.js Crash Course (Jump Start)
Node.js Crash Course (Jump Start) Haim Michael
 
The Power of Decorators in Python [Meetup]
The Power of Decorators in Python [Meetup]The Power of Decorators in Python [Meetup]
The Power of Decorators in Python [Meetup]Haim Michael
 

More from Haim Michael (20)

Anti Patterns
Anti PatternsAnti Patterns
Anti Patterns
 
Virtual Threads in Java
Virtual Threads in JavaVirtual Threads in Java
Virtual Threads in Java
 
MongoDB Design Patterns
MongoDB Design PatternsMongoDB Design Patterns
MongoDB Design Patterns
 
Introduction to SQL Injections
Introduction to SQL InjectionsIntroduction to SQL Injections
Introduction to SQL Injections
 
Record Classes in Java
Record Classes in JavaRecord Classes in Java
Record Classes in Java
 
Structural Pattern Matching in Python
Structural Pattern Matching in PythonStructural Pattern Matching in Python
Structural Pattern Matching in Python
 
Unit Testing in Python
Unit Testing in PythonUnit Testing in Python
Unit Testing in Python
 
OOP Best Practices in JavaScript
OOP Best Practices in JavaScriptOOP Best Practices in JavaScript
OOP Best Practices in JavaScript
 
Java Jump Start
Java Jump StartJava Jump Start
Java Jump Start
 
JavaScript Jump Start 20220214
JavaScript Jump Start 20220214JavaScript Jump Start 20220214
JavaScript Jump Start 20220214
 
Bootstrap Jump Start
Bootstrap Jump StartBootstrap Jump Start
Bootstrap Jump Start
 
What is new in PHP
What is new in PHPWhat is new in PHP
What is new in PHP
 
What is new in Python 3.9
What is new in Python 3.9What is new in Python 3.9
What is new in Python 3.9
 
Programming in Python on Steroid
Programming in Python on SteroidProgramming in Python on Steroid
Programming in Python on Steroid
 
The matplotlib Library
The matplotlib LibraryThe matplotlib Library
The matplotlib Library
 
Pandas meetup 20200908
Pandas meetup 20200908Pandas meetup 20200908
Pandas meetup 20200908
 
The num py_library_20200818
The num py_library_20200818The num py_library_20200818
The num py_library_20200818
 
Jupyter notebook 20200728
Jupyter notebook 20200728Jupyter notebook 20200728
Jupyter notebook 20200728
 
Node.js Crash Course (Jump Start)
Node.js Crash Course (Jump Start) Node.js Crash Course (Jump Start)
Node.js Crash Course (Jump Start)
 
The Power of Decorators in Python [Meetup]
The Power of Decorators in Python [Meetup]The Power of Decorators in Python [Meetup]
The Power of Decorators in Python [Meetup]
 

Recently uploaded

Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 
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.pdfOrbitshub
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
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 FMESafe Software
 
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...DianaGray10
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
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 ModelDeepika Singh
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 

Recently uploaded (20)

Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
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
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
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...
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
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
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 

Microservices Design Patterns

  • 1. Microservices Architecture Haim Michael January 3rd , 2023 All logos, trade marks and brand names used in this presentation belong to the respective owners. life michae l www.lifemichael.com Design Patterns
  • 3. 01/03/23 © Abelski eLearning 3 Design Pattern? “Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice” Christopher Alexander, Sara Ishikawa, Murray Silverstein, Max Jacobson, Ingrid Fiksdahl-King and Shlomo Angel. A Pattern Language. Oxford University Press, New York, 1977.
  • 4. 01/03/23 © Abelski eLearning 4 Software Design Pattern? “Software patterns are reusable solutions to recurring problems that we encounter during software development.” Mark Grand, Patterns in Java. John Wiley & Sons, 2002.
  • 5. 01/03/23 © Abelski eLearning 5 History  The idea of using patterns evolves from the architecture field. Christopher Alexander. A Pattern Language: Towns, Buildings, Construction (Oxford University Press, 1977)  The first GUI software patterns were set in 1987. Ward Cunningham and Kent Beck. Using Pattern Languages for Object-Oriented Programs. OOPSLA-87.  The Gang of Four (AKA GOF) publish their “Design Patterns” book in 1994. Erich Gamma, Richard Helm, John Vlissides, and Ralph Johnson. Design Patterns. Addison Wesley, 1994.
  • 6. 01/03/23 © Abelski eLearning 6 The Pattern Elements  Each Pattern has the following elements: Pattern Name The official well known name we use to refer each one of the patterns. Problem Description A description of the problem the pattern comes to solve. Solution Description A description of the design solution. This element can include UML diagram and a code sample. Consequences The benefits & costs of using a specific design pattern. This element is required in order to evaluate one pattern comparing with others.
  • 7. 01/03/23 © Abelski eLearning 7 Continuous Evolvement  Apart of the classic design patterns described by the Gang of Four book, during the last 20 years we can identify many more design patterns that evolved in specific domains (e.g. Server Side), specific programming languages paradigms (e.g. Functional Programming), specific architectures (e.g. Microservices Architecture), and specific programming languages (e.g. JavaScript).
  • 9. © 2008 Haim Michael 20150805 The Microservices Architecture  The microservices architecture is a modern variation of the Service-Oriented Architecture (SOA). Instead of developing one monolithic application we develop multiple separated small fine grained applications that provide their service using a lightweight protocol.
  • 10. © 2008 Haim Michael 20150805 Loosely Coupling Services  Each and every micro-service is independent of the others. This loosely coupling architecture reduced the dependencies between the services.
  • 11. © 2008 Haim Michael 20150805 REStful Web Services  Representational state transfer (REST) is a software architectural style that dominates the World Wide Web.  REST emphasizes the scalability of interactions between components, uniform interfaces, independent deployment of components, and the creation of a layered architecture to facilitate caching components to reduce user-perceived latency, enforce security, and encapsulate legacy systems.
  • 12. © 2008 Haim Michael 20150805 REStful Web Services  REST has been employed throughout the software industry and is a widely accepted set of guidelines for creating stateless, reliable web APIs.  Web APIs that obey the REST constraints is informally described as RESTful.
  • 13. © 2008 Haim Michael 20150805 REStful Web Services  RESTful web APIs are typically loosely based on HTTP methods to access resources via URL-encoded parameters and the use of JSON or XML to transmit data.
  • 14. © 2008 Haim Michael 20150805 REStful Web Services This image was taken from https://en.wikipedia.org/wiki/Representational_state_transfer
  • 15. © 2008 Haim Michael 20150805 The postman Platform  Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration.  We can download the Postman application and use it for checking web APIs we want to use. https://postman.com
  • 16. © 2008 Haim Michael 20150805 The postman Platform
  • 17. © 2008 Haim Michael 20150805 The curl Utility  The curl utility is a command line tool and library for transferring data with URLs. https://curl.se
  • 18. © 2008 Haim Michael 20150805 The curl Utility
  • 19. © 2008 Haim Michael 20150805 The grpc Framework  gRPC is a modern open source high performance Remote Procedure Call (RPC) framework.  This framework allows us to connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication.
  • 20. © 2008 Haim Michael 20150805 The grpc Framework  This framework is also relevant in last mile of distributed computing. We can use gRPC for connecting devices, mobile applications and browsers to backend services. https://grpc.io
  • 21. © 2008 Haim Michael 20150805 The grpc Framework
  • 23. 01/03/23 © Abelski eLearning 23 Database Per Service  Most services need to persist data, and they usually use a database for doing so (e.g. invoices service stores information about invoices we issue, customers service stores information about customers, etc.).  The Services must be loosely coupled in order to allow us to develop, deploy and scale them independently. The Problem
  • 24. 01/03/23 © Abelski eLearning 24 Database Per Service  There are many cases in which there is a need to query data managed by multiple micro services.  Different micro services might have different requirements, which might lead to the use of relational databases in some of the cases, and the use of no-sql databases in others. The Problem
  • 25. 01/03/23 © Abelski eLearning 25 Database Per Service  The solution for these problems might be having a separated persistent data for each and every micro service, and have a separated API (for each and every micro service), that uses that persist data only.  We can allocate private tables per service, we can allocate schema per service, and we can allocate a separated database. The Solution
  • 26. 01/03/23 © Abelski eLearning 26 Database Per Service  Implementing this pattern ensures that the services are loosely coupled. Changes to one service’s database won't cause impact any other services.  Each and every service can use the type of database that is best suited to its needs. Consequences
  • 27. 01/03/23 © Abelski eLearning 27 Shared Database  Microservices might need to implement ACID (Atomicity, Consistency, Isolation, and Durability) transactions. The Problem
  • 28. 01/03/23 © Abelski eLearning 28 Shared Database  We can share a single database between different micro services in order to allow those micro services to implement ACID transactions. The Solution
  • 29. 01/03/23 © Abelski eLearning 29 Shared Database  The developers can easily implement ACID transactions when working with a single database. The single database is simpler to handle.  The development of the entire server side might be slower due to the need to coordinate between different developers that work on different micro services every schema change. The coupling between the micro services increases. Consequences
  • 30. 01/03/23 © Abelski eLearning 30 Shared Database  When the server side is up and running the increased coupling between the micro services might damage the performance of our server side.  Single database for multiple microservices might be not the optimal one for some of the microservices. Consequences
  • 32. 01/03/23 © Abelski eLearning 32 Message Queue Pattern  When implementing the micro services architecture, we might have micro services that need to communicate with each other. This communication needs to be asynchronous in order to keep the micro services loosely coupled. The Problem
  • 33. 01/03/23 © Abelski eLearning 33 Message Queue Pattern  The solution would be to implement a message queue component that allows communication between processes or between threads in the same process. The Solution Image Credit to AWS
  • 34. 01/03/23 © Abelski eLearning 34 Message Queue Pattern  The message queues provide an asynchronous communication protocol in which the sender and receiver don't need to interact at the same time. The messages are held in a queue until the recipient retrieves them. The Solution
  • 35. 01/03/23 © Abelski eLearning 35 Message Queue Pattern  When implementing the micro services architecture, this pattern allows multiple micro services to communicate with each other asynchronously. The Consequences