SlideShare a Scribd company logo
MICROSERVICES
1
RAJESH KUMAR
WHAT IS A SERVICE?
 A service is a discrete unit of functionality that can be accessed
remotely and acted upon independently
 A service has four properties
 It represents a business activity with a specified outcome.
 It is self-contained.
 It is a black box for its consumers.
 It may consist of other underlying services
2
WHAT IS SOA?
 A service-oriented architecture is a style of computer software
where services are provided to the other components by
application components, through a communication protocol over a
network.
 The basic fundamental principles of service oriented architecture is
independent of vendors, products and technologies.
 e.g. SOAP, REST, Messaging, WCF
3
WHAT ARE MICROSERVICES?
 Microservices are an implementation approach for SOA?
 Some may not agree
 An application is developed as a suite of small services.
 Services are independently build and deployed component
 Each service has its own database
 May use synchronous or asynchronous calls
4
CHARACTERISTICS
 Built around business capabilities
 Independently developed from each other
 Independently deployed
 Scaled independently
 A dedicated team works for each service during lifecycle
5
TRADITIONAL TEAMS
6
Actually it is just Rohan

MSA TEAMS (CROSS FUNCTIONAL)
7
ADVANTAGES
8
 Each microservice is relatively small
 Easier for a developer to understand
 Easy to refactor, debug and test
 Speeds up build and deployment
 Each service can be deployed independently of other services
 Easier to deploy new versions of services frequently
 Can be scaled independently
ADVANTAGES
9
 Improved fault tolerance
 The other services will continue to handle requests.
 One component of a monolithic architecture can bring down entire system.
 Eliminates any long-term commitment to a technology stack
 Every service can have its own tech stack suited for its functionality
 Learning curve
DRAWBACKS
10
 Adds complexity to the system
 Implement the inter-service communication mechanism
 Distributed transactions
 Lots of network calls?
 A usual method call becomes an across the network service call
 Testing is more difficult
DRAWBACKS
11
 Increased resource uses
 Separate environments, CI/CD mechanisms
 Increased memory consumption e.g. separate JVM for each service
 Use cases that spawn across multiple services require very careful
co-ordination between teams
 Biggest hurdle is to to find how to partition the system into
microservices
CHALLENGES
12
 Database partitioning
 Application partitioning
 Inter-service communication
DATABASE PARTITIONING
13
 Generally the most difficult part
 Joins, sorting and referential integrity
 Handle in the application code
 Create steps in transactions that can be played out
 Event driven
 Eventual consistency
EVENTUAL CONSISTENCY
14
 How to design eventually consistent business logic
 Atomically update DB and publish event
 Distributed transactions?
 Slow, Deadlock prone
 Database triggers?
 DB specific, error prone
EVENTUAL CONSISTENCY CONTD
15
 eBay solution
 Update DB, create event
 Consume event
 Mark event as consumed
 Error prone, does not work in race conditions
 What is the solution?
EVENTUAL CONSISTENCY CONTD
16
 Present is a fold over history
 Do not update database
 Just publish events
 Events update DB
 Maintain ordering of events
 Replay events to arrive at a state
 Complicates the design, duplicate events will be tricky
DATABASE PARTITIONING CONTD
17
 Create master-slave strategy
 Synching databases
 Polyglot persistence
 Most NoSql databases have no acid properties, joins or transactions
APPLICATION PARTITIONING
18
 Partition along use cases
 Several new services to handle calls from other services
 Application logging is tricky
 Central or local, inter service calls log tailing is difficult
 Deployment strategy
APPLICATION PARTITIONING
19
 Code dependencies needs to be managed
 Better not to have dependent modules
 Handle global configuration data
 Zookeeper?
INTER-SERVICE COMMUNICATION
20
 Technology
 REST
 Messaging
 Performance
 Unreliable communication
 Failover, slow response, circuit breakers etc
PITFALLS
21
 Testing each service is easy
 Testing the whole system is not, who owns integration?
 Technology Pluralism
 Should not lead to technology explosion, no one can understand the whole
system
 Independent deployment hastens release cycle
 Watch out for dependencies between services
 Release, monitoring and versioning must be standardized
PITFALLS CONTD
22
 Refactoring a service is easy
 Its another beast to refactor across services
 Development is MSA oriented
 But CI/CD pipeline is not
 Teams are still built around technology and not services
KNOWN USERS
23
 Amazon
 Netflix
 eBay
QUESTIONS?
24
FOOD FOR THOUGHT
ARE MICROSERVICES FOR EVERYONE?

More Related Content

PPTX
Chap4 RE validation
PPTX
Ch4-Software Engineering 9
PPTX
Chap3 RE elicitation
PPTX
Chap1 RE Introduction
PPTX
Ch2 - SW Processes
PPTX
Ch19 systems engineering
PPTX
Ch18 service oriented software engineering
PPTX
Software Engineering - Chapter 4 - Requirements engineering
Chap4 RE validation
Ch4-Software Engineering 9
Chap3 RE elicitation
Chap1 RE Introduction
Ch2 - SW Processes
Ch19 systems engineering
Ch18 service oriented software engineering
Software Engineering - Chapter 4 - Requirements engineering

What's hot (19)

PPTX
PPTX
Ch19-Software Engineering 9
PPTX
Ch20-Software Engineering 9
PPTX
Ch 4 software engineering
PPTX
Requirements validation - requirements engineering
PPTX
Ch25 configuration management
PPTX
Requirements engineering
PPTX
Ch16 component based software engineering
PPTX
PPTX
Ch11 reliability engineering
PPTX
Ch9-Software Engineering 9
PPTX
Ch17-Software Engineering 9
PPTX
Ch2-Software Engineering 9
PPTX
Ch25-Software Engineering 9
PPTX
PPT
Software Requirements in Software Engineering SE5
PPTX
PPTX
Chap5 RE management
Ch19-Software Engineering 9
Ch20-Software Engineering 9
Ch 4 software engineering
Requirements validation - requirements engineering
Ch25 configuration management
Requirements engineering
Ch16 component based software engineering
Ch11 reliability engineering
Ch9-Software Engineering 9
Ch17-Software Engineering 9
Ch2-Software Engineering 9
Ch25-Software Engineering 9
Software Requirements in Software Engineering SE5
Chap5 RE management
Ad

Viewers also liked (19)

PPSX
Club 7 de agosto
ODT
Math homework help
PDF
20-31-proverbios
PDF
LoF (엘오에프) 3mint piching deck
PDF
Tech020 Presentation
ODT
Human resource management homework help
PDF
Atención a la mujer víctima de violencia sexual. Dra. Judith Toro
PDF
Classement des Entreprises de Taille Intermédiaire surperformantes 2016
DOC
Bhaskar_Profile_Latest
PDF
MicroServices: Advantages ans Disadvantages
PDF
Microservice Architecture
PPTX
Microservices: The Right Way
PPTX
Micro Service Architecture
PPTX
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
PDF
Microservices Architecture For Conversational Intelligence Platform
PDF
Microsoft Office Word Basics Training
PDF
Case Study: How to move from a Monolith to Cloud, Containers and Microservices
PDF
Principles of microservices velocity
PDF
The promises and perils of microservices
Club 7 de agosto
Math homework help
20-31-proverbios
LoF (엘오에프) 3mint piching deck
Tech020 Presentation
Human resource management homework help
Atención a la mujer víctima de violencia sexual. Dra. Judith Toro
Classement des Entreprises de Taille Intermédiaire surperformantes 2016
Bhaskar_Profile_Latest
MicroServices: Advantages ans Disadvantages
Microservice Architecture
Microservices: The Right Way
Micro Service Architecture
Pros and Cons of a MicroServices Architecture talk at AWS ReInvent
Microservices Architecture For Conversational Intelligence Platform
Microsoft Office Word Basics Training
Case Study: How to move from a Monolith to Cloud, Containers and Microservices
Principles of microservices velocity
The promises and perils of microservices
Ad

Similar to Microservices (20)

PPTX
Microservice intro
PDF
Microservices Architecture
PDF
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
PDF
Microservices for Java Architects (Chicago, April 21, 2015)
PDF
Microservices for Architects - Atlanta 2018-03-28
PDF
Microservices for java architects schamburg-2015-05-19
PPTX
Microservices vs monolithics betabeers
PPTX
From Monolithic applications to Microservices
PDF
Building microservices on azure
PDF
Microservices for Java Architects (Indianapolis, April 15, 2015)
PPTX
Pragmatic Microservices
PDF
Microservices: Where do they fit within a rapidly evolving integration archit...
PPTX
Micro-services architecture
ODP
Monolithic to Microservices Architecture - STM 6
PDF
Microservices for java architects coders-conf-2015-05-15
PDF
Microservicessai 141024145932-conversion-gate01 (1)
PPTX
Microservices with mule
PDF
170215 msa intro
ODP
micro services architecture (FrosCon2014)
PPTX
Microservices
Microservice intro
Microservices Architecture
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
Microservices for Java Architects (Chicago, April 21, 2015)
Microservices for Architects - Atlanta 2018-03-28
Microservices for java architects schamburg-2015-05-19
Microservices vs monolithics betabeers
From Monolithic applications to Microservices
Building microservices on azure
Microservices for Java Architects (Indianapolis, April 15, 2015)
Pragmatic Microservices
Microservices: Where do they fit within a rapidly evolving integration archit...
Micro-services architecture
Monolithic to Microservices Architecture - STM 6
Microservices for java architects coders-conf-2015-05-15
Microservicessai 141024145932-conversion-gate01 (1)
Microservices with mule
170215 msa intro
micro services architecture (FrosCon2014)
Microservices

More from Rajesh Kumar (8)

PPTX
PPTX
Flyway
PPTX
Design Principles
PPTX
Clean Code
PPTX
Software Craftsmanship
PPTX
TDD With Legacy Systems
PPTX
Unit Testing FAQ
PPTX
Test Driven Development
Flyway
Design Principles
Clean Code
Software Craftsmanship
TDD With Legacy Systems
Unit Testing FAQ
Test Driven Development

Recently uploaded (20)

PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
PDF
KodekX | Application Modernization Development
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Modernizing your data center with Dell and AMD
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
MYSQL Presentation for SQL database connectivity
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation_ Review paper, used for researhc scholars
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Advanced methodologies resolving dimensionality complications for autism neur...
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.
KodekX | Application Modernization Development
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Artificial Intelligence
Modernizing your data center with Dell and AMD
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication

Microservices

  • 2. WHAT IS A SERVICE?  A service is a discrete unit of functionality that can be accessed remotely and acted upon independently  A service has four properties  It represents a business activity with a specified outcome.  It is self-contained.  It is a black box for its consumers.  It may consist of other underlying services 2
  • 3. WHAT IS SOA?  A service-oriented architecture is a style of computer software where services are provided to the other components by application components, through a communication protocol over a network.  The basic fundamental principles of service oriented architecture is independent of vendors, products and technologies.  e.g. SOAP, REST, Messaging, WCF 3
  • 4. WHAT ARE MICROSERVICES?  Microservices are an implementation approach for SOA?  Some may not agree  An application is developed as a suite of small services.  Services are independently build and deployed component  Each service has its own database  May use synchronous or asynchronous calls 4
  • 5. CHARACTERISTICS  Built around business capabilities  Independently developed from each other  Independently deployed  Scaled independently  A dedicated team works for each service during lifecycle 5
  • 7. MSA TEAMS (CROSS FUNCTIONAL) 7
  • 8. ADVANTAGES 8  Each microservice is relatively small  Easier for a developer to understand  Easy to refactor, debug and test  Speeds up build and deployment  Each service can be deployed independently of other services  Easier to deploy new versions of services frequently  Can be scaled independently
  • 9. ADVANTAGES 9  Improved fault tolerance  The other services will continue to handle requests.  One component of a monolithic architecture can bring down entire system.  Eliminates any long-term commitment to a technology stack  Every service can have its own tech stack suited for its functionality  Learning curve
  • 10. DRAWBACKS 10  Adds complexity to the system  Implement the inter-service communication mechanism  Distributed transactions  Lots of network calls?  A usual method call becomes an across the network service call  Testing is more difficult
  • 11. DRAWBACKS 11  Increased resource uses  Separate environments, CI/CD mechanisms  Increased memory consumption e.g. separate JVM for each service  Use cases that spawn across multiple services require very careful co-ordination between teams  Biggest hurdle is to to find how to partition the system into microservices
  • 12. CHALLENGES 12  Database partitioning  Application partitioning  Inter-service communication
  • 13. DATABASE PARTITIONING 13  Generally the most difficult part  Joins, sorting and referential integrity  Handle in the application code  Create steps in transactions that can be played out  Event driven  Eventual consistency
  • 14. EVENTUAL CONSISTENCY 14  How to design eventually consistent business logic  Atomically update DB and publish event  Distributed transactions?  Slow, Deadlock prone  Database triggers?  DB specific, error prone
  • 15. EVENTUAL CONSISTENCY CONTD 15  eBay solution  Update DB, create event  Consume event  Mark event as consumed  Error prone, does not work in race conditions  What is the solution?
  • 16. EVENTUAL CONSISTENCY CONTD 16  Present is a fold over history  Do not update database  Just publish events  Events update DB  Maintain ordering of events  Replay events to arrive at a state  Complicates the design, duplicate events will be tricky
  • 17. DATABASE PARTITIONING CONTD 17  Create master-slave strategy  Synching databases  Polyglot persistence  Most NoSql databases have no acid properties, joins or transactions
  • 18. APPLICATION PARTITIONING 18  Partition along use cases  Several new services to handle calls from other services  Application logging is tricky  Central or local, inter service calls log tailing is difficult  Deployment strategy
  • 19. APPLICATION PARTITIONING 19  Code dependencies needs to be managed  Better not to have dependent modules  Handle global configuration data  Zookeeper?
  • 20. INTER-SERVICE COMMUNICATION 20  Technology  REST  Messaging  Performance  Unreliable communication  Failover, slow response, circuit breakers etc
  • 21. PITFALLS 21  Testing each service is easy  Testing the whole system is not, who owns integration?  Technology Pluralism  Should not lead to technology explosion, no one can understand the whole system  Independent deployment hastens release cycle  Watch out for dependencies between services  Release, monitoring and versioning must be standardized
  • 22. PITFALLS CONTD 22  Refactoring a service is easy  Its another beast to refactor across services  Development is MSA oriented  But CI/CD pipeline is not  Teams are still built around technology and not services
  • 23. KNOWN USERS 23  Amazon  Netflix  eBay
  • 25. FOOD FOR THOUGHT ARE MICROSERVICES FOR EVERYONE?