SlideShare a Scribd company logo
Introduction to Microservices
Architecture
Rodrigo Antonialli
SECCOMP 2020 - 26-11-2020
Agenda
● What is a Microservices Architecture ?
○ Microservices Characteristics
■ Focus on Pros and Cons
■ Enabling Technologies
● Where to go from here
Before we begin
● Don’t blindly trust anyone
○ Be responsible for your own choices
● Try to keep your pre-established concepts "under control"
○ You should get to know it, even, and specially, if you don’t like it.
○ Open minded always see something good from it…even if it’s to avoid it.
What is a Microservices Architecture?
Microservices Architecture
"In short, 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. There is a bare minimum
of centralized management of these services, which may be written in different programming
languages and use different data storage technologies."
-- James Lewis and Martin Fowler (2014)
Microservices Architecture
"Microservices - also known as the microservice architecture - is an architectural style that structures an
application as a collection of services that are
● Highly maintainable and testable
● Loosely coupled
● Independently deployable
● Organized around business capabilities
● Owned by a small team
The microservice architecture enables the rapid, frequent and reliable delivery of large, complex
applications. It also enables an organization to evolve its technology stack. "
-- Chris Richardson - microservices.io
Microservices Architecture
● It's not only about how the software components are organized
○ Requires a cultural change
Independent Services
Independent Teams
Projects Products
Highly Coupled Teams
Single Application
Microservices Architecture
● Microservices Architecture emerged from the community
○ No single definition, although some consensus
○ Experienced developers who adventured (and had a lot of failures) with SOA
○ Some say: "How to do SOA right"
○ Desired Characteristics and Patterns to do SOA
● Some references with good resources:
○ Martin Fowler & James Lewis - https://martinfowler.com/articles/microservices.html
○ Chris Richardson - https://microservices.io
○ Sam Newman - https://samnewman.io/books/
Microservices Architecture
● Most common scenario:
Monolith
Database
Monitoring
Events
Presentation
Business Logic
Data Model
Load Balance
Service A
Database A
Discovery
Service B
Database
Migration
Microservices Architecture
● Most common scenario:
Monolith
Presentation
Business Logic
Data Model
Migration
Monolith
Database
Presentation
Business Logic
Data Model
Monolith
Presentation
Business Logic
Data Model
Monitoring
Events
Load Balance
Service A
Database A
Discovery
Service B
Database
Service A
Service A
Microservices Architecture
● Where is it adopted today?
○ Big tech companies:
■ Netflix - Shared a lot of tools and libraries they use as open source
■ Uber, Amazon, Ebay, Spotify… and others
○ It's becoming an industry standard solution to solve high scalability and faster delivery
■ There is, however, a lot of discussion about this future
● It’s more suitable for BIG companies with BIG problems to solve
○ It doesn’t mean you can’t start with it - Don’t start with a monolith - Stefan Tilkov
○ You definitely can learn from it
Microservices Architecture
● Not a silver bullet - It will not solve all of your problems
● No strict set of rules - No single definition, no single way
● Not the end goal - You should not measure success based on how you “do microservices”
● New set of problems: No receipt. Custom solutions you'll have to figure out by yourself.
○ Patterns established to help with decisions and implementation
Effort and Time
Big organization
Multiple teams
Small organization
Small team(s)
Starting from Scratch
Migrating from a
Monolith
Microservices Characteristics
Microservices Characteristics - How “micro”?
How “micro” is a microservice?
● 100-200 lines of code?
● Small enough to be re-written in 2 weeks?
● Of course: no single rule to fit it all.
Tips that indicate if two services should be merged:
● Feature redundancy or similarity between features
● High number of calls between services
● Change in interpretation of Business Capabilities and/or Domains
● Constantly updating different services together
Microservices Characteristics
● Componentization via Services
● Organization around Business Capabilities
● Products not Projects
● Smart endpoints and dumb pipes
● Decentralized Governance
● Decentralized Data Management
● Infrastructure Automation
● Design for failure
● Evolutionary Design
Microservices - by Martin Fowler
Microservices Characteristics - Componentization via Services
Pros
● Highly maintainable and testable
● Independently deployable
● Owned by a small team
● Very flexible scalability
Cons
● Distributed Systems - harder to program, specially with async
communication
● Eventual Consistency - distributed data
● Operational Complexity - large number of services deployed
microservices.io
Enabling Technologies
● Containers & Containers Orchestrators
○ Help to automate and simplify deployment - core technologies to enable microservices
○ Docker
○ Podman
○ Docker Compose and Swarm
○ Kubernetes
Microservices Characteristics - Organization around Business Capabilities
Pros
● Well-defined scope - favor independent teams work
● Enables faster collaboration - teams can solve design and integrations
faster
Cons
● Might be challenging to define - depends on interpretation
● May slow down at first - the capabilities and domains must be
discussed and defined before multiple teams starting to work
microservices.io
Microservices Characteristics - Products not Projects
● Products not Projects
○ Development is not an isolated activity with beginning and end:
■ You build it, you run it
○ The team owns the full life-cycle of the service: design, development, deployment and
monitoring in production
○ Teams also collaborate to product decisions
Pros
● Constant relationship of developers and owned product - easier to
evolve and to provide better user experiments
Cons
● Change in culture - takes time, specially because it involves multiple
teams, developers and managers.
Microservices Characteristics - Smart endpoints and dumb pipes
Pros
● Logic and filtering is owned by the service - easier to
understand and change in the future
Cons
● Messaging might pose a different paradigm to build
software - services may follow choreography pattern
instead of orchestration pattern
MS 1
MS 2
MS 3
MS 1
MS 2
MS 3
BUS MS 1
MS 2
MS 3
MS 1
MS 2
MS 3
MS 1
MS 2
MS 3
MS 1
MS 2
MS 3
REST Messages
Enabling Technologies
● Messaging
○ Implement event storage, routing and other support functionalities for event driven
communication
■ RabbitMQ
■ Apache Kafka
■ Google Cloud Pub/Sub
■ Amazon SQS
Microservices Characteristics - Decentralized Governance
“not every problem is a nail and not every solution a hammer.” - Microservices - Martin Fowler
Pros
● Flexibility to adopt different languages - the right tool for the job
● More opportunities to adopt new technologies
Cons
● Challenges to promote culture of reusage
● Difference between languages might still pose challenges
sometimes
Java Service
Python Service
Go Service
JS Service
Enabling Technologies
● Interface Definition Languages - IDL
○ Specification languages used to describe Application Programming Interface (API) - usually
associated to code generation - most common for polyglot environments
■ Google Protocol Buffers
■ Apache Avro
■ Apache Thrift
■ JSON
Microservices Characteristics - Decentralized Data Management
Pros
● Flexibility to adopt different models, schemas and storage
technologies - the right tool for the job at data level
Cons
● Distributed Transactions - an operation may involve multiple
services
● Eventual Consistency - needs to be supported/fixed with
compensating operations
● Conceptual alignment may be very hard
Bounded Context - Martin Fowler Microservices - Martin Fowler
Microservices Characteristics - Infrastructure Automation
Benefits
● Fast, frequent and reliable delivery - automated tests reduce the
risks of a broken instance to be used - increases the trust on the
deployed software
● Monitoring and tracing automation - faster response to failures
Challenges
● Change in culture to adopt tests as first class citizens (Test
Driven Design)
● Requires knowledge and effort to set up infrastructure beyond
the service domain
Wikipedia - DevOps
Enabling Technologies
● Continuous Integration & Continuous Delivery
○ Automate integration and deployment. Heavily used in combination with Containers and
Containers Orchestrations
■ GitHub Actions
■ GitLab Pipelines
■ Jenkins
■ Ansible
■ Puppet
Microservices Characteristics - Design for failure
Pros
● Fault tolerance contributes to more responsive application.
● Well-established monitoring helps decrease failures response
time
Cons
● Sync calls - easy to implement, more chance to fail
● Good level of monitoring and distributed tracing may be
challenging to achieve
Circuit Breaker - Martin Fowler
Enabling Technologies
● Monitoring & Logging Tools
○ Tools to monitor and debug microservices environments (centralized logging)
○ Grafana
○ Prometheus
○ Zipkin
○ Logstash
○ Graylog
Enabling Technologies
● Frameworks
○ Language specific frameworks to make it easy to implement microservices
○ Spring Boot & Spring Cloud - Java
■ Netflix OSS
○ Eclipse Vert.X - Multiple Languages
○ Moleculer - NodeJS
○ What about python? Although you can use Django, Flask or Tornado, to build microservices,
they present themselves as Web frameworks
Microservices Characteristics - Evolutionary Design
Pros
● Changes can be more frequent, fast and well-defined.
● Small services can be easily scraped and replaced
● Functionalities can be added as services to existing
monoliths
Cons
● Eventually contracts between services will break
● Versioning - hard for clients when constantly updated - hard for
developer team to support multiple versions
● Monolith to Services - challenging depending on the scenario
microservices.io - Strangler Application Pattern
Service A
Database
Today:
Service B
Database
input
Service A
Database
Tomorrow:
Service B
Database
data
input
Missing required param
Microservices Pros
● Flexible Scalability
○ The application doesn’t need to scale homogeneously
○ Scale just what you need
● Improved maintainability
○ Small service is easier to understand and change - makes onboarding easier
● Better testability
○ Faster to test
● Better deployability
○ Services can be deployed independently
○ Reduces breaking changes when best practices of code-review and automated tests are applied.
Microservices Pros
● Developers tend to be more productive
○ The IDE is faster, the application starts faster, tests run faster.
○ Less code to keep track and control
● Technology stack is flexible
○ Polyglot Programming: Choose the right tool for the job.
○ Flexible data storage: Choose models and schemas according to context
● Over time, it increases fault tolerance and fault isolation
○ When patterns and best practices are applied and a certain maturity is reached, it’s easier to isolate where/why
a fault happened/is happening.
Microservices Cons
● More complex
○ New technologies, new concepts, new patterns - new set of problems to solve
○ Inherits complexities of any distributed systems: latency, failure.
● Requires cultural change
○ Teams might need to be restructured
○ Organization management needs to delegate responsibilities to teams - they own the service, they make
decisions
● More expensive
○ Remote calls - again
○ More resources - independent services, independent CPU, memory, etc.
Microservices Cons
● No strict set of rules
○ Still susceptible to different interpretations - disputes on how to adopt/implement
○ It’s hard to choose when/why to adopt
● It may introduce more problems than it solves
○ Maybe your problem is just communication between stakeholders (management and developers)
○ Maybe your problem could be solved just by infrastructure automation
Where to go from here
Microservices Architecture
Student
Yet another thing to
learn. It’s fine if you
want, but start with
getting the high level
concepts and focus on
the enabling tech.
Junior/Mid-level
You’ll eventually come
across it somewhere,
sometime. It’s helpful
to improve skills and
make choices for your
career.
Experienced
You’ll most likely know
what to do by yourself,
but remember we
never quit learning.
● Should I think / worry / use / learn Microservices Architecture?
References
● https://martinfowler.com/articles/microservices.html
● https://microservices.io/
● https://tsh.io/state-of-microservices/
● https://www.tiempodev.com/blog/disadvantages-of-a-microservices-architecture/
● https://dzone.com/articles/30top-tools-for-building-microservices-on-all-leve
● https://medium.com/microservices-architecture/top-10-microservices-framework-for-2020-eefb5e66d
1a2
● https://searchsoftwarequality.techtarget.com/feature/Compare-a-product-vs-project-mindset-for-softw
are-development

More Related Content

What's hot

building microservices
building microservicesbuilding microservices
building microservices
Cisco DevNet
 
Building Microservices: Designing Fine-Grained System by Sam Newman
Building Microservices: Designing Fine-Grained System by Sam NewmanBuilding Microservices: Designing Fine-Grained System by Sam Newman
Building Microservices: Designing Fine-Grained System by Sam Newman
Ismail Habib Muhammad
 
Accelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesAccelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and Kubernetes
Rick Hightower
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Srinivasan Nanduri
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
Mohammad Dameer
 
Introduction to microservices Jornada Microservices
Introduction to microservices Jornada MicroservicesIntroduction to microservices Jornada Microservices
Introduction to microservices Jornada Microservices
Roan Brasil Monteiro
 
Microservices (msa) insights with comments
Microservices (msa) insights with commentsMicroservices (msa) insights with comments
Microservices (msa) insights with comments
Lior Bar-On
 
Microservice architecture 바로 알기
Microservice architecture 바로 알기Microservice architecture 바로 알기
Microservice architecture 바로 알기
GunHee Lee
 
Microservice architecture : Part 1
Microservice architecture : Part 1Microservice architecture : Part 1
Microservice architecture : Part 1
NodeXperts
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
Žilvinas Kuusas
 
Kenzan: Architecting for Microservices
Kenzan: Architecting for MicroservicesKenzan: Architecting for Microservices
Kenzan: Architecting for Microservices
Darren Bathgate
 
Presentation cloud computing
Presentation cloud computingPresentation cloud computing
Presentation cloud computingAkash Pandey
 
Microservices
MicroservicesMicroservices
Microservices
ACCESS Health Digital
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
Kasun Indrasiri
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Rich Lee
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Nguyen Tung
 
Microservice
MicroserviceMicroservice
Microservice
Viney Shih
 
Microservices
MicroservicesMicroservices
Microservices
Thiago Lopes
 
DEVNET-1184 Microservices Patterns
DEVNET-1184	Microservices PatternsDEVNET-1184	Microservices Patterns
DEVNET-1184 Microservices Patterns
Cisco DevNet
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Lucian Neghina
 

What's hot (20)

building microservices
building microservicesbuilding microservices
building microservices
 
Building Microservices: Designing Fine-Grained System by Sam Newman
Building Microservices: Designing Fine-Grained System by Sam NewmanBuilding Microservices: Designing Fine-Grained System by Sam Newman
Building Microservices: Designing Fine-Grained System by Sam Newman
 
Accelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesAccelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and Kubernetes
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Introduction to microservices Jornada Microservices
Introduction to microservices Jornada MicroservicesIntroduction to microservices Jornada Microservices
Introduction to microservices Jornada Microservices
 
Microservices (msa) insights with comments
Microservices (msa) insights with commentsMicroservices (msa) insights with comments
Microservices (msa) insights with comments
 
Microservice architecture 바로 알기
Microservice architecture 바로 알기Microservice architecture 바로 알기
Microservice architecture 바로 알기
 
Microservice architecture : Part 1
Microservice architecture : Part 1Microservice architecture : Part 1
Microservice architecture : Part 1
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Kenzan: Architecting for Microservices
Kenzan: Architecting for MicroservicesKenzan: Architecting for Microservices
Kenzan: Architecting for Microservices
 
Presentation cloud computing
Presentation cloud computingPresentation cloud computing
Presentation cloud computing
 
Microservices
MicroservicesMicroservices
Microservices
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Microservice
MicroserviceMicroservice
Microservice
 
Microservices
MicroservicesMicroservices
Microservices
 
DEVNET-1184 Microservices Patterns
DEVNET-1184	Microservices PatternsDEVNET-1184	Microservices Patterns
DEVNET-1184 Microservices Patterns
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 

Similar to 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
Mukesh Singh
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
Miki Lombardi
 
Surviving microservices
Surviving microservicesSurviving microservices
Surviving microservices
Francesco Degrassi
 
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
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesAngelos Kapsimanis
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
Cisco DevNet
 
MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.
PLovababu
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
Luiz Fernando Signorelli
 
Microservices.pdf
Microservices.pdfMicroservices.pdf
Microservices.pdf
UsmanAhmad704728
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Anil Allewar
 
Introduction to Microservices_Architecture.pptx
Introduction to Microservices_Architecture.pptxIntroduction to Microservices_Architecture.pptx
Introduction to Microservices_Architecture.pptx
HamzaBoutlih
 
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
 
Microservices
MicroservicesMicroservices
Microservices
NewsCred Dhaka
 
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
 
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to MicroservicesHow to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
VMware Tanzu
 
MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021
Ieva Navickaite
 
Vodafone Devops Days - Micro service architecture
Vodafone Devops Days - Micro service architectureVodafone Devops Days - Micro service architecture
Vodafone Devops Days - Micro service architecture
Turgay Can
 
Serverless microservices
Serverless microservicesServerless microservices
Serverless microservices
Lalit Kale
 
An eventful tour from enterprise integration to serverless and functions
An eventful tour from enterprise integration to serverless and functionsAn eventful tour from enterprise integration to serverless and functions
An eventful tour from enterprise integration to serverless and functions
Christian Posta
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with Microservices
Jim (张建军) Zhang
 

Similar to Introduction to Microservices Architecture - SECCOMP 2020 (20)

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
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Surviving microservices
Surviving microservicesSurviving microservices
Surviving microservices
 
Service Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumService Mesh Talk for CTO Forum
Service Mesh Talk for CTO Forum
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based Architectures
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
 
MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Microservices.pdf
Microservices.pdfMicroservices.pdf
Microservices.pdf
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Introduction to Microservices_Architecture.pptx
Introduction to Microservices_Architecture.pptxIntroduction to Microservices_Architecture.pptx
Introduction to Microservices_Architecture.pptx
 
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
 
Microservices
MicroservicesMicroservices
Microservices
 
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
 
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to MicroservicesHow to Overcome Data Challenges When Refactoring Monoliths to Microservices
How to Overcome Data Challenges When Refactoring Monoliths to Microservices
 
MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021
 
Vodafone Devops Days - Micro service architecture
Vodafone Devops Days - Micro service architectureVodafone Devops Days - Micro service architecture
Vodafone Devops Days - Micro service architecture
 
Serverless microservices
Serverless microservicesServerless microservices
Serverless microservices
 
An eventful tour from enterprise integration to serverless and functions
An eventful tour from enterprise integration to serverless and functionsAn eventful tour from enterprise integration to serverless and functions
An eventful tour from enterprise integration to serverless and functions
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with Microservices
 

Recently uploaded

Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
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
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 

Recently uploaded (20)

Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
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
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 

Introduction to Microservices Architecture - SECCOMP 2020

  • 1. Introduction to Microservices Architecture Rodrigo Antonialli SECCOMP 2020 - 26-11-2020
  • 2. Agenda ● What is a Microservices Architecture ? ○ Microservices Characteristics ■ Focus on Pros and Cons ■ Enabling Technologies ● Where to go from here
  • 3. Before we begin ● Don’t blindly trust anyone ○ Be responsible for your own choices ● Try to keep your pre-established concepts "under control" ○ You should get to know it, even, and specially, if you don’t like it. ○ Open minded always see something good from it…even if it’s to avoid it.
  • 4. What is a Microservices Architecture?
  • 5. Microservices Architecture "In short, 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. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies." -- James Lewis and Martin Fowler (2014)
  • 6. Microservices Architecture "Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of services that are ● Highly maintainable and testable ● Loosely coupled ● Independently deployable ● Organized around business capabilities ● Owned by a small team The microservice architecture enables the rapid, frequent and reliable delivery of large, complex applications. It also enables an organization to evolve its technology stack. " -- Chris Richardson - microservices.io
  • 7. Microservices Architecture ● It's not only about how the software components are organized ○ Requires a cultural change Independent Services Independent Teams Projects Products Highly Coupled Teams Single Application
  • 8. Microservices Architecture ● Microservices Architecture emerged from the community ○ No single definition, although some consensus ○ Experienced developers who adventured (and had a lot of failures) with SOA ○ Some say: "How to do SOA right" ○ Desired Characteristics and Patterns to do SOA ● Some references with good resources: ○ Martin Fowler & James Lewis - https://martinfowler.com/articles/microservices.html ○ Chris Richardson - https://microservices.io ○ Sam Newman - https://samnewman.io/books/
  • 9. Microservices Architecture ● Most common scenario: Monolith Database Monitoring Events Presentation Business Logic Data Model Load Balance Service A Database A Discovery Service B Database Migration
  • 10. Microservices Architecture ● Most common scenario: Monolith Presentation Business Logic Data Model Migration Monolith Database Presentation Business Logic Data Model Monolith Presentation Business Logic Data Model Monitoring Events Load Balance Service A Database A Discovery Service B Database Service A Service A
  • 11. Microservices Architecture ● Where is it adopted today? ○ Big tech companies: ■ Netflix - Shared a lot of tools and libraries they use as open source ■ Uber, Amazon, Ebay, Spotify… and others ○ It's becoming an industry standard solution to solve high scalability and faster delivery ■ There is, however, a lot of discussion about this future ● It’s more suitable for BIG companies with BIG problems to solve ○ It doesn’t mean you can’t start with it - Don’t start with a monolith - Stefan Tilkov ○ You definitely can learn from it
  • 12. Microservices Architecture ● Not a silver bullet - It will not solve all of your problems ● No strict set of rules - No single definition, no single way ● Not the end goal - You should not measure success based on how you “do microservices” ● New set of problems: No receipt. Custom solutions you'll have to figure out by yourself. ○ Patterns established to help with decisions and implementation Effort and Time Big organization Multiple teams Small organization Small team(s) Starting from Scratch Migrating from a Monolith
  • 14. Microservices Characteristics - How “micro”? How “micro” is a microservice? ● 100-200 lines of code? ● Small enough to be re-written in 2 weeks? ● Of course: no single rule to fit it all. Tips that indicate if two services should be merged: ● Feature redundancy or similarity between features ● High number of calls between services ● Change in interpretation of Business Capabilities and/or Domains ● Constantly updating different services together
  • 15. Microservices Characteristics ● Componentization via Services ● Organization around Business Capabilities ● Products not Projects ● Smart endpoints and dumb pipes ● Decentralized Governance ● Decentralized Data Management ● Infrastructure Automation ● Design for failure ● Evolutionary Design Microservices - by Martin Fowler
  • 16. Microservices Characteristics - Componentization via Services Pros ● Highly maintainable and testable ● Independently deployable ● Owned by a small team ● Very flexible scalability Cons ● Distributed Systems - harder to program, specially with async communication ● Eventual Consistency - distributed data ● Operational Complexity - large number of services deployed microservices.io
  • 17. Enabling Technologies ● Containers & Containers Orchestrators ○ Help to automate and simplify deployment - core technologies to enable microservices ○ Docker ○ Podman ○ Docker Compose and Swarm ○ Kubernetes
  • 18. Microservices Characteristics - Organization around Business Capabilities Pros ● Well-defined scope - favor independent teams work ● Enables faster collaboration - teams can solve design and integrations faster Cons ● Might be challenging to define - depends on interpretation ● May slow down at first - the capabilities and domains must be discussed and defined before multiple teams starting to work microservices.io
  • 19. Microservices Characteristics - Products not Projects ● Products not Projects ○ Development is not an isolated activity with beginning and end: ■ You build it, you run it ○ The team owns the full life-cycle of the service: design, development, deployment and monitoring in production ○ Teams also collaborate to product decisions Pros ● Constant relationship of developers and owned product - easier to evolve and to provide better user experiments Cons ● Change in culture - takes time, specially because it involves multiple teams, developers and managers.
  • 20. Microservices Characteristics - Smart endpoints and dumb pipes Pros ● Logic and filtering is owned by the service - easier to understand and change in the future Cons ● Messaging might pose a different paradigm to build software - services may follow choreography pattern instead of orchestration pattern MS 1 MS 2 MS 3 MS 1 MS 2 MS 3 BUS MS 1 MS 2 MS 3 MS 1 MS 2 MS 3 MS 1 MS 2 MS 3 MS 1 MS 2 MS 3 REST Messages
  • 21. Enabling Technologies ● Messaging ○ Implement event storage, routing and other support functionalities for event driven communication ■ RabbitMQ ■ Apache Kafka ■ Google Cloud Pub/Sub ■ Amazon SQS
  • 22. Microservices Characteristics - Decentralized Governance “not every problem is a nail and not every solution a hammer.” - Microservices - Martin Fowler Pros ● Flexibility to adopt different languages - the right tool for the job ● More opportunities to adopt new technologies Cons ● Challenges to promote culture of reusage ● Difference between languages might still pose challenges sometimes Java Service Python Service Go Service JS Service
  • 23. Enabling Technologies ● Interface Definition Languages - IDL ○ Specification languages used to describe Application Programming Interface (API) - usually associated to code generation - most common for polyglot environments ■ Google Protocol Buffers ■ Apache Avro ■ Apache Thrift ■ JSON
  • 24. Microservices Characteristics - Decentralized Data Management Pros ● Flexibility to adopt different models, schemas and storage technologies - the right tool for the job at data level Cons ● Distributed Transactions - an operation may involve multiple services ● Eventual Consistency - needs to be supported/fixed with compensating operations ● Conceptual alignment may be very hard Bounded Context - Martin Fowler Microservices - Martin Fowler
  • 25. Microservices Characteristics - Infrastructure Automation Benefits ● Fast, frequent and reliable delivery - automated tests reduce the risks of a broken instance to be used - increases the trust on the deployed software ● Monitoring and tracing automation - faster response to failures Challenges ● Change in culture to adopt tests as first class citizens (Test Driven Design) ● Requires knowledge and effort to set up infrastructure beyond the service domain Wikipedia - DevOps
  • 26. Enabling Technologies ● Continuous Integration & Continuous Delivery ○ Automate integration and deployment. Heavily used in combination with Containers and Containers Orchestrations ■ GitHub Actions ■ GitLab Pipelines ■ Jenkins ■ Ansible ■ Puppet
  • 27. Microservices Characteristics - Design for failure Pros ● Fault tolerance contributes to more responsive application. ● Well-established monitoring helps decrease failures response time Cons ● Sync calls - easy to implement, more chance to fail ● Good level of monitoring and distributed tracing may be challenging to achieve Circuit Breaker - Martin Fowler
  • 28. Enabling Technologies ● Monitoring & Logging Tools ○ Tools to monitor and debug microservices environments (centralized logging) ○ Grafana ○ Prometheus ○ Zipkin ○ Logstash ○ Graylog
  • 29. Enabling Technologies ● Frameworks ○ Language specific frameworks to make it easy to implement microservices ○ Spring Boot & Spring Cloud - Java ■ Netflix OSS ○ Eclipse Vert.X - Multiple Languages ○ Moleculer - NodeJS ○ What about python? Although you can use Django, Flask or Tornado, to build microservices, they present themselves as Web frameworks
  • 30. Microservices Characteristics - Evolutionary Design Pros ● Changes can be more frequent, fast and well-defined. ● Small services can be easily scraped and replaced ● Functionalities can be added as services to existing monoliths Cons ● Eventually contracts between services will break ● Versioning - hard for clients when constantly updated - hard for developer team to support multiple versions ● Monolith to Services - challenging depending on the scenario microservices.io - Strangler Application Pattern Service A Database Today: Service B Database input Service A Database Tomorrow: Service B Database data input Missing required param
  • 31. Microservices Pros ● Flexible Scalability ○ The application doesn’t need to scale homogeneously ○ Scale just what you need ● Improved maintainability ○ Small service is easier to understand and change - makes onboarding easier ● Better testability ○ Faster to test ● Better deployability ○ Services can be deployed independently ○ Reduces breaking changes when best practices of code-review and automated tests are applied.
  • 32. Microservices Pros ● Developers tend to be more productive ○ The IDE is faster, the application starts faster, tests run faster. ○ Less code to keep track and control ● Technology stack is flexible ○ Polyglot Programming: Choose the right tool for the job. ○ Flexible data storage: Choose models and schemas according to context ● Over time, it increases fault tolerance and fault isolation ○ When patterns and best practices are applied and a certain maturity is reached, it’s easier to isolate where/why a fault happened/is happening.
  • 33. Microservices Cons ● More complex ○ New technologies, new concepts, new patterns - new set of problems to solve ○ Inherits complexities of any distributed systems: latency, failure. ● Requires cultural change ○ Teams might need to be restructured ○ Organization management needs to delegate responsibilities to teams - they own the service, they make decisions ● More expensive ○ Remote calls - again ○ More resources - independent services, independent CPU, memory, etc.
  • 34. Microservices Cons ● No strict set of rules ○ Still susceptible to different interpretations - disputes on how to adopt/implement ○ It’s hard to choose when/why to adopt ● It may introduce more problems than it solves ○ Maybe your problem is just communication between stakeholders (management and developers) ○ Maybe your problem could be solved just by infrastructure automation
  • 35. Where to go from here
  • 36. Microservices Architecture Student Yet another thing to learn. It’s fine if you want, but start with getting the high level concepts and focus on the enabling tech. Junior/Mid-level You’ll eventually come across it somewhere, sometime. It’s helpful to improve skills and make choices for your career. Experienced You’ll most likely know what to do by yourself, but remember we never quit learning. ● Should I think / worry / use / learn Microservices Architecture?
  • 37. References ● https://martinfowler.com/articles/microservices.html ● https://microservices.io/ ● https://tsh.io/state-of-microservices/ ● https://www.tiempodev.com/blog/disadvantages-of-a-microservices-architecture/ ● https://dzone.com/articles/30top-tools-for-building-microservices-on-all-leve ● https://medium.com/microservices-architecture/top-10-microservices-framework-for-2020-eefb5e66d 1a2 ● https://searchsoftwarequality.techtarget.com/feature/Compare-a-product-vs-project-mindset-for-softw are-development