SlideShare a Scribd company logo
Ali BAKAN

Software Engineer



10.11.2017

ali.bakan@cloudnesil.com

www.cluoudnesil.com
MICRO SERVICES ARCHITECTURE
1
MICRO SERVICES ARCHITECTURE
AGENDA
1. What are microservices?
2. Reasons for using microservices
3. Challenges
4. Testing microservice based systems
5. Development environments
2
MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES?
DEFINITIONS
‣ The microservice architectural style is an approach to
developing a single application as a suite of small services,
each running in its own process and communicating with
lightweight mechanisms, often an HTTP resource API.
‣ These services are built around business capabilities and
independently deployable by fully automated deployment
machinery. 

- Martin Fowler
3
MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES?
DEFINITIONS
‣ Small autonomous services that work together, modeled
around a business domain. 

- Sam Newman, Thoughtworks Inc. (from building
microservices book)
‣ Microservices - also known as the microservice
architecture - is an architectural style that structures an
application as a collection of loosely coupled services,
which implement business capabilities

- Chris Richardson - CloudFoundry
4
MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES?
DEFINITIONS
‣ Microservices is a variant of the SOA that structures an
application as a collection of loosely coupled services. In a
microservices architecture, services should be fine-grained
and the protocols should be lightweight. 



It also parallelizes development by enabling small
autonomous teams to develop, deploy and scale services
independently. Microservices-based architectures enable
continuous delivery and deployment



- Wikipedia
5
MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES?
CHALLENGES WITH MONOLITHIC SOFTWARE
1. Difficult to scale (Lack of agility)
2. Long build/test/release cycles (Lack of innovation)
3. Long time to add new features (Frustrated customers)
4. Too much software coupling
5. Large Codebase
6. Many Components, no clear ownership
6
MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES?
MONOLITHIC VS. MICROSERVICES
7
MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES?
MONOLITHIC VS. MICROSERVICES
8
MICRO SERVICES ARCHITECTURE - REASONS FOR USING MICROSERVICES
WHY SHOULD WE USE?
‣ Rapid build/test/release cycles
‣ Strong modularization ensures that dependencies between
microservices can not easily creep in
‣ Microservices can be easily replaced
‣ The strong modularization and the replaceability of
microservices leads to a sustained speed of development the
architecture remains stable, and micro services that cannot be
maintained any longer can be replaced. Thus, the quality of
the system remains high in the long run, so that the system
stays maintainable
9
MICRO SERVICES ARCHITECTURE - REASONS FOR USING MICROSERVICES
WHY SHOULD WE USE?
‣ Strong modularization ensures that dependencies
between microservices can not easily creep in
‣ Microservices can be easily replaced
‣ The strong modularization and the replaceability of
microservices leads to a sustained speed of development
the architecture remains stable, and micro services that
cannot be maintained any longer can be replaced. Thus,
the quality of the system remains high in the long run, so
that the system stays maintainable
10
MICRO SERVICES ARCHITECTURE - REASONS FOR USING MICROSERVICES
WHY SHOULD WE USE?
‣ Legacy systems can be supplemented with microservices
without the need to carry around all the ballast that has
accumulated in the legacy system. Therefore,
microservices are good to use when dealing with legacy
systems.
‣ Microservices can be scaled independently
‣ Each microservice can be implemented in a different
programming language and with a different technology
11
MICRO SERVICES ARCHITECTURE - REASONS FOR USING MICROSERVICES
WHY SHOULD WE USE?
‣ Smaller Projects
‣ Smaller Teams
‣ Clear ownership and accountability
12
MICRO SERVICES ARCHITECTURE - CHALLENGES
OR SHOULDN’T WE USE :)
‣ There is no silver bullet in software design!
‣ Understanding of business domain
‣ Coordinating transactions across multiple services
‣ Complexity of testing/deploying/operating a distributed
system
‣ Development environment setup
‣ Log monitoring
‣ Cultural transformation
13
MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS
BASICS
‣ The division of a system into microservices has an impact
on testing
‣ In a microservice-based system the entire system
consisting of all microservices has to be tested
‣ This can be difficult when there are a large number of
microservices
‣ Microservices provide technology freedom; nevertheless,
there have to be certain standards, and tests can help to
enforce the technical standards
14
MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS
UNIT TESTS
‣ Unit tests examine the individual units that compose a
system just as their name suggests
‣ They minimize the risk that an individual unit contain errors
‣ Unit tests are intended to check small units, such as
individual methods or functions
‣ In order to achieve this, any dependencies that exist in the
unit have to replaced so that only the unit under test is
being exercised and not all its dependencies (Mock or
Stub)
15
MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS
INTEGRATION TESTS
‣ Integration tests check the interplay of the components
‣ This is to minimize the risk that the integration of the
components contain errors
‣ They do not use stubs or mocks
‣ The components can be tested as applications via the UI
or via special test frameworks
16
MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS
UI TESTS
‣ UI tests check the application via the user interface
‣ In principle, they only have to test whether the user
interface works correctly
17
MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS
MANUAL TESTS
‣ Check certain aspects like security, performance, or
features that have caused quality problems
18
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS
BASICS
‣ In particular, setting up a productive development
environment for microservices can be considerably more
complex than a traditional web application
‣ Your service might rely on other services that either you or
your coworkers maintain
‣ External dependencies add complexity to creating and
maintaining a development environment
‣ There are various approaches to setting up a development
environment. (from 100% local to 100% remote)
19
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS 20
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS
SPIN UP THE FULL SYSTEM LOCALLY
‣ Using tools like Minikube or Docker Compose, you can spin up
multiple services locally
‣ Pros:
- Fast, local development
‣ Cons:
- Need a way to set up and run all your services locally and keep
this setup in sync with how you run services in production
- Need to spin up the whole system locally, which will become
difficult once you have a large enough number of services and
resources
21
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS
SPIN UP THE FULL SYSTEM LOCALLY
22
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS
SPIN UP THE FULL SYSTEM IN THE CLOUD
‣ You spin up a realistic cluster in the cloud, a staging/testing environment
‣ It might not have as many nodes as the production system since load will be much
lower
‣ Pros:
- Very realistic
‣ Cons:
- Development is slower since you need to push code to cloud after every change
in order to try it out
- Using tools like debuggers is more difficult since the code all runs remotely
- Getting log data for development is considerably more complex.
- Need to pay for additional cloud resources
23
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS
SPIN UP THE FULL SYSTEM IN THE CLOUD
24
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS
SPIN UP ALL BUSINESS LOGIC LOCALLY, ROUTE CLOUD SERVICES TO LAPTOP
‣ Spin Up All Business Logic Locally, Route Cloud Services to Laptop
‣ As with option 1, all services run locally. However, cloud resources are made available
locally on your development machine via some sort of tunneling or proxying, e.g., a
VPN
‣ Pros:
‣ Fast, local development
‣ Very realistic.
‣ Cons:
‣ You need a way to set up and run all your services locally and keep this setup in sync
with how you run services in production
‣ Need to pay for additional cloud resources, and spinning up new cloud resources is
slow.
25
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS
SPIN UP ALL BUSINESS LOGIC LOCALLY, ROUTE CLOUD SERVICES TO LAPTOP
26
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS
MAKE LOCAL CODE FOR SINGLE SERVICE AVAILABLE IN REMOTE CLUSTER
‣ You spin up a realistic cluster in the cloud, a staging/testing environment, but
your service runs locally and is proxied/VPNed into the remote cluster
‣ Pros:
- Fast, local development.
- Very realistic.
- Simple local setup
‣ Cons:
- Need to pay for additional cloud resources, and spinning up new cloud
resources is slow
- Configuring a proxy or VPN that works with your cluster can be complex
27
MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS
MAKE LOCAL CODE FOR SINGLE SERVICE AVAILABLE IN REMOTE CLUSTER
28
MICRO SERVICES ARCHITECTURE
Conway's Law
"Any organization that designs a system will inevitably
produce a design whose structure is a copy of the
organization's communication structure"
Melvin E. Conway, 1967
29
MICRO SERVICES ARCHITECTURE
SOURCES
‣ https://martinfowler.com/articles/microservices.html
‣ https://en.wikipedia.org/wiki/Microservices
‣ https://dzone.com/articles/development-environments-
for-microservices
‣ https://smartbear.com/blog/test-and-monitor/4-essential-
strategies-for-testing-microservices/
30

More Related Content

What's hot

Pivotal Developer-Ready Infrastructure Slides
Pivotal Developer-Ready Infrastructure SlidesPivotal Developer-Ready Infrastructure Slides
Pivotal Developer-Ready Infrastructure Slides
VMware Tanzu
 
Orchestrating Cloud-Native and Traditional Application Architectures
Orchestrating Cloud-Native and Traditional Application ArchitecturesOrchestrating Cloud-Native and Traditional Application Architectures
Orchestrating Cloud-Native and Traditional Application Architectures
Apprenda
 
Kubernetes from the Ground Up
Kubernetes from the Ground UpKubernetes from the Ground Up
Kubernetes from the Ground Up
Dustin Humphries
 
Kubernetes in The Enterprise
Kubernetes in The EnterpriseKubernetes in The Enterprise
Kubernetes in The Enterprise
Tyrone Systems
 
WSO2Con ASIA 2016: Getting More 9s from Your Deployment
WSO2Con ASIA 2016: Getting More 9s from Your DeploymentWSO2Con ASIA 2016: Getting More 9s from Your Deployment
WSO2Con ASIA 2016: Getting More 9s from Your Deployment
WSO2
 
Deploying Microservices to Cloud Foundry
Deploying Microservices to Cloud FoundryDeploying Microservices to Cloud Foundry
Deploying Microservices to Cloud Foundry
Matt Stine
 
Connect the Dots: Logging and Custom Connectors
Connect the Dots: Logging and Custom ConnectorsConnect the Dots: Logging and Custom Connectors
Connect the Dots: Logging and Custom Connectors
AaronLieberman5
 
Introduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application ArchitectureIntroduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application Architecture
David Currie
 
Sprinting with Anypoint Runtime Fabric
Sprinting with Anypoint Runtime FabricSprinting with Anypoint Runtime Fabric
Sprinting with Anypoint Runtime Fabric
AaronLieberman5
 
Pivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First LookPivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First Look
VMware Tanzu
 
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress RouterMaking Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
VMware Tanzu
 
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom ConnectorsHow to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
AaronLieberman5
 
Cloud Standards: EnablingInteroperability.and.package.delivery
Cloud Standards: EnablingInteroperability.and.package.deliveryCloud Standards: EnablingInteroperability.and.package.delivery
Cloud Standards: EnablingInteroperability.and.package.delivery
Abiquo, Inc.
 
SolarWinds Federal Webinar: Technical Update & Demo of Newest Products & Feat...
SolarWinds Federal Webinar: Technical Update & Demo of Newest Products & Feat...SolarWinds Federal Webinar: Technical Update & Demo of Newest Products & Feat...
SolarWinds Federal Webinar: Technical Update & Demo of Newest Products & Feat...
SolarWinds
 
Micro services, reactive manifesto and 12-factors
Micro services, reactive manifesto and 12-factorsMicro services, reactive manifesto and 12-factors
Micro services, reactive manifesto and 12-factors
Dejan Glozic
 
The Cloud Native Journey
The Cloud Native JourneyThe Cloud Native Journey
The Cloud Native Journey
Matt Stine
 
Pedal to the metal: Red Hat CloudForms for workload & infrastructure management
Pedal to the metal: Red Hat CloudForms for workload & infrastructure managementPedal to the metal: Red Hat CloudForms for workload & infrastructure management
Pedal to the metal: Red Hat CloudForms for workload & infrastructure management
Alex Baretto
 
What Hackers Don’t Want You To Know: How to Maximize Your API Security
What Hackers Don’t Want You To Know: How to Maximize Your API SecurityWhat Hackers Don’t Want You To Know: How to Maximize Your API Security
What Hackers Don’t Want You To Know: How to Maximize Your API Security
AaronLieberman5
 
Reaching Cloud Utopia: How to Create a Single Pipeline for Hybrid Deployments
Reaching Cloud Utopia: How to Create a Single Pipeline for Hybrid DeploymentsReaching Cloud Utopia: How to Create a Single Pipeline for Hybrid Deployments
Reaching Cloud Utopia: How to Create a Single Pipeline for Hybrid Deployments
XebiaLabs
 
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
Mesosphere Inc.
 

What's hot (20)

Pivotal Developer-Ready Infrastructure Slides
Pivotal Developer-Ready Infrastructure SlidesPivotal Developer-Ready Infrastructure Slides
Pivotal Developer-Ready Infrastructure Slides
 
Orchestrating Cloud-Native and Traditional Application Architectures
Orchestrating Cloud-Native and Traditional Application ArchitecturesOrchestrating Cloud-Native and Traditional Application Architectures
Orchestrating Cloud-Native and Traditional Application Architectures
 
Kubernetes from the Ground Up
Kubernetes from the Ground UpKubernetes from the Ground Up
Kubernetes from the Ground Up
 
Kubernetes in The Enterprise
Kubernetes in The EnterpriseKubernetes in The Enterprise
Kubernetes in The Enterprise
 
WSO2Con ASIA 2016: Getting More 9s from Your Deployment
WSO2Con ASIA 2016: Getting More 9s from Your DeploymentWSO2Con ASIA 2016: Getting More 9s from Your Deployment
WSO2Con ASIA 2016: Getting More 9s from Your Deployment
 
Deploying Microservices to Cloud Foundry
Deploying Microservices to Cloud FoundryDeploying Microservices to Cloud Foundry
Deploying Microservices to Cloud Foundry
 
Connect the Dots: Logging and Custom Connectors
Connect the Dots: Logging and Custom ConnectorsConnect the Dots: Logging and Custom Connectors
Connect the Dots: Logging and Custom Connectors
 
Introduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application ArchitectureIntroduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application Architecture
 
Sprinting with Anypoint Runtime Fabric
Sprinting with Anypoint Runtime FabricSprinting with Anypoint Runtime Fabric
Sprinting with Anypoint Runtime Fabric
 
Pivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First LookPivotal Cloud Foundry 2.3: A First Look
Pivotal Cloud Foundry 2.3: A First Look
 
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress RouterMaking Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
Making Microservices Smarter with Istio, Envoy and Pivotal Ingress Router
 
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom ConnectorsHow to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
 
Cloud Standards: EnablingInteroperability.and.package.delivery
Cloud Standards: EnablingInteroperability.and.package.deliveryCloud Standards: EnablingInteroperability.and.package.delivery
Cloud Standards: EnablingInteroperability.and.package.delivery
 
SolarWinds Federal Webinar: Technical Update & Demo of Newest Products & Feat...
SolarWinds Federal Webinar: Technical Update & Demo of Newest Products & Feat...SolarWinds Federal Webinar: Technical Update & Demo of Newest Products & Feat...
SolarWinds Federal Webinar: Technical Update & Demo of Newest Products & Feat...
 
Micro services, reactive manifesto and 12-factors
Micro services, reactive manifesto and 12-factorsMicro services, reactive manifesto and 12-factors
Micro services, reactive manifesto and 12-factors
 
The Cloud Native Journey
The Cloud Native JourneyThe Cloud Native Journey
The Cloud Native Journey
 
Pedal to the metal: Red Hat CloudForms for workload & infrastructure management
Pedal to the metal: Red Hat CloudForms for workload & infrastructure managementPedal to the metal: Red Hat CloudForms for workload & infrastructure management
Pedal to the metal: Red Hat CloudForms for workload & infrastructure management
 
What Hackers Don’t Want You To Know: How to Maximize Your API Security
What Hackers Don’t Want You To Know: How to Maximize Your API SecurityWhat Hackers Don’t Want You To Know: How to Maximize Your API Security
What Hackers Don’t Want You To Know: How to Maximize Your API Security
 
Reaching Cloud Utopia: How to Create a Single Pipeline for Hybrid Deployments
Reaching Cloud Utopia: How to Create a Single Pipeline for Hybrid DeploymentsReaching Cloud Utopia: How to Create a Single Pipeline for Hybrid Deployments
Reaching Cloud Utopia: How to Create a Single Pipeline for Hybrid Deployments
 
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
 

Similar to Micro Services Architecture

Cloud Native In-Depth
Cloud Native In-DepthCloud Native In-Depth
Cloud Native In-Depth
Siva Rama Krishna Chunduru
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
Kasun Indrasiri
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
Miki Lombardi
 
Microservices
MicroservicesMicroservices
Diving Into Docker
Diving Into Docker Diving Into Docker
Diving Into Docker
XebiaLabs
 
Microservices Tutorial for Beginners | All You Need to Get Started
Microservices Tutorial for Beginners | All You Need to Get StartedMicroservices Tutorial for Beginners | All You Need to Get Started
Microservices Tutorial for Beginners | All You Need to Get Started
Shailendra Chauhan
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Paulo Gandra de Sousa
 
Service Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumService Mesh Talk for CTO Forum
Service Mesh Talk for CTO Forum
Rick Hightower
 
Think Small To Go Big - Introduction To Microservices
Think Small To Go Big - Introduction To MicroservicesThink Small To Go Big - Introduction To Microservices
Think Small To Go Big - Introduction To Microservices
Ryan Baxter
 
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and MoreA Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
Simform
 
MuleSoft Anypoint Platform and Three Tier Architecture
MuleSoft Anypoint  Platform and Three Tier ArchitectureMuleSoft Anypoint  Platform and Three Tier Architecture
MuleSoft Anypoint Platform and Three Tier Architecture
Harish Kumar
 
Evolving your Architecture to MicroServices
Evolving your Architecture to MicroServicesEvolving your Architecture to MicroServices
Evolving your Architecture to MicroServices
Hector Tapia
 
Microservices.pdf
Microservices.pdfMicroservices.pdf
Microservices.pdf
UsmanAhmad704728
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
Rodrigo Antonialli
 
Building Microservices with Ruby on Rails: Maximizing Efficiency and Scalability
Building Microservices with Ruby on Rails: Maximizing Efficiency and ScalabilityBuilding Microservices with Ruby on Rails: Maximizing Efficiency and Scalability
Building Microservices with Ruby on Rails: Maximizing Efficiency and Scalability
BoTree Technologies
 
The Reality of Managing Microservices in Your CD Pipeline
The Reality of Managing Microservices in Your CD PipelineThe Reality of Managing Microservices in Your CD Pipeline
The Reality of Managing Microservices in Your CD Pipeline
DevOps.com
 
building microservices
building microservicesbuilding microservices
building microservices
Cisco DevNet
 
MuleSoft Meetup Adelaide 7th April 2021
MuleSoft Meetup Adelaide 7th April 2021MuleSoft Meetup Adelaide 7th April 2021
MuleSoft Meetup Adelaide 7th April 2021
Nicholas Bowman
 
Cloud Native Architecture: Its Benefits and Key Components
Cloud Native Architecture: Its Benefits and Key ComponentsCloud Native Architecture: Its Benefits and Key Components
Cloud Native Architecture: Its Benefits and Key Components
AndrewHolland58
 
Micro service Arthicetcure
Micro service Arthicetcure Micro service Arthicetcure
Micro service Arthicetcure
Kian Paimani
 

Similar to Micro Services Architecture (20)

Cloud Native In-Depth
Cloud Native In-DepthCloud Native In-Depth
Cloud Native In-Depth
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Microservices
MicroservicesMicroservices
Microservices
 
Diving Into Docker
Diving Into Docker Diving Into Docker
Diving Into Docker
 
Microservices Tutorial for Beginners | All You Need to Get Started
Microservices Tutorial for Beginners | All You Need to Get StartedMicroservices Tutorial for Beginners | All You Need to Get Started
Microservices Tutorial for Beginners | All You Need to Get Started
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Service Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumService Mesh Talk for CTO Forum
Service Mesh Talk for CTO Forum
 
Think Small To Go Big - Introduction To Microservices
Think Small To Go Big - Introduction To MicroservicesThink Small To Go Big - Introduction To Microservices
Think Small To Go Big - Introduction To Microservices
 
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and MoreA Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
 
MuleSoft Anypoint Platform and Three Tier Architecture
MuleSoft Anypoint  Platform and Three Tier ArchitectureMuleSoft Anypoint  Platform and Three Tier Architecture
MuleSoft Anypoint Platform and Three Tier Architecture
 
Evolving your Architecture to MicroServices
Evolving your Architecture to MicroServicesEvolving your Architecture to MicroServices
Evolving your Architecture to MicroServices
 
Microservices.pdf
Microservices.pdfMicroservices.pdf
Microservices.pdf
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
 
Building Microservices with Ruby on Rails: Maximizing Efficiency and Scalability
Building Microservices with Ruby on Rails: Maximizing Efficiency and ScalabilityBuilding Microservices with Ruby on Rails: Maximizing Efficiency and Scalability
Building Microservices with Ruby on Rails: Maximizing Efficiency and Scalability
 
The Reality of Managing Microservices in Your CD Pipeline
The Reality of Managing Microservices in Your CD PipelineThe Reality of Managing Microservices in Your CD Pipeline
The Reality of Managing Microservices in Your CD Pipeline
 
building microservices
building microservicesbuilding microservices
building microservices
 
MuleSoft Meetup Adelaide 7th April 2021
MuleSoft Meetup Adelaide 7th April 2021MuleSoft Meetup Adelaide 7th April 2021
MuleSoft Meetup Adelaide 7th April 2021
 
Cloud Native Architecture: Its Benefits and Key Components
Cloud Native Architecture: Its Benefits and Key ComponentsCloud Native Architecture: Its Benefits and Key Components
Cloud Native Architecture: Its Benefits and Key Components
 
Micro service Arthicetcure
Micro service Arthicetcure Micro service Arthicetcure
Micro service Arthicetcure
 

Recently uploaded

Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 

Recently uploaded (20)

Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 

Micro Services Architecture

  • 2. MICRO SERVICES ARCHITECTURE AGENDA 1. What are microservices? 2. Reasons for using microservices 3. Challenges 4. Testing microservice based systems 5. Development environments 2
  • 3. MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES? DEFINITIONS ‣ The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. ‣ These services are built around business capabilities and independently deployable by fully automated deployment machinery. 
 - Martin Fowler 3
  • 4. MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES? DEFINITIONS ‣ Small autonomous services that work together, modeled around a business domain. 
 - Sam Newman, Thoughtworks Inc. (from building microservices book) ‣ Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of loosely coupled services, which implement business capabilities
 - Chris Richardson - CloudFoundry 4
  • 5. MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES? DEFINITIONS ‣ Microservices is a variant of the SOA that structures an application as a collection of loosely coupled services. In a microservices architecture, services should be fine-grained and the protocols should be lightweight. 
 
 It also parallelizes development by enabling small autonomous teams to develop, deploy and scale services independently. Microservices-based architectures enable continuous delivery and deployment
 
 - Wikipedia 5
  • 6. MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES? CHALLENGES WITH MONOLITHIC SOFTWARE 1. Difficult to scale (Lack of agility) 2. Long build/test/release cycles (Lack of innovation) 3. Long time to add new features (Frustrated customers) 4. Too much software coupling 5. Large Codebase 6. Many Components, no clear ownership 6
  • 7. MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES? MONOLITHIC VS. MICROSERVICES 7
  • 8. MICRO SERVICES ARCHITECTURE - WHAT ARE MICROSERVICES? MONOLITHIC VS. MICROSERVICES 8
  • 9. MICRO SERVICES ARCHITECTURE - REASONS FOR USING MICROSERVICES WHY SHOULD WE USE? ‣ Rapid build/test/release cycles ‣ Strong modularization ensures that dependencies between microservices can not easily creep in ‣ Microservices can be easily replaced ‣ The strong modularization and the replaceability of microservices leads to a sustained speed of development the architecture remains stable, and micro services that cannot be maintained any longer can be replaced. Thus, the quality of the system remains high in the long run, so that the system stays maintainable 9
  • 10. MICRO SERVICES ARCHITECTURE - REASONS FOR USING MICROSERVICES WHY SHOULD WE USE? ‣ Strong modularization ensures that dependencies between microservices can not easily creep in ‣ Microservices can be easily replaced ‣ The strong modularization and the replaceability of microservices leads to a sustained speed of development the architecture remains stable, and micro services that cannot be maintained any longer can be replaced. Thus, the quality of the system remains high in the long run, so that the system stays maintainable 10
  • 11. MICRO SERVICES ARCHITECTURE - REASONS FOR USING MICROSERVICES WHY SHOULD WE USE? ‣ Legacy systems can be supplemented with microservices without the need to carry around all the ballast that has accumulated in the legacy system. Therefore, microservices are good to use when dealing with legacy systems. ‣ Microservices can be scaled independently ‣ Each microservice can be implemented in a different programming language and with a different technology 11
  • 12. MICRO SERVICES ARCHITECTURE - REASONS FOR USING MICROSERVICES WHY SHOULD WE USE? ‣ Smaller Projects ‣ Smaller Teams ‣ Clear ownership and accountability 12
  • 13. MICRO SERVICES ARCHITECTURE - CHALLENGES OR SHOULDN’T WE USE :) ‣ There is no silver bullet in software design! ‣ Understanding of business domain ‣ Coordinating transactions across multiple services ‣ Complexity of testing/deploying/operating a distributed system ‣ Development environment setup ‣ Log monitoring ‣ Cultural transformation 13
  • 14. MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS BASICS ‣ The division of a system into microservices has an impact on testing ‣ In a microservice-based system the entire system consisting of all microservices has to be tested ‣ This can be difficult when there are a large number of microservices ‣ Microservices provide technology freedom; nevertheless, there have to be certain standards, and tests can help to enforce the technical standards 14
  • 15. MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS UNIT TESTS ‣ Unit tests examine the individual units that compose a system just as their name suggests ‣ They minimize the risk that an individual unit contain errors ‣ Unit tests are intended to check small units, such as individual methods or functions ‣ In order to achieve this, any dependencies that exist in the unit have to replaced so that only the unit under test is being exercised and not all its dependencies (Mock or Stub) 15
  • 16. MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS INTEGRATION TESTS ‣ Integration tests check the interplay of the components ‣ This is to minimize the risk that the integration of the components contain errors ‣ They do not use stubs or mocks ‣ The components can be tested as applications via the UI or via special test frameworks 16
  • 17. MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS UI TESTS ‣ UI tests check the application via the user interface ‣ In principle, they only have to test whether the user interface works correctly 17
  • 18. MICRO SERVICES ARCHITECTURE - TESTING MICROSERVICE BASED SYSTEMS MANUAL TESTS ‣ Check certain aspects like security, performance, or features that have caused quality problems 18
  • 19. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS BASICS ‣ In particular, setting up a productive development environment for microservices can be considerably more complex than a traditional web application ‣ Your service might rely on other services that either you or your coworkers maintain ‣ External dependencies add complexity to creating and maintaining a development environment ‣ There are various approaches to setting up a development environment. (from 100% local to 100% remote) 19
  • 20. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS 20
  • 21. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS SPIN UP THE FULL SYSTEM LOCALLY ‣ Using tools like Minikube or Docker Compose, you can spin up multiple services locally ‣ Pros: - Fast, local development ‣ Cons: - Need a way to set up and run all your services locally and keep this setup in sync with how you run services in production - Need to spin up the whole system locally, which will become difficult once you have a large enough number of services and resources 21
  • 22. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS SPIN UP THE FULL SYSTEM LOCALLY 22
  • 23. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS SPIN UP THE FULL SYSTEM IN THE CLOUD ‣ You spin up a realistic cluster in the cloud, a staging/testing environment ‣ It might not have as many nodes as the production system since load will be much lower ‣ Pros: - Very realistic ‣ Cons: - Development is slower since you need to push code to cloud after every change in order to try it out - Using tools like debuggers is more difficult since the code all runs remotely - Getting log data for development is considerably more complex. - Need to pay for additional cloud resources 23
  • 24. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS SPIN UP THE FULL SYSTEM IN THE CLOUD 24
  • 25. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS SPIN UP ALL BUSINESS LOGIC LOCALLY, ROUTE CLOUD SERVICES TO LAPTOP ‣ Spin Up All Business Logic Locally, Route Cloud Services to Laptop ‣ As with option 1, all services run locally. However, cloud resources are made available locally on your development machine via some sort of tunneling or proxying, e.g., a VPN ‣ Pros: ‣ Fast, local development ‣ Very realistic. ‣ Cons: ‣ You need a way to set up and run all your services locally and keep this setup in sync with how you run services in production ‣ Need to pay for additional cloud resources, and spinning up new cloud resources is slow. 25
  • 26. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS SPIN UP ALL BUSINESS LOGIC LOCALLY, ROUTE CLOUD SERVICES TO LAPTOP 26
  • 27. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS MAKE LOCAL CODE FOR SINGLE SERVICE AVAILABLE IN REMOTE CLUSTER ‣ You spin up a realistic cluster in the cloud, a staging/testing environment, but your service runs locally and is proxied/VPNed into the remote cluster ‣ Pros: - Fast, local development. - Very realistic. - Simple local setup ‣ Cons: - Need to pay for additional cloud resources, and spinning up new cloud resources is slow - Configuring a proxy or VPN that works with your cluster can be complex 27
  • 28. MICRO SERVICES ARCHITECTURE - DEVELOPMENT ENVIRONMENTS MAKE LOCAL CODE FOR SINGLE SERVICE AVAILABLE IN REMOTE CLUSTER 28
  • 29. MICRO SERVICES ARCHITECTURE Conway's Law "Any organization that designs a system will inevitably produce a design whose structure is a copy of the organization's communication structure" Melvin E. Conway, 1967 29
  • 30. MICRO SERVICES ARCHITECTURE SOURCES ‣ https://martinfowler.com/articles/microservices.html ‣ https://en.wikipedia.org/wiki/Microservices ‣ https://dzone.com/articles/development-environments- for-microservices ‣ https://smartbear.com/blog/test-and-monitor/4-essential- strategies-for-testing-microservices/ 30