SlideShare a Scribd company logo
1 of 64
 Introduced in 1973!
 An actor is the fundamental unit of computation
 Does some processing
 Holds state
 Communicates with other actors
 Similar to objects in OOP
Actor programming model
alexandre.brisebois@microsoft.com
stephane@stephanelapointe.net
 Demo: Live Q&A app
 Microwhat?
 Service Fabric platform
 Benefits
 Programing models
 Lifecycle management
 Summary
Live Q&A application
http://bit.ly/live-qnaDemo







 Build and operate services at scale
 Agility - faster delivery of features & updates
 Better resource utilization
 Simpler to design
 Faster calls between components
 Testing a single product
 Tightly coupled within the tiered layers
 Harder to perform fixes and upgrades
 Scalability + fast spinup
 Encourage simpler business functionality encapsulation
 Isolated components with independent lifecycle
 Fit the lean startup approach – build, measure, learn, iterate
 Increased number of separate entities
 More complex deployments
 Network latency between microservices
 Easy to endup with a performance nightmare
Stateless microservice
 Has either no state or it can be retrieved from an external store
 There can be N instances
 e.g. web frontends, protocol gateways, Azure Cloud Services etc.
Stateful microservice
 Maintain hard, authoritative state
 N consistent copies achieved through replication and local persistence
 e.g. database, documents, workflow, user profile, shopping cart etc.
A platform for reliable, hyperscale, microservice-based applications
Azure
Windows
Server
Linux
Hosted Clouds
Windows
Server
Linux
Service Fabric
Private Clouds
Windows
Server
Linux
High Availability
Hyper-Scale
Hybrid Operations
High Density
microservices
Rolling Upgrades
Stateful services
Low Latency
Fast startup &
shutdown
Container Orchestration
& lifecycle management
Replication &
Failover
Simple
programming
models
Load balancing
Self-healingData Partitioning
Automated Rollback
Health
Monitoring
Placement
Constraints
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
microservices
 L+S (logic + state) that is independently versioned,
deployed, and scaled
 Has a unique name that can be resolved
e.g. fabric:/myapplication/myservice
 Interacts with other microservices over well defined
interfaces and protocols like REST
 Remains always logically consistent in the presence of
failures
 Hosted inside a “container” (code + config)
 Can be written in any language and framework
.NET, node.js, Java VMs, any EXE
A set of independent
machines; physical or
virtual
A set of machines that
Service Fabric stitches
together to form a
cluster
Clusters can scale to
1000s of machines
Node
Node
Node
Node
Node
Node
System Services
Failover
manager
Cluster
manager
Naming
Image
store
 Each service is backed by replica set to make its
internal state reliable
 All replicas are logically consistent – meaning all
replicas see the same linearized order of read and
write operations to initial state
 Read-Write quorums are supported and are
dynamically adjusted
 Replica set is dynamically reconfigured to account
for replica arrivals and departures
 Massive scale
 No difference between dev and production
 Executables & frameworks can be .NET and/or OSS
 Stateless or Stateful (micro)services
 Simplify application design, stateful service instead of
caches/queues
 Deploy applications in seconds
 Write once, deploy almost anywhere
 Higher density than VM
 Multiple versions of the same application side by side
 No downtime for breaking & nonbreaking upgrades
 Management via .NET APIs, PowerShell or REST
 Upgrade and patch specific microservices
 OOB health & diagnostic
 Automatically adjust to scale up or scale down
 Multiple version of the same application side by side,
each independently upgradable
 Self-healing resource balancer
Service Fabric Applications
Azure Private Clouds
Applications composed of microservices
High Availability
Hyper-Scale
Hybrid Operations
High Density Rolling Upgrades
Stateful services
Low Latency
Fast startup &
shutdown
Container Orchestration
& lifecycle management
Replication & Failover
Simple
programming
models
Load balancing
Self-healingData Partitioning
Automated Rollback
Health
Monitoring
Placement
Constraints
Service Fabric
Application
Package
Unit of
• Lifetime
• Versioning
• Isolation
LiveQnA.API
Service type
LiveQnA
Extensions type
LiveQnA
Pkg
Code Config
LiveQnA
Extensions
Pkg
Application Type




Service
Package
B
Service
Package
A
Service
Package
B
Service
Package
A
Service
Package
B
Service
Package
A
Service
Package
B
Service
Package
A
 Build reliable stateless and stateful objects using a
virtual Actor programming model
 Suitable for applications with multiple independent
units of scale and compute
 Automatic state management and turn based
concurrency
 Actors have an lD that maps to an object
 Service Fabric manages nodes and can
transparently move actors amongst them
(provides HA and scale)
 Actor methods run via turn based concurrency
public interface IMyActor : IActor
{
Task<string> DoWorkAsync();
}
public class MyActor : Actor, IMyActor
{
public async Task<string> DoWorkAsync()
{
…
return await Task.FromResult("result");
}
}
var app = "fabric:/HelloWorld";
var proxy = ActorProxy.Create<IMyActor>
(ActorId.NewId(), app);
var result = proxy.DoWorkAsync().Result;
1.
2.
3. OnActivateSync
4.
1.
2. OnDeactivateSync
3.
Live Q&A application with
Reliable Actors
Demo
 Write services that are reliable, available, scalable
and provide consistency
 More control over data partitioning so you can
determine data relationships and consistency
requirements between chunks of state
 Multithreaded
 Use Reliable Collections to persist state
 More likely to BYO transport (WCF, WebAPI, ..)
Collections
• Single Threaded
Concurrent
Collections
• Multi-Threaded
Reliable
Collections
• Multi-Node
• Replicated (HA)
• Persistence
Option
• Asynchronous
• Transactional
Dictionary<TKey, TValue> ConcurrentDictionary<TKey, TValue> ReliableDictionary<TKey, TValue>
Single Machine Multi-Machine
Use our replicated datastructures or build your own
Data is replicated and durably stored on multiple replicas.
Atomically update one or more collections using transactions.
Reads are repeatable within the transaction.
Enumerations are snapshot based.
Supports LINQ.
IReliableQueue<T>IReliableDictionary<K,V>
Reliable Actors APIs Reliable Services APIs
Your problem space involves many small independent
units of state and logic
You need to maintain logic across multiple components
You want to work with single-threaded objects while still
being able to scale and maintain consistency
You want to use reliable collections (like .NET Dictionary
and Queue) to store and manage your state
You want the framework to manage the concurrency and
granularity of state
You want to control the granularity and concurrency of
your state
You want the platform to manage communication for
you
You want to manage the communication and control the
partitioning scheme for your service



Node
Node
NodeNode
Node
Node
Service
Package
B
Service
Package
A
Application upgrade
Demo







 Generates faults across the entire Service Fabric
cluster
 Compresses faults generally seen in months or years
to a few hours
 Combination of interleaved faults with the high fault
rate finds corner cases that are otherwise missed
 Leads to a significant improvement in the code
quality of the service

 Restart a node
 Restart a deployed code package
 Remove a replica
 Restart a replica
 Move a primary replica (optional)
 Move a secondary replica (optional)
 Failover test

 Restart a deployed code package where the partition is hosted
 Remove a primary/secondary replica or stateless instance
 Restart a primary secondary replica (if a persisted service)
 Move a primary replica
 Move a secondary replica
 Restart the partition
Welcome Chaos
Demo
Stateless services
A service that has state where the state is persisted to external storage, such as Azure databases or
Azure storage
Existing web (ASP.NET) and worker role applications
Stateful services
Reliability of state through replication and local persistence
Reduces latency
Reduces the complexity and number of components in traditional three tier architecture
Existing apps written with other frameworks
node.js, Java VMs, any EXE
 Are microservices for me?
 Use Service Fabric to Reduce the complexities of
building applications with the microservice
approach
 Start small, scale when needed, deprecate
services, add new ones, evolve with customer
usage, that’s the approach.
 Built micro-services using Reliable Actors and
Reliable Services APIs
 Achieve Data Reliability through Stateful Actors and
Reliable Collections
 Scale-out using partitioning
Download the Service Fabric developer SDK
http://aka.ms/ServiceFabric
Download the samples from GitHub
http://aka.ms/ServiceFabricSamples
Learn from the tutorials and videos
http://aka.ms/ServiceFabricDocs
Provide feedback
http://aka.ms/ServiceFabricForum
http://stackoverflow.com/questions/tagged/azure-service-fabric
Twitter hastag #AzureServiceFabric

More Related Content

What's hot

Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
Antonios Chatzipavlis
 
Introducing the WSO2 Complex Event Processor
Introducing the WSO2 Complex Event ProcessorIntroducing the WSO2 Complex Event Processor
Introducing the WSO2 Complex Event Processor
WSO2
 

What's hot (20)

Dataweave nagarjuna
Dataweave nagarjunaDataweave nagarjuna
Dataweave nagarjuna
 
Sql server 2014 online operations
Sql server 2014 online operationsSql server 2014 online operations
Sql server 2014 online operations
 
Spark streaming: Best Practices
Spark streaming: Best PracticesSpark streaming: Best Practices
Spark streaming: Best Practices
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
 
Jump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with DatabricksJump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with Databricks
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014
 
UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...
UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...
UDF/UDAF: the extensibility framework for KSQL (Hojjat Jafapour, Confluent) K...
 
Diving into the Deep End - Kafka Connect
Diving into the Deep End - Kafka ConnectDiving into the Deep End - Kafka Connect
Diving into the Deep End - Kafka Connect
 
Stream and Batch Processing in the Cloud with Data Microservices
Stream and Batch Processing in the Cloud with Data MicroservicesStream and Batch Processing in the Cloud with Data Microservices
Stream and Batch Processing in the Cloud with Data Microservices
 
Building Eventing Systems for Microservice Architecture
Building Eventing Systems for Microservice Architecture  Building Eventing Systems for Microservice Architecture
Building Eventing Systems for Microservice Architecture
 
SQL under the hood
SQL under the hoodSQL under the hood
SQL under the hood
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
 
What's new in Confluent 3.2 and Apache Kafka 0.10.2
What's new in Confluent 3.2 and Apache Kafka 0.10.2 What's new in Confluent 3.2 and Apache Kafka 0.10.2
What's new in Confluent 3.2 and Apache Kafka 0.10.2
 
How easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performanceHow easy (or hard) it is to monitor your graph ql service performance
How easy (or hard) it is to monitor your graph ql service performance
 
Testing batch and streaming Spark applications
Testing batch and streaming Spark applicationsTesting batch and streaming Spark applications
Testing batch and streaming Spark applications
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0
 
The Power of the Log
The Power of the LogThe Power of the Log
The Power of the Log
 
Introducing the WSO2 Complex Event Processor
Introducing the WSO2 Complex Event ProcessorIntroducing the WSO2 Complex Event Processor
Introducing the WSO2 Complex Event Processor
 
Amazon DynamoDB 深入探討
Amazon DynamoDB 深入探討Amazon DynamoDB 深入探討
Amazon DynamoDB 深入探討
 
Jack Gudenkauf sparkug_20151207_7
Jack Gudenkauf sparkug_20151207_7Jack Gudenkauf sparkug_20151207_7
Jack Gudenkauf sparkug_20151207_7
 

Viewers also liked

Viewers also liked (18)

Introduction to Databases - query optimizations for MySQL
Introduction to Databases - query optimizations for MySQLIntroduction to Databases - query optimizations for MySQL
Introduction to Databases - query optimizations for MySQL
 
ASP.Net Core Deep Dive into MVC
ASP.Net Core Deep Dive into MVCASP.Net Core Deep Dive into MVC
ASP.Net Core Deep Dive into MVC
 
Scheme for Allocation of Solar Power Projects to Land Owning Farmers in Punjab
Scheme for Allocation of Solar Power Projects to Land Owning Farmers in PunjabScheme for Allocation of Solar Power Projects to Land Owning Farmers in Punjab
Scheme for Allocation of Solar Power Projects to Land Owning Farmers in Punjab
 
RfS for 50 MW in Solar Power projects Himachal Pradesh under NSM Ph-II, Batch...
RfS for 50 MW in Solar Power projects Himachal Pradesh under NSM Ph-II, Batch...RfS for 50 MW in Solar Power projects Himachal Pradesh under NSM Ph-II, Batch...
RfS for 50 MW in Solar Power projects Himachal Pradesh under NSM Ph-II, Batch...
 
Java Generics - Quiz Questions
Java Generics - Quiz QuestionsJava Generics - Quiz Questions
Java Generics - Quiz Questions
 
Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams)
Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams)Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams)
Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams)
 
DevOps is the Answer... What was the question again? DevOps and Digital Trans...
DevOps is the Answer... What was the question again? DevOps and Digital Trans...DevOps is the Answer... What was the question again? DevOps and Digital Trans...
DevOps is the Answer... What was the question again? DevOps and Digital Trans...
 
Jean-René Roy : The Modern DBA
Jean-René Roy : The Modern DBAJean-René Roy : The Modern DBA
Jean-René Roy : The Modern DBA
 
DevOps: The Key to IT Performance
DevOps: The Key to IT PerformanceDevOps: The Key to IT Performance
DevOps: The Key to IT Performance
 
Cirrosis of liver and its complication and traetment of hep b and c
Cirrosis of liver and its complication and traetment of hep b and cCirrosis of liver and its complication and traetment of hep b and c
Cirrosis of liver and its complication and traetment of hep b and c
 
How ddd, cqrs and event sourcing constitute the architecture of the future
How ddd, cqrs and event sourcing constitute the architecture of the futureHow ddd, cqrs and event sourcing constitute the architecture of the future
How ddd, cqrs and event sourcing constitute the architecture of the future
 
Docker Networking & Swarm Mode Introduction
Docker Networking & Swarm Mode IntroductionDocker Networking & Swarm Mode Introduction
Docker Networking & Swarm Mode Introduction
 
Software Architecture - Quiz Questions
Software Architecture - Quiz QuestionsSoftware Architecture - Quiz Questions
Software Architecture - Quiz Questions
 
Modelagem
ModelagemModelagem
Modelagem
 
SOLID Principles and Design Patterns
SOLID Principles and Design PatternsSOLID Principles and Design Patterns
SOLID Principles and Design Patterns
 
Developing functional domain models with event sourcing (sbtb, sbtb2015)
Developing functional domain models with event sourcing (sbtb, sbtb2015)Developing functional domain models with event sourcing (sbtb, sbtb2015)
Developing functional domain models with event sourcing (sbtb, sbtb2015)
 
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 

Similar to Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Service Fabric

Ukfs Snr Dev Arch Forum Pres2 St
Ukfs Snr Dev Arch Forum Pres2 StUkfs Snr Dev Arch Forum Pres2 St
Ukfs Snr Dev Arch Forum Pres2 St
AllyWick
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
Jorgen Thelin
 

Similar to Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Service Fabric (20)

Azure Service Fabric Overview
Azure Service Fabric OverviewAzure Service Fabric Overview
Azure Service Fabric Overview
 
Introduction To Cloud Computing
Introduction To Cloud ComputingIntroduction To Cloud Computing
Introduction To Cloud Computing
 
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
 
Microsoft Azure Cloud Basics Tutorial
Microsoft Azure Cloud Basics TutorialMicrosoft Azure Cloud Basics Tutorial
Microsoft Azure Cloud Basics Tutorial
 
Scalable Service Architectures
Scalable Service ArchitecturesScalable Service Architectures
Scalable Service Architectures
 
Netflix Cloud Architecture and Open Source
Netflix Cloud Architecture and Open SourceNetflix Cloud Architecture and Open Source
Netflix Cloud Architecture and Open Source
 
Server Farms and XML Web Services
Server Farms and XML Web ServicesServer Farms and XML Web Services
Server Farms and XML Web Services
 
Scalable service architectures @ VDB16
Scalable service architectures @ VDB16Scalable service architectures @ VDB16
Scalable service architectures @ VDB16
 
Architectural Refactoring
Architectural RefactoringArchitectural Refactoring
Architectural Refactoring
 
Designing distributed systems
Designing distributed systemsDesigning distributed systems
Designing distributed systems
 
Ukfs Snr Dev Arch Forum Pres2 St
Ukfs Snr Dev Arch Forum Pres2 StUkfs Snr Dev Arch Forum Pres2 St
Ukfs Snr Dev Arch Forum Pres2 St
 
Developing Actors in Azure with .net
Developing Actors in Azure with .netDeveloping Actors in Azure with .net
Developing Actors in Azure with .net
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
Microservices with Azure Service Fabric
Microservices with Azure Service FabricMicroservices with Azure Service Fabric
Microservices with Azure Service Fabric
 
Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
 
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
 
12-Factor App
12-Factor App12-Factor App
12-Factor App
 
Scalable service architectures @ BWS16
Scalable service architectures @ BWS16Scalable service architectures @ BWS16
Scalable service architectures @ BWS16
 
Day Of Cloud - Windows Azure Platform
Day Of Cloud - Windows Azure PlatformDay Of Cloud - Windows Azure Platform
Day Of Cloud - Windows Azure Platform
 

More from MSDEVMTL

More from MSDEVMTL (20)

Intro grpc.net
Intro  grpc.netIntro  grpc.net
Intro grpc.net
 
Grpc and asp.net partie 2
Grpc and asp.net partie 2Grpc and asp.net partie 2
Grpc and asp.net partie 2
 
Property based testing
Property based testingProperty based testing
Property based testing
 
Improve cloud visibility and cost in Microsoft Azure
Improve cloud visibility and cost in Microsoft AzureImprove cloud visibility and cost in Microsoft Azure
Improve cloud visibility and cost in Microsoft Azure
 
Return on Ignite 2019: Azure, .NET, A.I. & Data
Return on Ignite 2019: Azure, .NET, A.I. & DataReturn on Ignite 2019: Azure, .NET, A.I. & Data
Return on Ignite 2019: Azure, .NET, A.I. & Data
 
C sharp 8.0 new features
C sharp 8.0 new featuresC sharp 8.0 new features
C sharp 8.0 new features
 
Asp.net core 3
Asp.net core 3Asp.net core 3
Asp.net core 3
 
MSDEVMTL Informations 2019
MSDEVMTL Informations 2019MSDEVMTL Informations 2019
MSDEVMTL Informations 2019
 
Common features in webapi aspnetcore
Common features in webapi aspnetcoreCommon features in webapi aspnetcore
Common features in webapi aspnetcore
 
Groupe Excel et Power BI - Rencontre du 25 septembre 2018
Groupe Excel et Power BI  - Rencontre du 25 septembre 2018Groupe Excel et Power BI  - Rencontre du 25 septembre 2018
Groupe Excel et Power BI - Rencontre du 25 septembre 2018
 
Api gateway
Api gatewayApi gateway
Api gateway
 
Common features in webapi aspnetcore
Common features in webapi aspnetcoreCommon features in webapi aspnetcore
Common features in webapi aspnetcore
 
Stephane Lapointe: Governance in Azure, keep control of your environments
Stephane Lapointe: Governance in Azure, keep control of your environmentsStephane Lapointe: Governance in Azure, keep control of your environments
Stephane Lapointe: Governance in Azure, keep control of your environments
 
Eric Routhier: Garder le contrôle sur vos coûts Azure
Eric Routhier: Garder le contrôle sur vos coûts AzureEric Routhier: Garder le contrôle sur vos coûts Azure
Eric Routhier: Garder le contrôle sur vos coûts Azure
 
Data science presentation
Data science presentationData science presentation
Data science presentation
 
Michel Ouellette + Gabriel Lainesse: Process Automation & Data Analytics at S...
Michel Ouellette + Gabriel Lainesse: Process Automation & Data Analytics at S...Michel Ouellette + Gabriel Lainesse: Process Automation & Data Analytics at S...
Michel Ouellette + Gabriel Lainesse: Process Automation & Data Analytics at S...
 
Open id connect, azure ad, angular 5, web api core
Open id connect, azure ad, angular 5, web api coreOpen id connect, azure ad, angular 5, web api core
Open id connect, azure ad, angular 5, web api core
 
Yoann Clombe : Fail fast, iterate quickly with power bi and google analytics
Yoann Clombe : Fail fast, iterate quickly with power bi and google analyticsYoann Clombe : Fail fast, iterate quickly with power bi and google analytics
Yoann Clombe : Fail fast, iterate quickly with power bi and google analytics
 
CAE: etude de cas - Rolling Average
CAE: etude de cas - Rolling AverageCAE: etude de cas - Rolling Average
CAE: etude de cas - Rolling Average
 
CAE: etude de cas
CAE: etude de casCAE: etude de cas
CAE: etude de cas
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Service Fabric

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.  Introduced in 1973!  An actor is the fundamental unit of computation  Does some processing  Holds state  Communicates with other actors  Similar to objects in OOP Actor programming model
  • 8.  Demo: Live Q&A app  Microwhat?  Service Fabric platform  Benefits  Programing models  Lifecycle management  Summary
  • 10.
  • 13.  Build and operate services at scale  Agility - faster delivery of features & updates  Better resource utilization
  • 14.  Simpler to design  Faster calls between components  Testing a single product  Tightly coupled within the tiered layers  Harder to perform fixes and upgrades
  • 15.  Scalability + fast spinup  Encourage simpler business functionality encapsulation  Isolated components with independent lifecycle  Fit the lean startup approach – build, measure, learn, iterate  Increased number of separate entities  More complex deployments  Network latency between microservices  Easy to endup with a performance nightmare
  • 16.
  • 17.
  • 18. Stateless microservice  Has either no state or it can be retrieved from an external store  There can be N instances  e.g. web frontends, protocol gateways, Azure Cloud Services etc. Stateful microservice  Maintain hard, authoritative state  N consistent copies achieved through replication and local persistence  e.g. database, documents, workflow, user profile, shopping cart etc.
  • 19.
  • 20. A platform for reliable, hyperscale, microservice-based applications Azure Windows Server Linux Hosted Clouds Windows Server Linux Service Fabric Private Clouds Windows Server Linux High Availability Hyper-Scale Hybrid Operations High Density microservices Rolling Upgrades Stateful services Low Latency Fast startup & shutdown Container Orchestration & lifecycle management Replication & Failover Simple programming models Load balancing Self-healingData Partitioning Automated Rollback Health Monitoring Placement Constraints
  • 21.
  • 22. 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 microservices
  • 23.  L+S (logic + state) that is independently versioned, deployed, and scaled  Has a unique name that can be resolved e.g. fabric:/myapplication/myservice  Interacts with other microservices over well defined interfaces and protocols like REST  Remains always logically consistent in the presence of failures  Hosted inside a “container” (code + config)  Can be written in any language and framework .NET, node.js, Java VMs, any EXE
  • 24. A set of independent machines; physical or virtual
  • 25. A set of machines that Service Fabric stitches together to form a cluster Clusters can scale to 1000s of machines Node Node Node Node Node Node
  • 27.
  • 28.
  • 29.  Each service is backed by replica set to make its internal state reliable  All replicas are logically consistent – meaning all replicas see the same linearized order of read and write operations to initial state  Read-Write quorums are supported and are dynamically adjusted  Replica set is dynamically reconfigured to account for replica arrivals and departures
  • 30.
  • 31.  Massive scale  No difference between dev and production  Executables & frameworks can be .NET and/or OSS  Stateless or Stateful (micro)services  Simplify application design, stateful service instead of caches/queues
  • 32.  Deploy applications in seconds  Write once, deploy almost anywhere  Higher density than VM  Multiple versions of the same application side by side  No downtime for breaking & nonbreaking upgrades
  • 33.  Management via .NET APIs, PowerShell or REST  Upgrade and patch specific microservices  OOB health & diagnostic  Automatically adjust to scale up or scale down  Multiple version of the same application side by side, each independently upgradable  Self-healing resource balancer
  • 34.
  • 35. Service Fabric Applications Azure Private Clouds Applications composed of microservices High Availability Hyper-Scale Hybrid Operations High Density Rolling Upgrades Stateful services Low Latency Fast startup & shutdown Container Orchestration & lifecycle management Replication & Failover Simple programming models Load balancing Self-healingData Partitioning Automated Rollback Health Monitoring Placement Constraints Service Fabric
  • 36. Application Package Unit of • Lifetime • Versioning • Isolation LiveQnA.API Service type LiveQnA Extensions type LiveQnA Pkg Code Config LiveQnA Extensions Pkg Application Type
  • 38.
  • 39.  Build reliable stateless and stateful objects using a virtual Actor programming model  Suitable for applications with multiple independent units of scale and compute  Automatic state management and turn based concurrency
  • 40.  Actors have an lD that maps to an object  Service Fabric manages nodes and can transparently move actors amongst them (provides HA and scale)  Actor methods run via turn based concurrency
  • 41. public interface IMyActor : IActor { Task<string> DoWorkAsync(); }
  • 42. public class MyActor : Actor, IMyActor { public async Task<string> DoWorkAsync() { … return await Task.FromResult("result"); } }
  • 43. var app = "fabric:/HelloWorld"; var proxy = ActorProxy.Create<IMyActor> (ActorId.NewId(), app); var result = proxy.DoWorkAsync().Result;
  • 44.
  • 47. Live Q&A application with Reliable Actors Demo
  • 48.
  • 49.  Write services that are reliable, available, scalable and provide consistency  More control over data partitioning so you can determine data relationships and consistency requirements between chunks of state  Multithreaded  Use Reliable Collections to persist state  More likely to BYO transport (WCF, WebAPI, ..)
  • 50. Collections • Single Threaded Concurrent Collections • Multi-Threaded Reliable Collections • Multi-Node • Replicated (HA) • Persistence Option • Asynchronous • Transactional Dictionary<TKey, TValue> ConcurrentDictionary<TKey, TValue> ReliableDictionary<TKey, TValue> Single Machine Multi-Machine Use our replicated datastructures or build your own
  • 51. Data is replicated and durably stored on multiple replicas. Atomically update one or more collections using transactions. Reads are repeatable within the transaction. Enumerations are snapshot based. Supports LINQ. IReliableQueue<T>IReliableDictionary<K,V>
  • 52. Reliable Actors APIs Reliable Services APIs Your problem space involves many small independent units of state and logic You need to maintain logic across multiple components You want to work with single-threaded objects while still being able to scale and maintain consistency You want to use reliable collections (like .NET Dictionary and Queue) to store and manage your state You want the framework to manage the concurrency and granularity of state You want to control the granularity and concurrency of your state You want the platform to manage communication for you You want to manage the communication and control the partitioning scheme for your service
  • 53.
  • 57.  Generates faults across the entire Service Fabric cluster  Compresses faults generally seen in months or years to a few hours  Combination of interleaved faults with the high fault rate finds corner cases that are otherwise missed  Leads to a significant improvement in the code quality of the service
  • 58.   Restart a node  Restart a deployed code package  Remove a replica  Restart a replica  Move a primary replica (optional)  Move a secondary replica (optional)  Failover test
  • 59.   Restart a deployed code package where the partition is hosted  Remove a primary/secondary replica or stateless instance  Restart a primary secondary replica (if a persisted service)  Move a primary replica  Move a secondary replica  Restart the partition
  • 61. Stateless services A service that has state where the state is persisted to external storage, such as Azure databases or Azure storage Existing web (ASP.NET) and worker role applications Stateful services Reliability of state through replication and local persistence Reduces latency Reduces the complexity and number of components in traditional three tier architecture Existing apps written with other frameworks node.js, Java VMs, any EXE
  • 62.  Are microservices for me?  Use Service Fabric to Reduce the complexities of building applications with the microservice approach  Start small, scale when needed, deprecate services, add new ones, evolve with customer usage, that’s the approach.
  • 63.  Built micro-services using Reliable Actors and Reliable Services APIs  Achieve Data Reliability through Stateful Actors and Reliable Collections  Scale-out using partitioning
  • 64. Download the Service Fabric developer SDK http://aka.ms/ServiceFabric Download the samples from GitHub http://aka.ms/ServiceFabricSamples Learn from the tutorials and videos http://aka.ms/ServiceFabricDocs Provide feedback http://aka.ms/ServiceFabricForum http://stackoverflow.com/questions/tagged/azure-service-fabric Twitter hastag #AzureServiceFabric