SlideShare a Scribd company logo
1
Microservice Architecture (MSA) and
Service-Oriented Architecture (SOA)
Sonic Lee
mcsonic@gmail.com
2
1
2
3
4
Service Oriented Architecture
Description and comparison with monolithic architecture
Microservice Architecture
Simple example and key characteristics
MSA vs SOA
Show difference in overall architecture and comm. protocol
MSA Case Study: Netflix
Adrian Cockcroft’s effort in turning legacy system into MSA and
what we can learn
3
Service Oriented Architecture
Definition (from Wikipedia)
• Architectural pattern in computer software design in which application components
provide services to other components via a communications protocol,
typically over a network.
Characteristics
• Service is the basic building block, and is a self-contained unit of functionality.
▪ Ex: View last month’s credit card history.
• Services use loosely-coupled components that can be reused later.
• Components communicate using standards like JSON, XML, SOAP.
• Independent of any vendor, product or technology.
• Must be incremental, and built on current investments.
• SOA is a means, not an end.
Why?
• Adapt applications to changing technologies.
• Easily integrate applications with other systems. (systems are exposed)
• Quickly create a business process from existing services.
4
Service Oriented Architecture – Four Tenets
1. Boundaries are explicit
• Services interact by sending messages across boundaries.
• No assumptions about how other service is made.
2. Services are autonomous
• Services do not depend on other code.
• Deploy and version services independently from clients.
• Contracts (WSDL: Web Services Description Language)
should not be changed once published.
3. Services share schema and contract, not class
• Services communicate by using schema & contracts (WSDL in XML)
• Internal data format should be hidden from consumers.
• Public schema should be immutable.
4. Service compatibility is based upon policy
• Define what (structural) and how to (semantic) communicate.
• Every service provides a description of capabilities & requirements in machine code.
5
Before / After SOA
App A Service AApp A DB A
App A App B App C Service A
6
Microservice Architecture (MSA)
Definition (from Martin Fowler)
• Approach to developing a single application as a suite of small modular services,
each running in its own process and communicating with lightweight
mechanisms, often an HTTP resource API. (REST with JSON, SOAP with XML)
• Each service is independently deployable by fully automated deployment machinery.
Client-side
[JS / HTML]
Server-side
[HTTP request]
Relational DBMS
monolith
[Monolithic]
Client-side
[JS / HTML]
Customer
User DB
[Microservices Architecture]
Product Order
Product DB Order DB
API (Remote call)
URL 1 URL 2 URL 3
REST
RPC AMQP
7
Microservices: Key Characteristics
• Store data in different DB for efficiency. (Polyglot persistence)
• Must keep DB’s in sync. (DB structures / foreign keys)
• Use Master Data Management tool to fix inconsistencies.
✓ Many RDBMSs do these checks, but require too much coupling.
• Immutable Infrastructure Principle
✓ Apply changes to a new service.
• Do separate build for each microservice.
(OK to have different revision level files)
• Servers must be interchangeable and able to scale.
Treat servers like generic cows, not pets
• Each microservice can use its own language / technology.
8
Microservices: Key Characteristics
Small, cross-functional teams with
flat, self / peer-management structure
Can scale and innovate successfully
“It’s not about technology, it’s about people.”
- Asim Aslam from MicroHQ
• Set up comparable teams
• DevOps: respond faster to customer feedback
Just using REST or Docker does not make it MSA
9
Microservices: Key Characteristics
Product-based not project-based
• Project is a one-time development, making it hard to accumulate expertise.
• De-centralized gov. model needs to guarantee developers’ career in some way.
• Service team: Product planning, Development, QA, Operation.
Team as suggested by Amazon
10
Who uses Microservices?
• Netflix: https://www.nginx.com/blog/microservices-at-netflix-architectural-best-
practices/
http://techblog.netflix.com/2016/12/netflix-conductor-microservices.html
• Amazon: http://www.slideshare.net/apigee/i-love-apis-2015-microservices-at-
amazon-54487258
• Ebay: http://www.slideshare.net/kasun04/microservices-at-ebay
• Uber
• Groupon
• Capital One
11
SOA vs Microservice Architecture (MSA)
What is the difference?
• SOA is a broader concept, and refers to architectural pattern.
• Microservices is a fine-grained, more modular “ideal” type of SOA.
SOA
• More dependent ESBs
• Imperative programming
• Large relational DB
MSA
• API Gateways
• Reactive programming
• NoSQL or micro-SQL DB
…But Both Share
• Loosely coupled elements with
bounded contexts
Payment
Service
Cancel
Service
DB DB
12
SOA vs MSA communication protocol
SOA ESB (Enterprise Service Bus)
• Communication backbone to connect various services together.
• Applications can communicate asynchronously and not have to wait.
• Allows loose coupling between applications.
Disadvantages
• Parsing XML messages causes overhead.
• ESB can become single point of failure for the network.
• Often wrongly used to integrate applications. (EAI)
• Vendor-driven
13
SOA vs MSA communication protocol
MSA API Gateway
• Smart endpoints and dumb pipes. (Most operations occur in endpoints)
• REST protocols and lightweight messaging. (RabbitMQ / ZeroMQ)
• Orchestration: Combine multiple services to create new ones. (Buy + membership)
• Cross cutting function handling: Handle common functions. (Auth, logging)
14
MSA disadvantages
Performance
• API call returns results in JSON or XML. (Marshalling overhead / Network latency)
Memory
• Each service is deployed in its own server instance. (# of Service * memory in each)
Testing
• Each service is separated, so integrated testing becomes more difficult.
Guaranteeing consistency may be hard
• HTTP protocol is sync in nature.
• Client -> Server can be sync, but internal microservice comm. must be async.
1. 202 Accepted (Tell client to wait)
2. 200 OK (Final result returned)
15
MSA Case Study: Netflx
Netflix: Adrian Cockcroft
• Key architect: moved Netflix’s own data centers to Amazon’s cloud.
• Implemented public-cloud architecture & open-sourcing Netflix OSS platform. (MSA)
• Changed Monolithic service to hundreds of meshed-up microservices.
• Built on NGINX:
Open source SW for web service, reverse proxy, cache, load balancing
16
MSA Case Study: Netflx
Typical Reaction to Cockcorft’s Netflix talks
“What Netflix is doing
won’t work” – 2010
“It only works for ‘Unicorns’
like Netflix” – 2011
“We’d like to do that but
can’t” – 2012
Lesson learned from time at Netflix
• Speed wins in the marketplace.
• High trust, low process, teams communicate with each other.
• Freedom & responsibility culture.
• Use simple patterns automated by tooling.
• Don’t do your own “undifferentiated heavy lifting.” (특색없는 노동)
• Self-service cloud makes impossible things instant.
17
MSA Case Study: Netflx
Cockcroft’s Philosophy
Common assumption: Process prevents problems (?)
Organizations build up slow complex “Scar tissue” processes
* Scar tissue: 반흔조직
상해되어 죽은 세포와 그 주변부의 비삼투성 보호물질로 형성된 세포로 구성된 조직.
HR Rules Processes Infra Security
18
MSA Case Study: Process Improvement
Hardware Provisioning
Waterfall Product Dev
IaaS (SW Provisioning)
Agile Product Dev
PaaS
Continuous Delivery
SaaSBetter
19
MSA Case Study: Netflx – Agile style
Agile style development
Email / SMS /
Mobile Push / Phone call
(Bit scary)
20
MSA Case Study: Netflx
Development Cycles
• 4 features / 4 weeks VS 2 features / 2 weeks
Work in Progress = 4
Opportunity for bugs = 100% (baseline)
Time to Debug each = 100% (baseline)
Delivery Complexity = 100% (baseline)
Work in Progress = 2
Opportunity for bugs = 50% (baseline)
Time to Debug each = 50% (baseline)
Delivery Complexity = 100 - 25 = 75%
21
Q&A Session
Questions, comments, feedback, analysis, etc
22
References
1. An Introduction to Service-Oriented Architecture from a Java Developer Perspective
http://archive.oreilly.com/pub/a/onjava/2005/01/26/soa-intro.html
2. Microservices - a definition of this new architectural term
http://martinfowler.com/articles/microservices.html
3. What is Microservices Architecture?
https://smartbear.com/learn/api-design/what-are-microservices/
4. Service-oriented architecture (SOA)
http://www.tridens.si/expertise/soa/
5. Vivat SOA diagram
http://hyperty.com/portfolio/2008/04/04/vivat-soa/
6. Pattern: API Gateway
http://microservices.io/patterns/apigateway.html
7. The introduction to Reactive Programming you've been missing
https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
8. Service Oriented Architecture (SOA)
http://tutorials.jenkov.com/soa/soa.html
23
References
9. Adrian Cockcroft Slideshare
http://www.slideshare.net/adriancockcroft
10. How Nginx Works
https://www.atulhost.com/ngin
11. Cockcroft, the Man Behind Netflix’s Move to AWS, Joins AWS
http://www.datacenterknowledge.com/archives/2016/10/25/cockcroft-the-man-behind-
netflixs-move-to-aws-joins-aws/
12. Adopting Microservices at Netflix: Lessons for Architectural Design
https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/
13. The Real Success Story of Microservices Architectures
http://blog.christianposta.com/microservices/the-real-success-story-of-microservices-
architectures/
14. An Introduction to Service-Oriented Architecture from a Java Developer Perspective
http://archive.oreilly.com/pub/a/onjava/2005/01/26/soa-intro.html
15. Why Companies Adopt Microservices And How They Succeed
https://medium.com/microhq/why-companies-adopt-microservices-and-how-they-succeed-
2ad32f39c65a#.o6dl9bl0q

More Related Content

What's hot

Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
Kasun Indrasiri
 
Eight Miles High: Build Cloud-native and Cloud-aware Systems
Eight Miles High: Build Cloud-native and Cloud-aware SystemsEight Miles High: Build Cloud-native and Cloud-aware Systems
Eight Miles High: Build Cloud-native and Cloud-aware Systems
Chris Haddad
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
Cisco DevNet
 
Develop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverlessDevelop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverless
Lalit Kale
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
Sanjoy Kumar Roy
 
Keynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your businessKeynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your businessWSO2
 
Microservices: an introduction
Microservices: an introductionMicroservices: an introduction
Microservices: an introduction
Daniel Baptista Dias
 
ESB Evaluation Framework
ESB Evaluation FrameworkESB Evaluation Framework
ESB Evaluation FrameworkWSO2
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises
WSO2
 
WSO2Con ASIA 2016: Understanding Microservice Architecture
WSO2Con ASIA 2016: Understanding Microservice ArchitectureWSO2Con ASIA 2016: Understanding Microservice Architecture
WSO2Con ASIA 2016: Understanding Microservice Architecture
WSO2
 
Lightweight ESB Alternatives
Lightweight ESB AlternativesLightweight ESB Alternatives
Lightweight ESB Alternatives
Chris Haddad
 
WSO2Con ASIA 2016: Moulding Your Enterprise with Resource Oriented Architecture
WSO2Con ASIA 2016: Moulding Your Enterprise with Resource Oriented ArchitectureWSO2Con ASIA 2016: Moulding Your Enterprise with Resource Oriented Architecture
WSO2Con ASIA 2016: Moulding Your Enterprise with Resource Oriented Architecture
WSO2
 
Using a private cloud to automate and govern enterprise development
Using a private cloud to automate and govern enterprise developmentUsing a private cloud to automate and govern enterprise development
Using a private cloud to automate and govern enterprise developmentWSO2
 
Merging micrservices architecture with SOA Practices
Merging micrservices architecture with SOA Practices Merging micrservices architecture with SOA Practices
Merging micrservices architecture with SOA Practices
WSO2
 
Full lifecycle of a microservice
Full lifecycle of a microserviceFull lifecycle of a microservice
Full lifecycle of a microservice
Luigi Bennardis
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Yury Kisliak
 
Soa Driven Project Management
Soa Driven Project ManagementSoa Driven Project Management
Soa Driven Project Management
Terry Cho
 
Enterprise Soa Concept
Enterprise Soa ConceptEnterprise Soa Concept
Enterprise Soa Concept
Terry Cho
 
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using Ballerina[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
WSO2
 
Ss Esb
Ss EsbSs Esb
Ss EsbWSO2
 

What's hot (20)

Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
 
Eight Miles High: Build Cloud-native and Cloud-aware Systems
Eight Miles High: Build Cloud-native and Cloud-aware SystemsEight Miles High: Build Cloud-native and Cloud-aware Systems
Eight Miles High: Build Cloud-native and Cloud-aware Systems
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
 
Develop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverlessDevelop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverless
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Keynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your businessKeynote-Service Orientation – Why is it good for your business
Keynote-Service Orientation – Why is it good for your business
 
Microservices: an introduction
Microservices: an introductionMicroservices: an introduction
Microservices: an introduction
 
ESB Evaluation Framework
ESB Evaluation FrameworkESB Evaluation Framework
ESB Evaluation Framework
 
[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises[WSO2Con EU 2017] Microservices for Enterprises
[WSO2Con EU 2017] Microservices for Enterprises
 
WSO2Con ASIA 2016: Understanding Microservice Architecture
WSO2Con ASIA 2016: Understanding Microservice ArchitectureWSO2Con ASIA 2016: Understanding Microservice Architecture
WSO2Con ASIA 2016: Understanding Microservice Architecture
 
Lightweight ESB Alternatives
Lightweight ESB AlternativesLightweight ESB Alternatives
Lightweight ESB Alternatives
 
WSO2Con ASIA 2016: Moulding Your Enterprise with Resource Oriented Architecture
WSO2Con ASIA 2016: Moulding Your Enterprise with Resource Oriented ArchitectureWSO2Con ASIA 2016: Moulding Your Enterprise with Resource Oriented Architecture
WSO2Con ASIA 2016: Moulding Your Enterprise with Resource Oriented Architecture
 
Using a private cloud to automate and govern enterprise development
Using a private cloud to automate and govern enterprise developmentUsing a private cloud to automate and govern enterprise development
Using a private cloud to automate and govern enterprise development
 
Merging micrservices architecture with SOA Practices
Merging micrservices architecture with SOA Practices Merging micrservices architecture with SOA Practices
Merging micrservices architecture with SOA Practices
 
Full lifecycle of a microservice
Full lifecycle of a microserviceFull lifecycle of a microservice
Full lifecycle of a microservice
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Soa Driven Project Management
Soa Driven Project ManagementSoa Driven Project Management
Soa Driven Project Management
 
Enterprise Soa Concept
Enterprise Soa ConceptEnterprise Soa Concept
Enterprise Soa Concept
 
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using Ballerina[WSO2Con EU 2017] Creating Composite Services Using Ballerina
[WSO2Con EU 2017] Creating Composite Services Using Ballerina
 
Ss Esb
Ss EsbSs Esb
Ss Esb
 

Viewers also liked

Software_Architectures_from_SOA_to_MSA
Software_Architectures_from_SOA_to_MSASoftware_Architectures_from_SOA_to_MSA
Software_Architectures_from_SOA_to_MSAPeter Denev
 
CWIN17 Rome / Micro services
CWIN17 Rome / Micro servicesCWIN17 Rome / Micro services
CWIN17 Rome / Micro services
Capgemini
 
Pattern Driven Enterprise Architecture
Pattern Driven Enterprise ArchitecturePattern Driven Enterprise Architecture
Pattern Driven Enterprise Architecture
Asanka Abeysinghe
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Nguyen Tung
 
BizTalk Mapping Patterns and Best Practices at BizTalk User Group Sweden in G...
BizTalk Mapping Patterns and Best Practices at BizTalk User Group Sweden in G...BizTalk Mapping Patterns and Best Practices at BizTalk User Group Sweden in G...
BizTalk Mapping Patterns and Best Practices at BizTalk User Group Sweden in G...
Sandro Pereira
 
Microservices, Monoliths, SOA and How We Got Here
Microservices, Monoliths, SOA and How We Got HereMicroservices, Monoliths, SOA and How We Got Here
Microservices, Monoliths, SOA and How We Got Here
Lightbend
 

Viewers also liked (6)

Software_Architectures_from_SOA_to_MSA
Software_Architectures_from_SOA_to_MSASoftware_Architectures_from_SOA_to_MSA
Software_Architectures_from_SOA_to_MSA
 
CWIN17 Rome / Micro services
CWIN17 Rome / Micro servicesCWIN17 Rome / Micro services
CWIN17 Rome / Micro services
 
Pattern Driven Enterprise Architecture
Pattern Driven Enterprise ArchitecturePattern Driven Enterprise Architecture
Pattern Driven Enterprise Architecture
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
BizTalk Mapping Patterns and Best Practices at BizTalk User Group Sweden in G...
BizTalk Mapping Patterns and Best Practices at BizTalk User Group Sweden in G...BizTalk Mapping Patterns and Best Practices at BizTalk User Group Sweden in G...
BizTalk Mapping Patterns and Best Practices at BizTalk User Group Sweden in G...
 
Microservices, Monoliths, SOA and How We Got Here
Microservices, Monoliths, SOA and How We Got HereMicroservices, Monoliths, SOA and How We Got Here
Microservices, Monoliths, SOA and How We Got Here
 

Similar to 170215 msa intro

Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Anil Allewar
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
NGINX, Inc.
 
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
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration Patterns
Araf Karsh Hamid
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
Markus Eisele
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptx
PINGXIONG3
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Araf Karsh Hamid
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
Randy Shoup
 
Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
Inho Kang
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDeveloping Enterprise Applications for the Cloud,from Monolith to Microservices
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
David Currie
 
DevOps and Microservice
DevOps and MicroserviceDevOps and Microservice
DevOps and Microservice
Inho Kang
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
vipin kumar
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservice
Developing Enterprise Applications for the Cloud, from Monolith to MicroserviceDeveloping Enterprise Applications for the Cloud, from Monolith to Microservice
Developing Enterprise Applications for the Cloud, from Monolith to Microservice
Jack-Junjie Cai
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cache
cornelia davis
 
Disruptive Trends in Application Development
Disruptive Trends in Application DevelopmentDisruptive Trends in Application Development
Disruptive Trends in Application Development
WaveMaker, Inc.
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
Araf Karsh Hamid
 
Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...
Kim Clark
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing Microservices
David Chou
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
Comsysto Reply GmbH
 
Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0
Vinod Wilson
 

Similar to 170215 msa intro (20)

Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
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
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration Patterns
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptx
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
 
Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDeveloping Enterprise Applications for the Cloud,from Monolith to Microservices
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
 
DevOps and Microservice
DevOps and MicroserviceDevOps and Microservice
DevOps and Microservice
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservice
Developing Enterprise Applications for the Cloud, from Monolith to MicroserviceDeveloping Enterprise Applications for the Cloud, from Monolith to Microservice
Developing Enterprise Applications for the Cloud, from Monolith to Microservice
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cache
 
Disruptive Trends in Application Development
Disruptive Trends in Application DevelopmentDisruptive Trends in Application Development
Disruptive Trends in Application Development
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
 
Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing Microservices
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
 
Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0
 

Recently uploaded

RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 

Recently uploaded (20)

RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 

170215 msa intro

  • 1. 1 Microservice Architecture (MSA) and Service-Oriented Architecture (SOA) Sonic Lee mcsonic@gmail.com
  • 2. 2 1 2 3 4 Service Oriented Architecture Description and comparison with monolithic architecture Microservice Architecture Simple example and key characteristics MSA vs SOA Show difference in overall architecture and comm. protocol MSA Case Study: Netflix Adrian Cockcroft’s effort in turning legacy system into MSA and what we can learn
  • 3. 3 Service Oriented Architecture Definition (from Wikipedia) • Architectural pattern in computer software design in which application components provide services to other components via a communications protocol, typically over a network. Characteristics • Service is the basic building block, and is a self-contained unit of functionality. ▪ Ex: View last month’s credit card history. • Services use loosely-coupled components that can be reused later. • Components communicate using standards like JSON, XML, SOAP. • Independent of any vendor, product or technology. • Must be incremental, and built on current investments. • SOA is a means, not an end. Why? • Adapt applications to changing technologies. • Easily integrate applications with other systems. (systems are exposed) • Quickly create a business process from existing services.
  • 4. 4 Service Oriented Architecture – Four Tenets 1. Boundaries are explicit • Services interact by sending messages across boundaries. • No assumptions about how other service is made. 2. Services are autonomous • Services do not depend on other code. • Deploy and version services independently from clients. • Contracts (WSDL: Web Services Description Language) should not be changed once published. 3. Services share schema and contract, not class • Services communicate by using schema & contracts (WSDL in XML) • Internal data format should be hidden from consumers. • Public schema should be immutable. 4. Service compatibility is based upon policy • Define what (structural) and how to (semantic) communicate. • Every service provides a description of capabilities & requirements in machine code.
  • 5. 5 Before / After SOA App A Service AApp A DB A App A App B App C Service A
  • 6. 6 Microservice Architecture (MSA) Definition (from Martin Fowler) • Approach to developing a single application as a suite of small modular services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. (REST with JSON, SOAP with XML) • Each service is independently deployable by fully automated deployment machinery. Client-side [JS / HTML] Server-side [HTTP request] Relational DBMS monolith [Monolithic] Client-side [JS / HTML] Customer User DB [Microservices Architecture] Product Order Product DB Order DB API (Remote call) URL 1 URL 2 URL 3 REST RPC AMQP
  • 7. 7 Microservices: Key Characteristics • Store data in different DB for efficiency. (Polyglot persistence) • Must keep DB’s in sync. (DB structures / foreign keys) • Use Master Data Management tool to fix inconsistencies. ✓ Many RDBMSs do these checks, but require too much coupling. • Immutable Infrastructure Principle ✓ Apply changes to a new service. • Do separate build for each microservice. (OK to have different revision level files) • Servers must be interchangeable and able to scale. Treat servers like generic cows, not pets • Each microservice can use its own language / technology.
  • 8. 8 Microservices: Key Characteristics Small, cross-functional teams with flat, self / peer-management structure Can scale and innovate successfully “It’s not about technology, it’s about people.” - Asim Aslam from MicroHQ • Set up comparable teams • DevOps: respond faster to customer feedback Just using REST or Docker does not make it MSA
  • 9. 9 Microservices: Key Characteristics Product-based not project-based • Project is a one-time development, making it hard to accumulate expertise. • De-centralized gov. model needs to guarantee developers’ career in some way. • Service team: Product planning, Development, QA, Operation. Team as suggested by Amazon
  • 10. 10 Who uses Microservices? • Netflix: https://www.nginx.com/blog/microservices-at-netflix-architectural-best- practices/ http://techblog.netflix.com/2016/12/netflix-conductor-microservices.html • Amazon: http://www.slideshare.net/apigee/i-love-apis-2015-microservices-at- amazon-54487258 • Ebay: http://www.slideshare.net/kasun04/microservices-at-ebay • Uber • Groupon • Capital One
  • 11. 11 SOA vs Microservice Architecture (MSA) What is the difference? • SOA is a broader concept, and refers to architectural pattern. • Microservices is a fine-grained, more modular “ideal” type of SOA. SOA • More dependent ESBs • Imperative programming • Large relational DB MSA • API Gateways • Reactive programming • NoSQL or micro-SQL DB …But Both Share • Loosely coupled elements with bounded contexts Payment Service Cancel Service DB DB
  • 12. 12 SOA vs MSA communication protocol SOA ESB (Enterprise Service Bus) • Communication backbone to connect various services together. • Applications can communicate asynchronously and not have to wait. • Allows loose coupling between applications. Disadvantages • Parsing XML messages causes overhead. • ESB can become single point of failure for the network. • Often wrongly used to integrate applications. (EAI) • Vendor-driven
  • 13. 13 SOA vs MSA communication protocol MSA API Gateway • Smart endpoints and dumb pipes. (Most operations occur in endpoints) • REST protocols and lightweight messaging. (RabbitMQ / ZeroMQ) • Orchestration: Combine multiple services to create new ones. (Buy + membership) • Cross cutting function handling: Handle common functions. (Auth, logging)
  • 14. 14 MSA disadvantages Performance • API call returns results in JSON or XML. (Marshalling overhead / Network latency) Memory • Each service is deployed in its own server instance. (# of Service * memory in each) Testing • Each service is separated, so integrated testing becomes more difficult. Guaranteeing consistency may be hard • HTTP protocol is sync in nature. • Client -> Server can be sync, but internal microservice comm. must be async. 1. 202 Accepted (Tell client to wait) 2. 200 OK (Final result returned)
  • 15. 15 MSA Case Study: Netflx Netflix: Adrian Cockcroft • Key architect: moved Netflix’s own data centers to Amazon’s cloud. • Implemented public-cloud architecture & open-sourcing Netflix OSS platform. (MSA) • Changed Monolithic service to hundreds of meshed-up microservices. • Built on NGINX: Open source SW for web service, reverse proxy, cache, load balancing
  • 16. 16 MSA Case Study: Netflx Typical Reaction to Cockcorft’s Netflix talks “What Netflix is doing won’t work” – 2010 “It only works for ‘Unicorns’ like Netflix” – 2011 “We’d like to do that but can’t” – 2012 Lesson learned from time at Netflix • Speed wins in the marketplace. • High trust, low process, teams communicate with each other. • Freedom & responsibility culture. • Use simple patterns automated by tooling. • Don’t do your own “undifferentiated heavy lifting.” (특색없는 노동) • Self-service cloud makes impossible things instant.
  • 17. 17 MSA Case Study: Netflx Cockcroft’s Philosophy Common assumption: Process prevents problems (?) Organizations build up slow complex “Scar tissue” processes * Scar tissue: 반흔조직 상해되어 죽은 세포와 그 주변부의 비삼투성 보호물질로 형성된 세포로 구성된 조직. HR Rules Processes Infra Security
  • 18. 18 MSA Case Study: Process Improvement Hardware Provisioning Waterfall Product Dev IaaS (SW Provisioning) Agile Product Dev PaaS Continuous Delivery SaaSBetter
  • 19. 19 MSA Case Study: Netflx – Agile style Agile style development Email / SMS / Mobile Push / Phone call (Bit scary)
  • 20. 20 MSA Case Study: Netflx Development Cycles • 4 features / 4 weeks VS 2 features / 2 weeks Work in Progress = 4 Opportunity for bugs = 100% (baseline) Time to Debug each = 100% (baseline) Delivery Complexity = 100% (baseline) Work in Progress = 2 Opportunity for bugs = 50% (baseline) Time to Debug each = 50% (baseline) Delivery Complexity = 100 - 25 = 75%
  • 21. 21 Q&A Session Questions, comments, feedback, analysis, etc
  • 22. 22 References 1. An Introduction to Service-Oriented Architecture from a Java Developer Perspective http://archive.oreilly.com/pub/a/onjava/2005/01/26/soa-intro.html 2. Microservices - a definition of this new architectural term http://martinfowler.com/articles/microservices.html 3. What is Microservices Architecture? https://smartbear.com/learn/api-design/what-are-microservices/ 4. Service-oriented architecture (SOA) http://www.tridens.si/expertise/soa/ 5. Vivat SOA diagram http://hyperty.com/portfolio/2008/04/04/vivat-soa/ 6. Pattern: API Gateway http://microservices.io/patterns/apigateway.html 7. The introduction to Reactive Programming you've been missing https://gist.github.com/staltz/868e7e9bc2a7b8c1f754 8. Service Oriented Architecture (SOA) http://tutorials.jenkov.com/soa/soa.html
  • 23. 23 References 9. Adrian Cockcroft Slideshare http://www.slideshare.net/adriancockcroft 10. How Nginx Works https://www.atulhost.com/ngin 11. Cockcroft, the Man Behind Netflix’s Move to AWS, Joins AWS http://www.datacenterknowledge.com/archives/2016/10/25/cockcroft-the-man-behind- netflixs-move-to-aws-joins-aws/ 12. Adopting Microservices at Netflix: Lessons for Architectural Design https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/ 13. The Real Success Story of Microservices Architectures http://blog.christianposta.com/microservices/the-real-success-story-of-microservices- architectures/ 14. An Introduction to Service-Oriented Architecture from a Java Developer Perspective http://archive.oreilly.com/pub/a/onjava/2005/01/26/soa-intro.html 15. Why Companies Adopt Microservices And How They Succeed https://medium.com/microhq/why-companies-adopt-microservices-and-how-they-succeed- 2ad32f39c65a#.o6dl9bl0q