SlideShare una empresa de Scribd logo
1 de 42
1
Copyright 2017 Cameron
U S I N G A S E R V I C E B U S F O R
M I C R O S E R V I C E C O M M U N I C A T I O N
2
Copyright 2017 Cameron
P R E S E N TAT I O N
You’ll leave with an understanding of how to effectively use a
Service Bus for Microservice communication to avoid tight coupling
between services.
Goal
3
Copyright 2017 Cameron
Cameron Vetter
Software Development is my passion. I have over 15 years of
experience using Microsoft tools to develop software. Currently I
am a Senior Software Architect at SafeNet Consulting,
where I get to do what I love... Architect, Design, and Develop
great software! I currently focus on Microservices, SOA, Azure,
IOT, and HoloLens.
@Poshporcupine
linkedin.com/in/cameronvetter
www.cameronvetter.com
4
Copyright 2017 Cameron
D E F I N E
M I C R O S E R V I C E S
S E R V I C E B U S
D E S I G N PAT T E R N S
M E S S A G E
T R A N S P O R T S
E V E N T U A L
C O N S I S T E N C Y
D E C O U P L I N G
T H R O U G H C O N T R A C T S
T H E
D E M O
ROADMAP
5
Copyright 2017 Cameron
Tooling
This talk is not tooling
specific, these architectural
patterns fit in most modern
developments stacks.
6
Copyright 2017 Cameron
W H AT D O I
M E A N B Y
M I C R O S E R V I C E S ?
7
Copyright 2017 Cameron
TRAITS OF
SERVICES
SERVICE
CONFUSION• Each is a software component
• Each service runs in its own process
• They use interprocess communication
• No coupling to other services except by
service contracts
• Windows Services
• Web Services (REST, SOAP, etc)
• Cloud Services
8
Copyright 2017 Cameron
M A R T I N F O W L E R
“Any fool can write code
that a computer can
understand. Good
programmers write code
that humans can
understand."
9
Copyright 2017 Cameron
MICROSERVICE ARCHITECTURE
CHARACTERISTICS
S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l
C o m p o n e n t i z a t i o n
v i a S e r v i c e s
• Independently Replaceable
• Independently Upgradeable
• Independent Dependencies
O r g a n i z e d A r o u n d
B u s i n e s s C a p a b i l i t i e s
• Not Organized Around
Technology
• Each Service (Team)
Focuses on One Business
Capability
10
Copyright 2017 Cameron
MICROSERVICE ARCHITECTUR
CHARACTERISTICS
S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l
P r o d u c t s
N o t P r o j e c t s
• No Longer Build A Project,
Disband, and Move On
• Team Owns the Service(s)
They Build
• Continue to Add Services
or Functionality to
Services
S m a r t E n d p o i n t s
a n d D u m b P i p e s
• Exact Opposite of an
ESB
• Smarts of A System
Moves Out of the Bus
and Into the Endpoints
11
Copyright 2017 Cameron
MICROSERVICE ARCHITECTURE
CHARACTERISTICS
S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l
D e c e n t r a l i z e d
G o v e r n a n c e
• No Longer Force
Everyone to Same
Technology Stack
D e c e n t r a l i z e d
D a t a M a n a g e m e n t
• Not Stuffing all Data in One
Huge Relational Database
• Services NEVER Connect to
Another Service’s Data
Store
• Prevents Integration
Through the Database
12
Copyright 2017 Cameron
MICROSERVICE ARCHITECTUR
CHARACTERISTICS
S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l
I n f r a s t r u c t u r e
A u t o m a t i o n
• Mandatory to Succeed
With MicroServices
• Continuous Delivery
• Ability to Deliver Fast
• Continuous Monitoring
D e s i g n
f o r f a i l u r e
• They Will Fail!
13
Copyright 2017 Cameron
MICROSERVICE ARCHITECTURE
CHARACTERISTICS
S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l
E v o l u t i o n a r y
d e s i g n
• Overall System Rapidly
Changes
• Allows More Granular Release
Planning
• Create Fault Tolerant
Contracts and Avoid
Versioning
14
Copyright 2017 Cameron
M E S S A G E
T R A N S P O R T S
15
Copyright 2017 Cameron
SERVICE BUS TRANSPORT
PROVIDES PLUMBING
Responsible for getting a message from point A to point B
and dealing with the underlying network.
PROVIDES RELIABILITY
Queueing mechanism to make sure messages are not
lost, handles retries, and handles failures.
PROVIDES SCALABILITY
Responsible for providing the scalability for the service
bus.
16
Copyright 2017 Cameron
Rabbit MQ
WORLD CLASS MESSAGE QUEUING
Built on erlang to provide unmatched performance,
feature set and community support.
ON PREMISE SOLUTION
In my opinion nothing comes close for power,
performance, or reliability.
MONITORING
The best built in monitoring solution available for a
transport.
17
Copyright 2017 Cameron
AZURE SERVICE BUS
NOT QUITE A SERVICE BUS
Don’t let the title fool you, Azure Service Bus is no more a
complete service bus than Rabbit MQ.
CLOUD SOLUTION
PAAS solution that scales, and is maintained for you,
creating a great cloud solution.
WELL INTEGRATED
Azure Service Bus is well integrated into the Microsoft
stack, and cross platform compatible.
18
Copyright 2017 Cameron
REST
COUPLING
REST interface used to talk to other services, every
service must be rebuilt when the interface changes.
COUPLING
Every service must know about and understand what
every other service is for and when to use it.
TURNS YOUR ARCHITECTURE TO
SPAGHETTI
Every architectural pattern degenerates into spaghetti
with the right antipattern.
19
Copyright 2017 Cameron
ENTERPRISE SERVICE BUS
PUSHES LOGIC TO THE CENTER
Goal is to create smart endpoints and dumb pipes, an
ESB turns that upside down.
KITCHEN SINK
It slices, it dices… Security, Mediation, Protocols,
Transformations, Business Logic…
DON’T MAKE THE MONOLITH
The coupling created by an ESB will turn your
microservice architecture back into a monolith.
20
Copyright 2017 Cameron
E V E N T U A L
C O N S I S T E N C Y
21
Copyright 2017 Cameron
BASE
BASE data stores value availability and scale over consistency of replicated data.
B A S I C A L LY
AVA I L A B L E
Guaranteed availability of
data
.
S O F T
S TAT E
The system could change
over time, even without
user interaction due to
eventual consistency
E V E N T U A L
C O N S I S T E N C Y
The system is guaranteed
to eventually become
consistent, but not
guaranteed when it will
become consistent
22
Copyright 2017 Cameron
ACID
ACID data stores value consistency over availability and scale
AT O M I C
All operations must
succeed or the entire
operation is rolled back.
C O N S I S T E N T
After each transaction the
database, its rules, and
relationships are intact.
I S O L AT E D
Each transaction runs
independently so there is
not transaction contention.
D U R A B L E
Once a transaction is
completed it is permanent
regardless of other
failures.
23
Copyright 2017 Cameron
E X A M P L E
EVENTUAL CONSISTENCY
What does it mean to be eventually consistent?
Service A – 1
Florence
Service A – 2
Florence
Client Client
Florence
FloFlo
Florence
Flo
Flo
24
Copyright 2017 Cameron
• More complex to develop for
• Must have a strategy for stale data
• Must have a strategy for inconsistent data
• Allows for cost effective horizontal scaling
• Allows for live updates of a service without
taking the system down
• Able to deal with large quantities of data and
huge scale
PROS CONS
USE BASE INSTEAD OF ACID
A Microservice Architecture MUST plan for BASE as a consistency model between
services. ACID consistency quickly cripples a microservice architecture.
25
Copyright 2017 Cameron
D e c o u p l i n g
T h r o u g h
C o n t r a c t s
26
Copyright 2017 Cameron
S u b s c r i b e t o t h e
i n t e r f a c e n o t t h e c l a s s
N e v e r e x c h a n g e
c l a s s e s d i r e c t l y
P u b l i s h t h e i n t e r f a c e
n o t t h e c l a s s
E a c h s e r v i c e i m p l e m e n t s
t h e i n t e r f a c e a s a c l a s s
P r e v e n t s s e r v i c e
v e r s i o n i n g h e l l
SERVICE COMMUNICATION CONTRACTS
Effective Use of Contracts Allows you to Remain Loosely Coupled
A l w a y s u s e c o n t r a c t s
e s t a b l i s h e d t h r o u g h
i n t e r f a c e s
27
Copyright 2017 Cameron
C O D E
Interface Versioning Example
How Do I Future Proof My Contracts?
public interface IWhoCanYouPassTo
{
Guid RequestorId { get; }
Guid LeftId { get; }
Guid RightId { get; }
}
public class WhoCanYouPassTo : IWhoCanYouPassTo {…}
28
Copyright 2017 Cameron
C O D E
Next Version
How Do I Future Proof My Contracts?
public interface IWhoCanYouPassTo
{
Guid RequestorId { get; }
Guid LeftId { get; }
Guid RightId { get; }
}
public interface IWhoCanYouPassToV2
{
Guid RequestorId { get; }
Guid LeftId { get; }
String LeftName { get; }
Guid RightId { get; }
String RightName { get; }
}
public class WhoCanYouPassTo : IWhoCanYouPassTo, IWhoCanYouPassToV2 {…}
29
Copyright 2017 Cameron
HOW ARE WE LOOSLY COUPLED?
• Any subscriber or publisher can independently change with no contract
changes required
• If a service changes a contract, new contracts are published, old
contracts remain valid
30
Copyright 2017 Cameron
S E R V I C E
B U S
D E S I G N
PAT T E R N S
31
Copyright 2017 Cameron
Publish / Subscr ibe
Each published message is
received by all current
subscribers of that message
type.
Publisher Bus
Subscribe
r
Subscribe
r
Subscribe
r
32
Copyright 2017 Cameron
Competing Consumer
Only one subscriber
receives each message,
they take turns, typically in a
round robin fashion.
Publisher Bus
Subscribe
r
Subscribe
r
Subscribe
r
33
Copyright 2017 Cameron
Dead Letter Channel
The bus is unable to deliver
a message to a subscriber
and is placed in a dead
letter queue.
Publisher Bus
Subscribe
r
Dead
Letter
34
Copyright 2017 Cameron
Dog Piles
If a service is overloaded or
malfunctioning, the retries
compound the problem
causing an outage which
causes a cascade of
failures across many or all
services.
35
Copyright 2017 Cameron
Shar ed Database
Multiple services sharing
the same database creates
tight coupling between
them. When one service
changes the database all
services must be updated
for the new schema.
36
Copyright 2017 Cameron
Flying Blind
With a microservice
architecture the need for
metrics and a view into the
system is even greater than
in other architectures,
without that view you are
flying blind and your results
will be predicatable.
37
Copyright 2017 Cameron
T h e
E x a m p l e
38
Copyright 2017 Cameron
Pass the Potato
Inspired by the Children’s Game Hot Potato, but only
where it was convenient for my demo.
M U LT I P L AY E R
Each player added to a
virtual circle
C R O S S P L AT F O R M
Works on any modern
web browser
D A S H B O A R D
View the big picture of the
game
S TAT S
Collect statistics for what I
can only assume will
make for compelling
reports
39
Copyright 2017 Cameron
Ar chitectur e
Pass The Potato consists of
two Apps, three
Microservices and a Service
Bus
Mass Transit / Azure Service Bus
Distributor ServiceStats Service
Dash
Board
WPF App
Web Page
App
Sessions Service
Service Contracts
40
Copyright 2017 Cameron
P a s s
T h e
P o t a t o
41
Copyright 2017 Cameron
D E F I N E
M I C R O S E R V I C E S
S E R V I C E B U S
D E S I G N PAT T E R N S
M E S S A G E
T R A N S P O R T S
E V E N T U A L
C O N S I S T E N C Y
D E C O U P L I N G
T H R O U G H C O N T R A C T S
T H E
D E M O
IN SUMMARY
42
Copyright 2017 Cameron
Any Questions
w w w. c a m e r o n v e t t e r. c o m
All Software Development
Related, Tutorials, Talks,
and More
l i n k e d i n . c o m / i n / c a m e r o n v e t t e r
Contact Me Directly
@ p o s h p o r c u p i n e
Mostly Development and
Gaming Related, but
whatever I find interesting

Más contenido relacionado

Similar a Using a Service Bus for Microservice Communication

Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Chris Richardson
 
Oracle Code Sydney - There is no such thing as a microservice!
Oracle Code Sydney - There is no such thing as a microservice! Oracle Code Sydney - There is no such thing as a microservice!
Oracle Code Sydney - There is no such thing as a microservice! Chris Richardson
 
SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability Chris Richardson
 
Decomposing applications for deployability and scalability(SpringSource webinar)
Decomposing applications for deployability and scalability(SpringSource webinar)Decomposing applications for deployability and scalability(SpringSource webinar)
Decomposing applications for deployability and scalability(SpringSource webinar)Chris Richardson
 
The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?Chris Richardson
 
Cloud Infrastructure: Changing Today's World
Cloud Infrastructure: Changing Today's WorldCloud Infrastructure: Changing Today's World
Cloud Infrastructure: Changing Today's WorldKirti Khanna
 
Observability in DevOps with Modern Distributed Applications
Observability in DevOps with Modern Distributed ApplicationsObservability in DevOps with Modern Distributed Applications
Observability in DevOps with Modern Distributed ApplicationsDave Mangot
 
Cisco connect winnipeg 2018 unlocking business value with network programma...
Cisco connect winnipeg 2018   unlocking business value with network programma...Cisco connect winnipeg 2018   unlocking business value with network programma...
Cisco connect winnipeg 2018 unlocking business value with network programma...Cisco Canada
 
Thing-centered design and the design of services
Thing-centered design and the design of servicesThing-centered design and the design of services
Thing-centered design and the design of servicesMajid Iqbal
 
ARC306_High Resiliency & Availability Of Online Entertainment Communities Usi...
ARC306_High Resiliency & Availability Of Online Entertainment Communities Usi...ARC306_High Resiliency & Availability Of Online Entertainment Communities Usi...
ARC306_High Resiliency & Availability Of Online Entertainment Communities Usi...Amazon Web Services
 
Case Study: Continuous Delivery in a Tech Debt Laden World by Talk Talk.
Case Study: Continuous Delivery in a Tech Debt Laden World by Talk Talk.Case Study: Continuous Delivery in a Tech Debt Laden World by Talk Talk.
Case Study: Continuous Delivery in a Tech Debt Laden World by Talk Talk.CA Technologies
 
Compute at the Edge with AWS Greengrass - IOT309 - re:Invent 2017
Compute at the Edge with AWS Greengrass - IOT309 - re:Invent 2017Compute at the Edge with AWS Greengrass - IOT309 - re:Invent 2017
Compute at the Edge with AWS Greengrass - IOT309 - re:Invent 2017Amazon Web Services
 
A Pattern Language for Microservices
A Pattern Language for MicroservicesA Pattern Language for Microservices
A Pattern Language for MicroservicesChris Richardson
 
NEW LAUNCH! Amazon Neptune Overview and Customer Use Cases - DAT319 - re:Inve...
NEW LAUNCH! Amazon Neptune Overview and Customer Use Cases - DAT319 - re:Inve...NEW LAUNCH! Amazon Neptune Overview and Customer Use Cases - DAT319 - re:Inve...
NEW LAUNCH! Amazon Neptune Overview and Customer Use Cases - DAT319 - re:Inve...Amazon Web Services
 
Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0Cloud Standards Customer Council
 
Hybrid SharePoint: Ask the Experts
Hybrid SharePoint: Ask the ExpertsHybrid SharePoint: Ask the Experts
Hybrid SharePoint: Ask the ExpertsDux Raymond Sy
 
Getting Started with ThousandEyes Proof of Concepts
Getting Started with ThousandEyes Proof of ConceptsGetting Started with ThousandEyes Proof of Concepts
Getting Started with ThousandEyes Proof of ConceptsThousandEyes
 
Cloud Foundry - #IBMOTS 2016
Cloud Foundry - #IBMOTS 2016Cloud Foundry - #IBMOTS 2016
Cloud Foundry - #IBMOTS 2016Sam Ramji
 
Cox Automotive’s Data Center Migration to the AWS Cloud - ENT330 - re:Invent ...
Cox Automotive’s Data Center Migration to the AWS Cloud - ENT330 - re:Invent ...Cox Automotive’s Data Center Migration to the AWS Cloud - ENT330 - re:Invent ...
Cox Automotive’s Data Center Migration to the AWS Cloud - ENT330 - re:Invent ...Amazon Web Services
 

Similar a Using a Service Bus for Microservice Communication (20)

Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
 
Oracle Code Sydney - There is no such thing as a microservice!
Oracle Code Sydney - There is no such thing as a microservice! Oracle Code Sydney - There is no such thing as a microservice!
Oracle Code Sydney - There is no such thing as a microservice!
 
SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability
 
Decomposing applications for deployability and scalability(SpringSource webinar)
Decomposing applications for deployability and scalability(SpringSource webinar)Decomposing applications for deployability and scalability(SpringSource webinar)
Decomposing applications for deployability and scalability(SpringSource webinar)
 
The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?
 
Cloud Infrastructure: Changing Today's World
Cloud Infrastructure: Changing Today's WorldCloud Infrastructure: Changing Today's World
Cloud Infrastructure: Changing Today's World
 
Observability in DevOps with Modern Distributed Applications
Observability in DevOps with Modern Distributed ApplicationsObservability in DevOps with Modern Distributed Applications
Observability in DevOps with Modern Distributed Applications
 
Cisco connect winnipeg 2018 unlocking business value with network programma...
Cisco connect winnipeg 2018   unlocking business value with network programma...Cisco connect winnipeg 2018   unlocking business value with network programma...
Cisco connect winnipeg 2018 unlocking business value with network programma...
 
Thing-centered design and the design of services
Thing-centered design and the design of servicesThing-centered design and the design of services
Thing-centered design and the design of services
 
ARC306_High Resiliency & Availability Of Online Entertainment Communities Usi...
ARC306_High Resiliency & Availability Of Online Entertainment Communities Usi...ARC306_High Resiliency & Availability Of Online Entertainment Communities Usi...
ARC306_High Resiliency & Availability Of Online Entertainment Communities Usi...
 
Case Study: Continuous Delivery in a Tech Debt Laden World by Talk Talk.
Case Study: Continuous Delivery in a Tech Debt Laden World by Talk Talk.Case Study: Continuous Delivery in a Tech Debt Laden World by Talk Talk.
Case Study: Continuous Delivery in a Tech Debt Laden World by Talk Talk.
 
Compute at the Edge with AWS Greengrass - IOT309 - re:Invent 2017
Compute at the Edge with AWS Greengrass - IOT309 - re:Invent 2017Compute at the Edge with AWS Greengrass - IOT309 - re:Invent 2017
Compute at the Edge with AWS Greengrass - IOT309 - re:Invent 2017
 
A Pattern Language for Microservices
A Pattern Language for MicroservicesA Pattern Language for Microservices
A Pattern Language for Microservices
 
NEW LAUNCH! Amazon Neptune Overview and Customer Use Cases - DAT319 - re:Inve...
NEW LAUNCH! Amazon Neptune Overview and Customer Use Cases - DAT319 - re:Inve...NEW LAUNCH! Amazon Neptune Overview and Customer Use Cases - DAT319 - re:Inve...
NEW LAUNCH! Amazon Neptune Overview and Customer Use Cases - DAT319 - re:Inve...
 
Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0Cloud Customer Architecture for Big Data and Analytics V2.0
Cloud Customer Architecture for Big Data and Analytics V2.0
 
Hybrid SharePoint: Ask the Experts
Hybrid SharePoint: Ask the ExpertsHybrid SharePoint: Ask the Experts
Hybrid SharePoint: Ask the Experts
 
ENT315_Landing Zones
ENT315_Landing ZonesENT315_Landing Zones
ENT315_Landing Zones
 
Getting Started with ThousandEyes Proof of Concepts
Getting Started with ThousandEyes Proof of ConceptsGetting Started with ThousandEyes Proof of Concepts
Getting Started with ThousandEyes Proof of Concepts
 
Cloud Foundry - #IBMOTS 2016
Cloud Foundry - #IBMOTS 2016Cloud Foundry - #IBMOTS 2016
Cloud Foundry - #IBMOTS 2016
 
Cox Automotive’s Data Center Migration to the AWS Cloud - ENT330 - re:Invent ...
Cox Automotive’s Data Center Migration to the AWS Cloud - ENT330 - re:Invent ...Cox Automotive’s Data Center Migration to the AWS Cloud - ENT330 - re:Invent ...
Cox Automotive’s Data Center Migration to the AWS Cloud - ENT330 - re:Invent ...
 

Más de Cameron Vetter

Why do most machine learning projects never make it to production
Why do most machine learning projects never make it to productionWhy do most machine learning projects never make it to production
Why do most machine learning projects never make it to productionCameron Vetter
 
Ml.net machine learning for .net developers!
Ml.net machine learning for .net developers!Ml.net machine learning for .net developers!
Ml.net machine learning for .net developers!Cameron Vetter
 
Cloud First Architecture
Cloud First ArchitectureCloud First Architecture
Cloud First ArchitectureCameron Vetter
 
Mixed reality the second generation is all about ux
Mixed reality   the second generation is all about uxMixed reality   the second generation is all about ux
Mixed reality the second generation is all about uxCameron Vetter
 
Global ai night sept 2019 - Milwaukee
Global ai night sept 2019 - MilwaukeeGlobal ai night sept 2019 - Milwaukee
Global ai night sept 2019 - MilwaukeeCameron Vetter
 
Integrating Machine Learning Capabilities into your team
Integrating Machine Learning Capabilities into your teamIntegrating Machine Learning Capabilities into your team
Integrating Machine Learning Capabilities into your teamCameron Vetter
 
Azure Notebooks - Jupyter for the Cloud
Azure Notebooks - Jupyter for the CloudAzure Notebooks - Jupyter for the Cloud
Azure Notebooks - Jupyter for the CloudCameron Vetter
 
An Introduction to Artificial Neural Networks
An Introduction to Artificial Neural NetworksAn Introduction to Artificial Neural Networks
An Introduction to Artificial Neural NetworksCameron Vetter
 
Azure Batch AI for Neural Networks
Azure Batch AI for Neural Networks Azure Batch AI for Neural Networks
Azure Batch AI for Neural Networks Cameron Vetter
 
Augmented reality for the Enterprise
Augmented reality for the EnterpriseAugmented reality for the Enterprise
Augmented reality for the EnterpriseCameron Vetter
 
Augmented Reality - Let’s Make Some Holograms! (UXD Version)
Augmented Reality - Let’s Make Some Holograms! (UXD Version)Augmented Reality - Let’s Make Some Holograms! (UXD Version)
Augmented Reality - Let’s Make Some Holograms! (UXD Version)Cameron Vetter
 
Augmented Reality - Let’s Make Some Holgrams! (Developer Version)
Augmented Reality - Let’s Make Some Holgrams! (Developer Version)Augmented Reality - Let’s Make Some Holgrams! (Developer Version)
Augmented Reality - Let’s Make Some Holgrams! (Developer Version)Cameron Vetter
 

Más de Cameron Vetter (12)

Why do most machine learning projects never make it to production
Why do most machine learning projects never make it to productionWhy do most machine learning projects never make it to production
Why do most machine learning projects never make it to production
 
Ml.net machine learning for .net developers!
Ml.net machine learning for .net developers!Ml.net machine learning for .net developers!
Ml.net machine learning for .net developers!
 
Cloud First Architecture
Cloud First ArchitectureCloud First Architecture
Cloud First Architecture
 
Mixed reality the second generation is all about ux
Mixed reality   the second generation is all about uxMixed reality   the second generation is all about ux
Mixed reality the second generation is all about ux
 
Global ai night sept 2019 - Milwaukee
Global ai night sept 2019 - MilwaukeeGlobal ai night sept 2019 - Milwaukee
Global ai night sept 2019 - Milwaukee
 
Integrating Machine Learning Capabilities into your team
Integrating Machine Learning Capabilities into your teamIntegrating Machine Learning Capabilities into your team
Integrating Machine Learning Capabilities into your team
 
Azure Notebooks - Jupyter for the Cloud
Azure Notebooks - Jupyter for the CloudAzure Notebooks - Jupyter for the Cloud
Azure Notebooks - Jupyter for the Cloud
 
An Introduction to Artificial Neural Networks
An Introduction to Artificial Neural NetworksAn Introduction to Artificial Neural Networks
An Introduction to Artificial Neural Networks
 
Azure Batch AI for Neural Networks
Azure Batch AI for Neural Networks Azure Batch AI for Neural Networks
Azure Batch AI for Neural Networks
 
Augmented reality for the Enterprise
Augmented reality for the EnterpriseAugmented reality for the Enterprise
Augmented reality for the Enterprise
 
Augmented Reality - Let’s Make Some Holograms! (UXD Version)
Augmented Reality - Let’s Make Some Holograms! (UXD Version)Augmented Reality - Let’s Make Some Holograms! (UXD Version)
Augmented Reality - Let’s Make Some Holograms! (UXD Version)
 
Augmented Reality - Let’s Make Some Holgrams! (Developer Version)
Augmented Reality - Let’s Make Some Holgrams! (Developer Version)Augmented Reality - Let’s Make Some Holgrams! (Developer Version)
Augmented Reality - Let’s Make Some Holgrams! (Developer Version)
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 

Último (20)

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 

Using a Service Bus for Microservice Communication

  • 1. 1 Copyright 2017 Cameron U S I N G A S E R V I C E B U S F O R M I C R O S E R V I C E C O M M U N I C A T I O N
  • 2. 2 Copyright 2017 Cameron P R E S E N TAT I O N You’ll leave with an understanding of how to effectively use a Service Bus for Microservice communication to avoid tight coupling between services. Goal
  • 3. 3 Copyright 2017 Cameron Cameron Vetter Software Development is my passion. I have over 15 years of experience using Microsoft tools to develop software. Currently I am a Senior Software Architect at SafeNet Consulting, where I get to do what I love... Architect, Design, and Develop great software! I currently focus on Microservices, SOA, Azure, IOT, and HoloLens. @Poshporcupine linkedin.com/in/cameronvetter www.cameronvetter.com
  • 4. 4 Copyright 2017 Cameron D E F I N E M I C R O S E R V I C E S S E R V I C E B U S D E S I G N PAT T E R N S M E S S A G E T R A N S P O R T S E V E N T U A L C O N S I S T E N C Y D E C O U P L I N G T H R O U G H C O N T R A C T S T H E D E M O ROADMAP
  • 5. 5 Copyright 2017 Cameron Tooling This talk is not tooling specific, these architectural patterns fit in most modern developments stacks.
  • 6. 6 Copyright 2017 Cameron W H AT D O I M E A N B Y M I C R O S E R V I C E S ?
  • 7. 7 Copyright 2017 Cameron TRAITS OF SERVICES SERVICE CONFUSION• Each is a software component • Each service runs in its own process • They use interprocess communication • No coupling to other services except by service contracts • Windows Services • Web Services (REST, SOAP, etc) • Cloud Services
  • 8. 8 Copyright 2017 Cameron M A R T I N F O W L E R “Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
  • 9. 9 Copyright 2017 Cameron MICROSERVICE ARCHITECTURE CHARACTERISTICS S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l C o m p o n e n t i z a t i o n v i a S e r v i c e s • Independently Replaceable • Independently Upgradeable • Independent Dependencies O r g a n i z e d A r o u n d B u s i n e s s C a p a b i l i t i e s • Not Organized Around Technology • Each Service (Team) Focuses on One Business Capability
  • 10. 10 Copyright 2017 Cameron MICROSERVICE ARCHITECTUR CHARACTERISTICS S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l P r o d u c t s N o t P r o j e c t s • No Longer Build A Project, Disband, and Move On • Team Owns the Service(s) They Build • Continue to Add Services or Functionality to Services S m a r t E n d p o i n t s a n d D u m b P i p e s • Exact Opposite of an ESB • Smarts of A System Moves Out of the Bus and Into the Endpoints
  • 11. 11 Copyright 2017 Cameron MICROSERVICE ARCHITECTURE CHARACTERISTICS S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l D e c e n t r a l i z e d G o v e r n a n c e • No Longer Force Everyone to Same Technology Stack D e c e n t r a l i z e d D a t a M a n a g e m e n t • Not Stuffing all Data in One Huge Relational Database • Services NEVER Connect to Another Service’s Data Store • Prevents Integration Through the Database
  • 12. 12 Copyright 2017 Cameron MICROSERVICE ARCHITECTUR CHARACTERISTICS S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l I n f r a s t r u c t u r e A u t o m a t i o n • Mandatory to Succeed With MicroServices • Continuous Delivery • Ability to Deliver Fast • Continuous Monitoring D e s i g n f o r f a i l u r e • They Will Fail!
  • 13. 13 Copyright 2017 Cameron MICROSERVICE ARCHITECTURE CHARACTERISTICS S o u r c e : m a r t i n f o w l e r . c o m / a r t i c l e s / m i c r o s e r v i c e s . h t m l E v o l u t i o n a r y d e s i g n • Overall System Rapidly Changes • Allows More Granular Release Planning • Create Fault Tolerant Contracts and Avoid Versioning
  • 14. 14 Copyright 2017 Cameron M E S S A G E T R A N S P O R T S
  • 15. 15 Copyright 2017 Cameron SERVICE BUS TRANSPORT PROVIDES PLUMBING Responsible for getting a message from point A to point B and dealing with the underlying network. PROVIDES RELIABILITY Queueing mechanism to make sure messages are not lost, handles retries, and handles failures. PROVIDES SCALABILITY Responsible for providing the scalability for the service bus.
  • 16. 16 Copyright 2017 Cameron Rabbit MQ WORLD CLASS MESSAGE QUEUING Built on erlang to provide unmatched performance, feature set and community support. ON PREMISE SOLUTION In my opinion nothing comes close for power, performance, or reliability. MONITORING The best built in monitoring solution available for a transport.
  • 17. 17 Copyright 2017 Cameron AZURE SERVICE BUS NOT QUITE A SERVICE BUS Don’t let the title fool you, Azure Service Bus is no more a complete service bus than Rabbit MQ. CLOUD SOLUTION PAAS solution that scales, and is maintained for you, creating a great cloud solution. WELL INTEGRATED Azure Service Bus is well integrated into the Microsoft stack, and cross platform compatible.
  • 18. 18 Copyright 2017 Cameron REST COUPLING REST interface used to talk to other services, every service must be rebuilt when the interface changes. COUPLING Every service must know about and understand what every other service is for and when to use it. TURNS YOUR ARCHITECTURE TO SPAGHETTI Every architectural pattern degenerates into spaghetti with the right antipattern.
  • 19. 19 Copyright 2017 Cameron ENTERPRISE SERVICE BUS PUSHES LOGIC TO THE CENTER Goal is to create smart endpoints and dumb pipes, an ESB turns that upside down. KITCHEN SINK It slices, it dices… Security, Mediation, Protocols, Transformations, Business Logic… DON’T MAKE THE MONOLITH The coupling created by an ESB will turn your microservice architecture back into a monolith.
  • 20. 20 Copyright 2017 Cameron E V E N T U A L C O N S I S T E N C Y
  • 21. 21 Copyright 2017 Cameron BASE BASE data stores value availability and scale over consistency of replicated data. B A S I C A L LY AVA I L A B L E Guaranteed availability of data . S O F T S TAT E The system could change over time, even without user interaction due to eventual consistency E V E N T U A L C O N S I S T E N C Y The system is guaranteed to eventually become consistent, but not guaranteed when it will become consistent
  • 22. 22 Copyright 2017 Cameron ACID ACID data stores value consistency over availability and scale AT O M I C All operations must succeed or the entire operation is rolled back. C O N S I S T E N T After each transaction the database, its rules, and relationships are intact. I S O L AT E D Each transaction runs independently so there is not transaction contention. D U R A B L E Once a transaction is completed it is permanent regardless of other failures.
  • 23. 23 Copyright 2017 Cameron E X A M P L E EVENTUAL CONSISTENCY What does it mean to be eventually consistent? Service A – 1 Florence Service A – 2 Florence Client Client Florence FloFlo Florence Flo Flo
  • 24. 24 Copyright 2017 Cameron • More complex to develop for • Must have a strategy for stale data • Must have a strategy for inconsistent data • Allows for cost effective horizontal scaling • Allows for live updates of a service without taking the system down • Able to deal with large quantities of data and huge scale PROS CONS USE BASE INSTEAD OF ACID A Microservice Architecture MUST plan for BASE as a consistency model between services. ACID consistency quickly cripples a microservice architecture.
  • 25. 25 Copyright 2017 Cameron D e c o u p l i n g T h r o u g h C o n t r a c t s
  • 26. 26 Copyright 2017 Cameron S u b s c r i b e t o t h e i n t e r f a c e n o t t h e c l a s s N e v e r e x c h a n g e c l a s s e s d i r e c t l y P u b l i s h t h e i n t e r f a c e n o t t h e c l a s s E a c h s e r v i c e i m p l e m e n t s t h e i n t e r f a c e a s a c l a s s P r e v e n t s s e r v i c e v e r s i o n i n g h e l l SERVICE COMMUNICATION CONTRACTS Effective Use of Contracts Allows you to Remain Loosely Coupled A l w a y s u s e c o n t r a c t s e s t a b l i s h e d t h r o u g h i n t e r f a c e s
  • 27. 27 Copyright 2017 Cameron C O D E Interface Versioning Example How Do I Future Proof My Contracts? public interface IWhoCanYouPassTo { Guid RequestorId { get; } Guid LeftId { get; } Guid RightId { get; } } public class WhoCanYouPassTo : IWhoCanYouPassTo {…}
  • 28. 28 Copyright 2017 Cameron C O D E Next Version How Do I Future Proof My Contracts? public interface IWhoCanYouPassTo { Guid RequestorId { get; } Guid LeftId { get; } Guid RightId { get; } } public interface IWhoCanYouPassToV2 { Guid RequestorId { get; } Guid LeftId { get; } String LeftName { get; } Guid RightId { get; } String RightName { get; } } public class WhoCanYouPassTo : IWhoCanYouPassTo, IWhoCanYouPassToV2 {…}
  • 29. 29 Copyright 2017 Cameron HOW ARE WE LOOSLY COUPLED? • Any subscriber or publisher can independently change with no contract changes required • If a service changes a contract, new contracts are published, old contracts remain valid
  • 30. 30 Copyright 2017 Cameron S E R V I C E B U S D E S I G N PAT T E R N S
  • 31. 31 Copyright 2017 Cameron Publish / Subscr ibe Each published message is received by all current subscribers of that message type. Publisher Bus Subscribe r Subscribe r Subscribe r
  • 32. 32 Copyright 2017 Cameron Competing Consumer Only one subscriber receives each message, they take turns, typically in a round robin fashion. Publisher Bus Subscribe r Subscribe r Subscribe r
  • 33. 33 Copyright 2017 Cameron Dead Letter Channel The bus is unable to deliver a message to a subscriber and is placed in a dead letter queue. Publisher Bus Subscribe r Dead Letter
  • 34. 34 Copyright 2017 Cameron Dog Piles If a service is overloaded or malfunctioning, the retries compound the problem causing an outage which causes a cascade of failures across many or all services.
  • 35. 35 Copyright 2017 Cameron Shar ed Database Multiple services sharing the same database creates tight coupling between them. When one service changes the database all services must be updated for the new schema.
  • 36. 36 Copyright 2017 Cameron Flying Blind With a microservice architecture the need for metrics and a view into the system is even greater than in other architectures, without that view you are flying blind and your results will be predicatable.
  • 37. 37 Copyright 2017 Cameron T h e E x a m p l e
  • 38. 38 Copyright 2017 Cameron Pass the Potato Inspired by the Children’s Game Hot Potato, but only where it was convenient for my demo. M U LT I P L AY E R Each player added to a virtual circle C R O S S P L AT F O R M Works on any modern web browser D A S H B O A R D View the big picture of the game S TAT S Collect statistics for what I can only assume will make for compelling reports
  • 39. 39 Copyright 2017 Cameron Ar chitectur e Pass The Potato consists of two Apps, three Microservices and a Service Bus Mass Transit / Azure Service Bus Distributor ServiceStats Service Dash Board WPF App Web Page App Sessions Service Service Contracts
  • 40. 40 Copyright 2017 Cameron P a s s T h e P o t a t o
  • 41. 41 Copyright 2017 Cameron D E F I N E M I C R O S E R V I C E S S E R V I C E B U S D E S I G N PAT T E R N S M E S S A G E T R A N S P O R T S E V E N T U A L C O N S I S T E N C Y D E C O U P L I N G T H R O U G H C O N T R A C T S T H E D E M O IN SUMMARY
  • 42. 42 Copyright 2017 Cameron Any Questions w w w. c a m e r o n v e t t e r. c o m All Software Development Related, Tutorials, Talks, and More l i n k e d i n . c o m / i n / c a m e r o n v e t t e r Contact Me Directly @ p o s h p o r c u p i n e Mostly Development and Gaming Related, but whatever I find interesting

Notas del editor

  1. To change the image behind the Mock up. Select the layer - > Right Click -> Send to Back -> Delete the image -> Drag & Drop your Own Picture -> Send to Back (again)
  2. To change the image behind the Mock up. Select the layer - > Right Click -> Send to Back -> Delete the image -> Drag & Drop your Own Picture -> Send to Back (again)
  3. To change the image behind the Mock up. Select the layer - > Right Click -> Send to Back -> Delete the image -> Drag & Drop your Own Picture -> Send to Back (again)
  4. Even with an SLA of 99.9 for each service across 2 dozen services your System SLA is 97.6% make each redundant and your SLA is 99.99
  5. To change the image behind the Mock up. Select the layer - > Right Click -> Send to Back -> Delete the image -> Drag & Drop your Own Picture -> Send to Back (again)
  6. To change the image behind the Mock up. Select the layer - > Right Click -> Send to Back -> Delete the image -> Drag & Drop your Own Picture -> Send to Back (again)
  7. Public class Address : IAddress, IAddressV2 { … }
  8. If one of your services is under load or malfunctioning, and all your other services keep retrying their failed calls, then the problem would be compounded and magnified by the additional load from these retries. Eventually, the faltering service will surfer a total outage, and potentially set off a cascading failure throughout your system. The solution here is to have exponential backoff and implement the circuit breakerpattern.
  9. Another common mistake is to have a shared database between different services. This creates tight coupling between the services and means you can’t deploy the micro-services independently if it breaks the shared schema. Any schema updates will force you to update other micro-services too. Instead, every service should have its own database, and when you want data from another service you go through its API rather than reaching into its database and help yourself.
  10. With a micro-service architecture the need for on-going operational metrics is greater than ever before, without them you are just flying blind. Build in operational metrics from the beginning