SlideShare una empresa de Scribd logo
1 de 65
A PRACTICAL OVERVIEW
OF ACTORS IN SERVICE
FABRIC
Service Fabric enables you
to build and operate
always-on, hyper-scale
services using the same
technology powering
Microsoft’s Cloud.
ABOUT ME
7/9/2016 2
TODAY WE’RE GOING TO LEARN
ABOUT
Microsoft Azure – a public cloud
Microservices – an architectural pattern
Service Fabric – a hyper-scale microservice
platform
Reliable Actors – a programming model
7/9/2016 3
LIVE Q&A
Browse to http://bit.ly/dt-
qna
API : http://liveqna.alexandrebrisebois.com/api
Demo Source: http://bit.ly/git-qna-demo
7/9/2016 4
MICROSOFT AZURE Pushing innovation to
its limits
7/9/2016 5
WHAT DO ALL OF THESE HAVE IN
COMMON?
7/9/2016 6
• Single monolithic
• database
MICROSERVICES
7/9/2016 7
• Graph of interconnected microservices
• State typically scoped to the microservice
• Variety of technologies used
• Remote Storage for cold data
stateless services
with
separate stores
stateful
services
stateless
presentation
services
Tiers of specific
technologies
WHY MICROSERVICES?
Allows us to get closer to the business
Provides the business with agility
Small focussed teams
Reduced time-to-customer
7/9/2016 8
Design/
Develop
Operate
Upgrade
SERVICE FABRIC
Service Fabric enables you
to build and operate
always-on, hyper-scale
services using the same
technology powering
Microsoft’s Cloud.
7/9/2016 9
SERVICE FABRIC
7/9/2016 10
• 1 instance per VM
• Uneven utilization
• Low density
• Slow deployment & upgrade (bound
to VM)
• Slow scaling and failure recovery
• Limited fault tolerance
• Many microservices per VM
• Even Utilization (by default,
customizable)
• High density (customizable)
• Fast deployment & upgrade
• Fast scaling of independent
microservices
• Tunable fast fault tolerance
Conventional Services
Service Fabric
SERVICE FABRIC
7/9/2016 11
Private cloud
Public Cloud Other Clouds
SERVICE FABRIC
7/9/2016 12
Service discovery Reliability,
Availability,
Replication, Service
Orchestration
Application lifecycle
Fault Inject,
Test in production
Federates a set of nodes to form a consistent scalable fabric
Secure point-to-point communication
Deployment,
Upgrade and
Monitoring
WHY SERVICE FABRIC?
Scalability – support variable demand
High Availability – always on
Reliability – predictable outcomes
Resiliency – self healing (adapts to
adversity)
Durability – guarantees data
persistence
7/9/2016 13
SERVICE FABRIC – PROGRAMMING
MODELS
7/9/2016 14
Guest Executables
• Bring any exe
• Any language
• Any programming model
• Packaged as Application
• Gets versioning,
upgrade, monitoring,
health, etc.
Reliable Services
• Stateless & stateful
services
• Concurrent, granular
state changes
• Use of the Reliable
Collections
• Transactions across
collections
• Full platform integration
Reliable Actors
• Stateless & Stateful actor
objects
• Simplified programming
model
• Single Threaded model
• Great for scaled out
compute and state
SERVICE FABRIC – RELIABLE
ACTORS
Independent units of compute and
state
Large number of processes executing
in parallel
Communicates using asynchronous
messaging
Single threaded execution
Automatically created and dehydrated7/9/2016 15
SERVICE FABRIC – CATTLE NOT
PETS!
7/9/2016 16
Node 5Node 4Node 3 Node 6Node 2Node 1
P2
S
S
S
P4
S
P1
S
P3S
S
S
Service partitions are striped across
machines in the cluster.
Replicas automatically scale out & in
on cluster changes
LIVE QNA MICROSERVICE
ARCHITECTURE
7/9/2016 17
Session
Transcript
Transcript View4.2) Update
4.1) Register
4.3) Reminder
Participant
Participant
Participant
Has
Questions
Has
Session ListHas
Participant
Question
API
1) Register2) List
3) Join
5) Create
6) Add
Question
4) Read
4.4) Reads
Uses
Transcript View
Transcript View
No State
Persistence
Volatile State
Persistence
Persisted to Disk
SERVICE FABRIC – ACTOR
7/9/2016 18
SERVICE FABRIC – ACTOR – ID
KINDS
7/9/2016 19
SERVICE FABRIC – ACTOR – STATE
7/9/2016 20
Reads are completed
at the primary
Writes are replicated to
the write quorum of
secondaries
P
S
S
S
S
WriteWrite
WriteWrite
AckAck Ack
Ack
Read
Value
Write
Ack
SERVICE FABRIC – ACTOR – STATE
7/9/2016 21
SERVICE FABRIC – ACTOR – STATE
7/9/2016 22
SERVICE FABRIC – ACTOR – STATE
7/9/2016 23
SERVICE FABRIC – ACTOR –
PERSISTING STATE
7/9/2016 24
SERVICE FABRIC – ACTOR –
PERSISTING STATE
7/9/2016 25
SERVICE FABRIC – ACTOR –
READING STATE
7/9/2016 26
SERVICE FABRIC – ACTOR –
READING STATE
7/9/2016 27
SERVICE FABRIC – ACTOR –
INITIALIZATION
7/9/2016 28
SERVICE FABRIC – ACTOR –
REMOVING STATE
7/9/2016 29
SERVICE FABRIC – ACTOR –
ENUMERATION
7/9/2016 30
SERVICE FABRIC – ACTOR –
DELETING
7/9/2016 31
SERVICE FABRIC – ACTOR –
CUSTOM DATA TYPES
7/9/2016 32
SERVICE FABRIC – ACTOR –
TIMERS
7/9/2016 33
SERVICE FABRIC – ACTOR –
REMINDERS
7/9/2016 34
SERVICE FABRIC – ACTOR –
POLYMORPHISM
7/9/2016 35
SERVICE FABRIC – ACTOR –
POLYMORPHISM
7/9/2016 36
SERVICE FABRIC – ACTOR –
REENTRANCY
7/9/2016 37
SERVICE FABRIC – ACTOR – EVENT
PRODUCER
7/9/2016 38
SERVICE FABRIC – ACTOR – EVENT
SUBSCRIBER
7/9/2016 39
SERVICE FABRIC – RELIABLE
ACTORS
Do not use Reliable Actors
when
You need distributed
transactions
You want to control
concurrency, partitioning
and communication
If you need reliable
collections
7/9/2016 40
SERVICE FABRIC – RELIABLE
ACTOR FAILOVER
7/9/2016 41
Types of reconfiguration
 Primary failover
 Removing a failed secondary
 Adding recovered replica
 Building a new secondary
Replica States
 None
 Idle Secondary
 Active Secondary
 Primary
P
S
S
S
S
S
Must be safe in the
presence of cascading
failures
B P
X
Failed
X
Failed
MONITORING YOUR SERVICES
7/9/2016 42
Performance and stress response
•Rich built-in metrics for Actors and Services programming
models
•Easy to add custom application performance metrics
Health status monitoring
•Built-in health status for cluster and services
•Flexible and extensible health store for custom app health
reporting
•Allows continuous monitoring for real-time alerting on
problems in production
DIAGNOSTICS AND
TROUBLESHOOTING
7/9/2016 43
•Repair suggestions. Examples: Slow RunAsync cancellations,
RunAsync failures
•All important events logged. Examples: App creation, deploy
and upgrade records. All Actor method calls.
Detailed
System
Optics
•ETW == Fast Industry Standard Logging Technology
•Works across environments. Same tracing code runs on
devbox and also on production clusters on Azure.
•Easy to add and system appends all the needed metadata
such as node, app, service, and partition.
Custom
Applicatio
n Tracing
•Visual Studio Diagnostics Events Viewer
•Windows Event Viewer
•Windows Azure Diagnostics + Operational Insights
•Easy to plug in your preferred tools: Kibana, Elasticsearch
and more
Choice of
Tools
SERVICE FABRIC – ACTOR –
SCENARIOS
Highly available services
Scalable services
Computation on nonstatic data
Source: https://azure.microsoft.com/en-
us/documentation/articles/service-fabric-application-scenarios/
7/9/2016 44
SERVICE FABRIC – ACTOR –
SCENARIOS
Session-based interactive
applications
Distributed graph processing
Data analytics and workflows
Source: https://azure.microsoft.com/en-
us/documentation/articles/service-fabric-application-scenarios/
7/9/2016 45
SERVICE FABRIC – ACTOR –
PATTERNS
7/9/2016 46
SERVICE FABRIC – ACTOR –
PATTERNSGRASP – General Responsibility Assignment Software Principles
 https://en.wikipedia.org/wiki/GRASP_(object-oriented_design)
"Gang of Four“ Design Patterns
 https://en.wikipedia.org/wiki/Design_Patterns
SOLID
 https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)
 single responsibility
 open-closed
 Liskov substitution
 interface segregation
 dependency inversion
7/9/2016 47
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Idempotence
https://en.wikipedia.org/wiki/Idempot
ence
7/9/2016 48
Idempotence is the property
of certain operations in
mathematics and computer
science, that can be applied
multiple times without
changing the result
beyond the initial
application. The concept of
idempotence arises in a
number of places in abstract
algebra and functional
programming.
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Circuit Breaker Pattern
 https://msdn.microsoft.com/en-
us/library/dn589784.aspx
Gatekeeper Pattern
 https://msdn.microsoft.com/en-
us/library/dn589793.aspx
Index Table Pattern
 https://msdn.microsoft.com/en-
us/library/dn589791.aspx
Source
https://msdn.microsoft.com/en-
us/library/dn568099.aspx
7/9/2016 49
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Circuit Breaker Pattern
https://msdn.microsoft.com/en-
us/library/dn589784.aspx
7/9/2016 50
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Gatekeeper Pattern
https://msdn.microsoft.com/en-
us/library/dn589793.aspx
7/9/2016 51
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Index Table Pattern
https://msdn.microsoft.com/en-
us/library/dn589791.aspx
7/9/2016 52
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Materialized View Pattern
 https://msdn.microsoft.com/en-
us/library/dn589782.aspx
Pipes and Filters Pattern
 https://msdn.microsoft.com/en-
us/library/dn568100.aspx
Sharding Pattern
 https://msdn.microsoft.com/en-
us/library/dn589797.aspx
Source
https://msdn.microsoft.com/en-
us/library/dn568099.aspx
7/9/2016 53
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Materialized View
Pattern
https://msdn.microsoft.com/en-
us/library/dn589782.aspx
7/9/2016 54
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Pipes and Filters Pattern
https://msdn.microsoft.com/en-
us/library/dn568100.aspx
7/9/2016 55
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Sharding Pattern
https://msdn.microsoft.com/en-
us/library/dn589797.aspx
7/9/2016 56
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Cache-Aside Pattern
 https://msdn.microsoft.com/en-
us/library/dn589799.aspx
Compute Resource
Consolidation Pattern
 https://msdn.microsoft.com/en-
us/library/dn589778.aspx
Priority Queue Pattern
 https://msdn.microsoft.com/en-
us/library/dn589794.aspx
Source
https://msdn.microsoft.com/en-
us/library/dn568099.aspx
7/9/2016 57
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Cache-Aside Pattern
https://msdn.microsoft.com/en-
us/library/dn589799.aspx
7/9/2016 58
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Compute Resource
Consolidation Pattern
https://msdn.microsoft.com/en-
us/library/dn589778.aspx
7/9/2016 59
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Priority Queue Pattern
https://msdn.microsoft.com/en-
us/library/dn589794.aspx
7/9/2016 60
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Throttling Pattern
 https://msdn.microsoft.com/en-
us/library/dn589798.aspx
Idempotence
 https://en.wikipedia.org/wiki/Idempotence
Source
https://msdn.microsoft.com/en-
us/library/dn568099.aspx
7/9/2016 61
SERVICE FABRIC
CLOUD DESIGN
PATTERNS
Throttling Pattern
https://msdn.microsoft.com/en-
us/library/dn589798.aspx
7/9/2016 62
SERVICE FABRIC – ACTOR –
PATTERNS
7/9/2016 63
SERVICE FABRIC – ACTOR –
PATTERNS
7/9/2016 64
QESTIONS & ANSWERS
Get in Touch
Twitter: @Brisebois
Blog: http://bit.ly/blog-alex
Email:
alexandre.brisebois@microsoft.com
Service Fabric Resources
Documentation:
http://aka.ms/servicefabric
SDK: http://aka.ms/servicefabricSDK
QnA Demo Code: http://bit.ly/git-
qna-demo
7/9/2016 65

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Azure Service Fabric Overview
Azure Service Fabric OverviewAzure Service Fabric Overview
Azure Service Fabric Overview
 
Azure Service Fabric
Azure Service FabricAzure Service Fabric
Azure Service Fabric
 
Microservices with Azure Service Fabric
Microservices with Azure Service FabricMicroservices with Azure Service Fabric
Microservices with Azure Service Fabric
 
Azure service fabric
Azure service fabricAzure service fabric
Azure service fabric
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric
 
Azure Reference Architectures
Azure Reference ArchitecturesAzure Reference Architectures
Azure Reference Architectures
 
AppSphere 15 - Microsoft Azure for Developers & DevOps
AppSphere 15 - Microsoft Azure for Developers & DevOpsAppSphere 15 - Microsoft Azure for Developers & DevOps
AppSphere 15 - Microsoft Azure for Developers & DevOps
 
MicroServices on Azure
MicroServices on AzureMicroServices on Azure
MicroServices on Azure
 
Azure in Developer Perspective
Azure in Developer PerspectiveAzure in Developer Perspective
Azure in Developer Perspective
 
Microservices and Azure App Services
Microservices and Azure App ServicesMicroservices and Azure App Services
Microservices and Azure App Services
 
PaaS and Container Innovation – What’s new with App Service
PaaS and Container Innovation – What’s new with App ServicePaaS and Container Innovation – What’s new with App Service
PaaS and Container Innovation – What’s new with App Service
 
Building Hybrid Cloud Apps with Azure and Azure stack
Building Hybrid Cloud Apps with Azure and Azure stackBuilding Hybrid Cloud Apps with Azure and Azure stack
Building Hybrid Cloud Apps with Azure and Azure stack
 
Migrate an Existing Application to Microsoft Azure
Migrate an Existing Application to Microsoft AzureMigrate an Existing Application to Microsoft Azure
Migrate an Existing Application to Microsoft Azure
 
Microsoft cloud stack
Microsoft cloud stackMicrosoft cloud stack
Microsoft cloud stack
 
Usage of Reliable Actors in Azure Service Fabric
Usage of Reliable Actors in Azure Service FabricUsage of Reliable Actors in Azure Service Fabric
Usage of Reliable Actors in Azure Service Fabric
 
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
 
Tooling and DevOps for the Hybrid Cloud with Azure and Azure Stack
Tooling and DevOps for the Hybrid Cloud with Azure and Azure StackTooling and DevOps for the Hybrid Cloud with Azure and Azure Stack
Tooling and DevOps for the Hybrid Cloud with Azure and Azure Stack
 
Cloud Fundamental
Cloud FundamentalCloud Fundamental
Cloud Fundamental
 
micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)
 
Overview of Azure Arc enabled Kubernetes
Overview of Azure Arc enabled KubernetesOverview of Azure Arc enabled Kubernetes
Overview of Azure Arc enabled Kubernetes
 

Destacado

Patterns & Practices of Microservices
Patterns & Practices of MicroservicesPatterns & Practices of Microservices
Patterns & Practices of Microservices
Wesley Reisz
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
JAXLondon2014
 

Destacado (20)

Tokyo Azure Meetup #5 - Microservices and Azure Service Fabric
Tokyo Azure Meetup #5 - Microservices and Azure Service FabricTokyo Azure Meetup #5 - Microservices and Azure Service Fabric
Tokyo Azure Meetup #5 - Microservices and Azure Service Fabric
 
From a monolith to microservices with Azure Service Fabric
From a monolith to microservices with Azure Service FabricFrom a monolith to microservices with Azure Service Fabric
From a monolith to microservices with Azure Service Fabric
 
MongoSF 2012
MongoSF 2012MongoSF 2012
MongoSF 2012
 
MARTA Hackathon Data Presentation
MARTA Hackathon Data PresentationMARTA Hackathon Data Presentation
MARTA Hackathon Data Presentation
 
Patterns & Practices of Microservices
Patterns & Practices of MicroservicesPatterns & Practices of Microservices
Patterns & Practices of Microservices
 
Pieter de Bruin (Microsoft) - Welke technologie gebruiken bij implementatie M...
Pieter de Bruin (Microsoft) - Welke technologie gebruiken bij implementatie M...Pieter de Bruin (Microsoft) - Welke technologie gebruiken bij implementatie M...
Pieter de Bruin (Microsoft) - Welke technologie gebruiken bij implementatie M...
 
Ruud de Jonge (Microsoft) - Opening
Ruud de Jonge (Microsoft) - OpeningRuud de Jonge (Microsoft) - Opening
Ruud de Jonge (Microsoft) - Opening
 
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
 
Graph Database workshop
Graph Database workshopGraph Database workshop
Graph Database workshop
 
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
 
Patterns & Practices for Cloud-based Microservices
Patterns & Practices for Cloud-based MicroservicesPatterns & Practices for Cloud-based Microservices
Patterns & Practices for Cloud-based Microservices
 
08 hopex v next service fabric
08 hopex v next   service fabric08 hopex v next   service fabric
08 hopex v next service fabric
 
NS study8 DDD Microservices Azuer Service Fabric
NS study8 DDD Microservices Azuer Service FabricNS study8 DDD Microservices Azuer Service Fabric
NS study8 DDD Microservices Azuer Service Fabric
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
 
Azure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursAzure Service Fabric pour les développeurs
Azure Service Fabric pour les développeurs
 
Миграция в Azure Service Fabric
Миграция в Azure Service FabricМиграция в Azure Service Fabric
Миграция в Azure Service Fabric
 
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 to Scale using Azure Service Fabric
Microservices to Scale using Azure Service FabricMicroservices to Scale using Azure Service Fabric
Microservices to Scale using Azure Service Fabric
 
CloudBrew 2016 - Building IoT solution with Service Fabric
CloudBrew 2016 - Building IoT solution with Service FabricCloudBrew 2016 - Building IoT solution with Service Fabric
CloudBrew 2016 - Building IoT solution with Service Fabric
 
祝GA、 Service Fabric 概要
祝GA、 Service Fabric 概要祝GA、 Service Fabric 概要
祝GA、 Service Fabric 概要
 

Similar a Devteach 2016: A practical overview of actors in service fabric

Moving Your Enterprise to the Cloud
Moving Your Enterprise to the CloudMoving Your Enterprise to the Cloud
Moving Your Enterprise to the Cloud
Imesh Gunaratne
 
A clear strategy for moving your enterprise to the cloud
A clear strategy for moving your enterprise to the cloudA clear strategy for moving your enterprise to the cloud
A clear strategy for moving your enterprise to the cloud
WSO2
 

Similar a Devteach 2016: A practical overview of actors in service fabric (20)

Microservices on AWS Spot instances
Microservices on AWS Spot instancesMicroservices on AWS Spot instances
Microservices on AWS Spot instances
 
Understanding Cisco’ Next Generation SD-WAN Technology
Understanding Cisco’ Next Generation SD-WAN TechnologyUnderstanding Cisco’ Next Generation SD-WAN Technology
Understanding Cisco’ Next Generation SD-WAN Technology
 
Understanding Cisco’s Next Generation SD-WAN Solution with Viptela
Understanding Cisco’s Next Generation SD-WAN Solution with ViptelaUnderstanding Cisco’s Next Generation SD-WAN Solution with Viptela
Understanding Cisco’s Next Generation SD-WAN Solution with Viptela
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
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
 
Cisco Connect Vancouver 2017 - Understanding Cisco next gen SD-WAN
Cisco Connect Vancouver 2017 - Understanding Cisco next gen SD-WANCisco Connect Vancouver 2017 - Understanding Cisco next gen SD-WAN
Cisco Connect Vancouver 2017 - Understanding Cisco next gen SD-WAN
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Cloud-Native Workshop New York- Pivotal
Cloud-Native Workshop New York- PivotalCloud-Native Workshop New York- Pivotal
Cloud-Native Workshop New York- Pivotal
 
Microsoft Azure News - Oct 2016
Microsoft Azure News - Oct 2016Microsoft Azure News - Oct 2016
Microsoft Azure News - Oct 2016
 
Architecture of NFV Platform for Orchestrating Cloud-based & vBranch Managed ...
Architecture of NFV Platform for Orchestrating Cloud-based & vBranch Managed ...Architecture of NFV Platform for Orchestrating Cloud-based & vBranch Managed ...
Architecture of NFV Platform for Orchestrating Cloud-based & vBranch Managed ...
 
Full lifecycle of a microservice
Full lifecycle of a microserviceFull lifecycle of a microservice
Full lifecycle of a microservice
 
Microsoft Azure News - Sept 2016
Microsoft Azure News - Sept 2016Microsoft Azure News - Sept 2016
Microsoft Azure News - Sept 2016
 
Un-clouding the cloud
Un-clouding the cloudUn-clouding the cloud
Un-clouding the cloud
 
Moving Your Enterprise to the Cloud
Moving Your Enterprise to the CloudMoving Your Enterprise to the Cloud
Moving Your Enterprise to the Cloud
 
Predix
PredixPredix
Predix
 
DEVNET-1166 Open SDN Controller APIs
DEVNET-1166	Open SDN Controller APIsDEVNET-1166	Open SDN Controller APIs
DEVNET-1166 Open SDN Controller APIs
 
A clear strategy for moving your enterprise to the cloud
A clear strategy for moving your enterprise to the cloudA clear strategy for moving your enterprise to the cloud
A clear strategy for moving your enterprise to the cloud
 
Microservices bell labs_kulak_final
Microservices bell labs_kulak_finalMicroservices bell labs_kulak_final
Microservices bell labs_kulak_final
 
Twelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring FrameworkTwelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring Framework
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration Patterns
 

Más de Brisebois (6)

Working with microsoft azure resources
Working with microsoft azure resourcesWorking with microsoft azure resources
Working with microsoft azure resources
 
What is Microsoft Azure?
What is Microsoft Azure?What is Microsoft Azure?
What is Microsoft Azure?
 
Orleans – a “cloud native” runtime built for #azure
Orleans – a “cloud native” runtime built for #azureOrleans – a “cloud native” runtime built for #azure
Orleans – a “cloud native” runtime built for #azure
 
Windows azure sql database & your data
Windows azure sql database & your dataWindows azure sql database & your data
Windows azure sql database & your data
 
Windows azurewebsites
Windows azurewebsitesWindows azurewebsites
Windows azurewebsites
 
Une RESTful Architecture
Une RESTful ArchitectureUne RESTful Architecture
Une RESTful Architecture
 

Último

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
VictoriaMetrics
 
%+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
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Último (20)

%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
 
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...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
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
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%+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...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
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-...
 
%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
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
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...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 

Devteach 2016: A practical overview of actors in service fabric

  • 1. A PRACTICAL OVERVIEW OF ACTORS IN SERVICE FABRIC Service Fabric enables you to build and operate always-on, hyper-scale services using the same technology powering Microsoft’s Cloud.
  • 3. TODAY WE’RE GOING TO LEARN ABOUT Microsoft Azure – a public cloud Microservices – an architectural pattern Service Fabric – a hyper-scale microservice platform Reliable Actors – a programming model 7/9/2016 3
  • 4. LIVE Q&A Browse to http://bit.ly/dt- qna API : http://liveqna.alexandrebrisebois.com/api Demo Source: http://bit.ly/git-qna-demo 7/9/2016 4
  • 5. MICROSOFT AZURE Pushing innovation to its limits 7/9/2016 5
  • 6. WHAT DO ALL OF THESE HAVE IN COMMON? 7/9/2016 6
  • 7. • Single monolithic • database MICROSERVICES 7/9/2016 7 • Graph of interconnected microservices • State typically scoped to the microservice • Variety of technologies used • Remote Storage for cold data stateless services with separate stores stateful services stateless presentation services Tiers of specific technologies
  • 8. WHY MICROSERVICES? Allows us to get closer to the business Provides the business with agility Small focussed teams Reduced time-to-customer 7/9/2016 8 Design/ Develop Operate Upgrade
  • 9. SERVICE FABRIC Service Fabric enables you to build and operate always-on, hyper-scale services using the same technology powering Microsoft’s Cloud. 7/9/2016 9
  • 10. SERVICE FABRIC 7/9/2016 10 • 1 instance per VM • Uneven utilization • Low density • Slow deployment & upgrade (bound to VM) • Slow scaling and failure recovery • Limited fault tolerance • Many microservices per VM • Even Utilization (by default, customizable) • High density (customizable) • Fast deployment & upgrade • Fast scaling of independent microservices • Tunable fast fault tolerance Conventional Services Service Fabric
  • 11. SERVICE FABRIC 7/9/2016 11 Private cloud Public Cloud Other Clouds
  • 12. SERVICE FABRIC 7/9/2016 12 Service discovery Reliability, Availability, Replication, Service Orchestration Application lifecycle Fault Inject, Test in production Federates a set of nodes to form a consistent scalable fabric Secure point-to-point communication Deployment, Upgrade and Monitoring
  • 13. WHY SERVICE FABRIC? Scalability – support variable demand High Availability – always on Reliability – predictable outcomes Resiliency – self healing (adapts to adversity) Durability – guarantees data persistence 7/9/2016 13
  • 14. SERVICE FABRIC – PROGRAMMING MODELS 7/9/2016 14 Guest Executables • Bring any exe • Any language • Any programming model • Packaged as Application • Gets versioning, upgrade, monitoring, health, etc. Reliable Services • Stateless & stateful services • Concurrent, granular state changes • Use of the Reliable Collections • Transactions across collections • Full platform integration Reliable Actors • Stateless & Stateful actor objects • Simplified programming model • Single Threaded model • Great for scaled out compute and state
  • 15. SERVICE FABRIC – RELIABLE ACTORS Independent units of compute and state Large number of processes executing in parallel Communicates using asynchronous messaging Single threaded execution Automatically created and dehydrated7/9/2016 15
  • 16. SERVICE FABRIC – CATTLE NOT PETS! 7/9/2016 16 Node 5Node 4Node 3 Node 6Node 2Node 1 P2 S S S P4 S P1 S P3S S S Service partitions are striped across machines in the cluster. Replicas automatically scale out & in on cluster changes
  • 17. LIVE QNA MICROSERVICE ARCHITECTURE 7/9/2016 17 Session Transcript Transcript View4.2) Update 4.1) Register 4.3) Reminder Participant Participant Participant Has Questions Has Session ListHas Participant Question API 1) Register2) List 3) Join 5) Create 6) Add Question 4) Read 4.4) Reads Uses Transcript View Transcript View No State Persistence Volatile State Persistence Persisted to Disk
  • 18. SERVICE FABRIC – ACTOR 7/9/2016 18
  • 19. SERVICE FABRIC – ACTOR – ID KINDS 7/9/2016 19
  • 20. SERVICE FABRIC – ACTOR – STATE 7/9/2016 20 Reads are completed at the primary Writes are replicated to the write quorum of secondaries P S S S S WriteWrite WriteWrite AckAck Ack Ack Read Value Write Ack
  • 21. SERVICE FABRIC – ACTOR – STATE 7/9/2016 21
  • 22. SERVICE FABRIC – ACTOR – STATE 7/9/2016 22
  • 23. SERVICE FABRIC – ACTOR – STATE 7/9/2016 23
  • 24. SERVICE FABRIC – ACTOR – PERSISTING STATE 7/9/2016 24
  • 25. SERVICE FABRIC – ACTOR – PERSISTING STATE 7/9/2016 25
  • 26. SERVICE FABRIC – ACTOR – READING STATE 7/9/2016 26
  • 27. SERVICE FABRIC – ACTOR – READING STATE 7/9/2016 27
  • 28. SERVICE FABRIC – ACTOR – INITIALIZATION 7/9/2016 28
  • 29. SERVICE FABRIC – ACTOR – REMOVING STATE 7/9/2016 29
  • 30. SERVICE FABRIC – ACTOR – ENUMERATION 7/9/2016 30
  • 31. SERVICE FABRIC – ACTOR – DELETING 7/9/2016 31
  • 32. SERVICE FABRIC – ACTOR – CUSTOM DATA TYPES 7/9/2016 32
  • 33. SERVICE FABRIC – ACTOR – TIMERS 7/9/2016 33
  • 34. SERVICE FABRIC – ACTOR – REMINDERS 7/9/2016 34
  • 35. SERVICE FABRIC – ACTOR – POLYMORPHISM 7/9/2016 35
  • 36. SERVICE FABRIC – ACTOR – POLYMORPHISM 7/9/2016 36
  • 37. SERVICE FABRIC – ACTOR – REENTRANCY 7/9/2016 37
  • 38. SERVICE FABRIC – ACTOR – EVENT PRODUCER 7/9/2016 38
  • 39. SERVICE FABRIC – ACTOR – EVENT SUBSCRIBER 7/9/2016 39
  • 40. SERVICE FABRIC – RELIABLE ACTORS Do not use Reliable Actors when You need distributed transactions You want to control concurrency, partitioning and communication If you need reliable collections 7/9/2016 40
  • 41. SERVICE FABRIC – RELIABLE ACTOR FAILOVER 7/9/2016 41 Types of reconfiguration  Primary failover  Removing a failed secondary  Adding recovered replica  Building a new secondary Replica States  None  Idle Secondary  Active Secondary  Primary P S S S S S Must be safe in the presence of cascading failures B P X Failed X Failed
  • 42. MONITORING YOUR SERVICES 7/9/2016 42 Performance and stress response •Rich built-in metrics for Actors and Services programming models •Easy to add custom application performance metrics Health status monitoring •Built-in health status for cluster and services •Flexible and extensible health store for custom app health reporting •Allows continuous monitoring for real-time alerting on problems in production
  • 43. DIAGNOSTICS AND TROUBLESHOOTING 7/9/2016 43 •Repair suggestions. Examples: Slow RunAsync cancellations, RunAsync failures •All important events logged. Examples: App creation, deploy and upgrade records. All Actor method calls. Detailed System Optics •ETW == Fast Industry Standard Logging Technology •Works across environments. Same tracing code runs on devbox and also on production clusters on Azure. •Easy to add and system appends all the needed metadata such as node, app, service, and partition. Custom Applicatio n Tracing •Visual Studio Diagnostics Events Viewer •Windows Event Viewer •Windows Azure Diagnostics + Operational Insights •Easy to plug in your preferred tools: Kibana, Elasticsearch and more Choice of Tools
  • 44. SERVICE FABRIC – ACTOR – SCENARIOS Highly available services Scalable services Computation on nonstatic data Source: https://azure.microsoft.com/en- us/documentation/articles/service-fabric-application-scenarios/ 7/9/2016 44
  • 45. SERVICE FABRIC – ACTOR – SCENARIOS Session-based interactive applications Distributed graph processing Data analytics and workflows Source: https://azure.microsoft.com/en- us/documentation/articles/service-fabric-application-scenarios/ 7/9/2016 45
  • 46. SERVICE FABRIC – ACTOR – PATTERNS 7/9/2016 46
  • 47. SERVICE FABRIC – ACTOR – PATTERNSGRASP – General Responsibility Assignment Software Principles  https://en.wikipedia.org/wiki/GRASP_(object-oriented_design) "Gang of Four“ Design Patterns  https://en.wikipedia.org/wiki/Design_Patterns SOLID  https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)  single responsibility  open-closed  Liskov substitution  interface segregation  dependency inversion 7/9/2016 47
  • 48. SERVICE FABRIC CLOUD DESIGN PATTERNS Idempotence https://en.wikipedia.org/wiki/Idempot ence 7/9/2016 48 Idempotence is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application. The concept of idempotence arises in a number of places in abstract algebra and functional programming.
  • 49. SERVICE FABRIC CLOUD DESIGN PATTERNS Circuit Breaker Pattern  https://msdn.microsoft.com/en- us/library/dn589784.aspx Gatekeeper Pattern  https://msdn.microsoft.com/en- us/library/dn589793.aspx Index Table Pattern  https://msdn.microsoft.com/en- us/library/dn589791.aspx Source https://msdn.microsoft.com/en- us/library/dn568099.aspx 7/9/2016 49
  • 50. SERVICE FABRIC CLOUD DESIGN PATTERNS Circuit Breaker Pattern https://msdn.microsoft.com/en- us/library/dn589784.aspx 7/9/2016 50
  • 51. SERVICE FABRIC CLOUD DESIGN PATTERNS Gatekeeper Pattern https://msdn.microsoft.com/en- us/library/dn589793.aspx 7/9/2016 51
  • 52. SERVICE FABRIC CLOUD DESIGN PATTERNS Index Table Pattern https://msdn.microsoft.com/en- us/library/dn589791.aspx 7/9/2016 52
  • 53. SERVICE FABRIC CLOUD DESIGN PATTERNS Materialized View Pattern  https://msdn.microsoft.com/en- us/library/dn589782.aspx Pipes and Filters Pattern  https://msdn.microsoft.com/en- us/library/dn568100.aspx Sharding Pattern  https://msdn.microsoft.com/en- us/library/dn589797.aspx Source https://msdn.microsoft.com/en- us/library/dn568099.aspx 7/9/2016 53
  • 54. SERVICE FABRIC CLOUD DESIGN PATTERNS Materialized View Pattern https://msdn.microsoft.com/en- us/library/dn589782.aspx 7/9/2016 54
  • 55. SERVICE FABRIC CLOUD DESIGN PATTERNS Pipes and Filters Pattern https://msdn.microsoft.com/en- us/library/dn568100.aspx 7/9/2016 55
  • 56. SERVICE FABRIC CLOUD DESIGN PATTERNS Sharding Pattern https://msdn.microsoft.com/en- us/library/dn589797.aspx 7/9/2016 56
  • 57. SERVICE FABRIC CLOUD DESIGN PATTERNS Cache-Aside Pattern  https://msdn.microsoft.com/en- us/library/dn589799.aspx Compute Resource Consolidation Pattern  https://msdn.microsoft.com/en- us/library/dn589778.aspx Priority Queue Pattern  https://msdn.microsoft.com/en- us/library/dn589794.aspx Source https://msdn.microsoft.com/en- us/library/dn568099.aspx 7/9/2016 57
  • 58. SERVICE FABRIC CLOUD DESIGN PATTERNS Cache-Aside Pattern https://msdn.microsoft.com/en- us/library/dn589799.aspx 7/9/2016 58
  • 59. SERVICE FABRIC CLOUD DESIGN PATTERNS Compute Resource Consolidation Pattern https://msdn.microsoft.com/en- us/library/dn589778.aspx 7/9/2016 59
  • 60. SERVICE FABRIC CLOUD DESIGN PATTERNS Priority Queue Pattern https://msdn.microsoft.com/en- us/library/dn589794.aspx 7/9/2016 60
  • 61. SERVICE FABRIC CLOUD DESIGN PATTERNS Throttling Pattern  https://msdn.microsoft.com/en- us/library/dn589798.aspx Idempotence  https://en.wikipedia.org/wiki/Idempotence Source https://msdn.microsoft.com/en- us/library/dn568099.aspx 7/9/2016 61
  • 62. SERVICE FABRIC CLOUD DESIGN PATTERNS Throttling Pattern https://msdn.microsoft.com/en- us/library/dn589798.aspx 7/9/2016 62
  • 63. SERVICE FABRIC – ACTOR – PATTERNS 7/9/2016 63
  • 64. SERVICE FABRIC – ACTOR – PATTERNS 7/9/2016 64
  • 65. QESTIONS & ANSWERS Get in Touch Twitter: @Brisebois Blog: http://bit.ly/blog-alex Email: alexandre.brisebois@microsoft.com Service Fabric Resources Documentation: http://aka.ms/servicefabric SDK: http://aka.ms/servicefabricSDK QnA Demo Code: http://bit.ly/git- qna-demo 7/9/2016 65

Notas del editor

  1. A Public Cloud An Architectural Pattern A Hyper-Scale Microservice Platform A Programming Model
  2. Have you seen this picture before? Thinking about what’s next. Pluggable capacity.
  3. The answer is Microservices Let’s start by 3-tier Monolith Then Microservices
  4. From a Dev’s perspective : Simplified architecture (focused) Build, scale, and upgrade services independently
  5. Service Fabric isn’t new, it’s battle tested Used to build Azure itself Same bits that are running in Azure Used to build Hyper-Scale services
  6. Elasticity scale-in scale-out / if needed scale up and down
  7. Breifly Guest & Reliable Services Then Actors