SlideShare una empresa de Scribd logo
1 de 59
Orleans – A “cloud native”
Runtime Built for #Azure
By Alexandre Brisebois
@Brisebois http://bit.ly/1lc9W3Bbrisebois@outlook.com
Forget about 3-tier architectures
They don’t scale!
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Forget about 3-tier architectures
They don’t scale!
• Stateless frontends
• Stateless middle tier
• Storage is the bottleneck
• Latency
• Throughput
• Scalability
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Forget about 3-tier architectures
They don’t scale!
• Much better performance
• Lost semantics of storage
• Lost concurrency control
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
High-scale interactive services
demand high throughput with
low latency and high availability.
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Servers != Services
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Services != Servers
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Meet Actors
They enable applications to attain high performance, reliability and scalability
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Start thinking in terms of Actors
• Performance of cache
• Riche semantics
• Concurrency control
• Horizontal calls are natural
• OOP paradigm
• But there are still challenges
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Challenges with Actor Model Frameworks
• Too low level
• App manages lifecycle of actors, exposed to distributed races
• App has to deal with actor failures, supervision trees
• App manages placement of actors – resource management
• Developer has to be a distributed systems expert
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Welcome to Orleans
https://orleans.codeplex.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
• Virtual Actor model
• Location transparency
• Actors are .Net objects
• Messaging through .Net interfaces
• Asynchronous through async/await in C#
• Automatic error propagation
• Implicit activation & lifecycle management
• Coordinated placement
• Multiplexed communication
• Failure recovery
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Actors are called Grains
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Grains
#2,548,308
#2,031,769
Activation #1 @ 192.168.1.1
Activation #1 @ 192.168.1.5
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Grains: Virtual actors
• Grain instances always exist, virtually
• Needn’t be created, looked up or deleted
• Code can always call methods the grain
• Grains never fail
• Activations are created on-demand
• If there is no existing activation, a message sent to it triggers instantiation
• Lifecycle is managed by the runtime
• Transparent recovery from server failures
• Runtime can create multiple activations of stateless grains (for performance)
• Location transparency
• Grains can pass references to one another around
• References can be persisted to cold-storage
http://bit.ly/1lc9W3B brisebois@outlook.com@Brisebois
Concurrency is hard!
Distribution, high throughput and
low-latency make it even harder
Grains are Single Threaded
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Grain execution model
•Activations are single-threaded
• Optionally re-entrant
• Runtime schedules execution of methods
• Multiplexed across threads
•No shared state
• Avoid races
• No need for locks
•Cooperative multitasking
http://bit.ly/1lc9W3B brisebois@outlook.com@Brisebois
Grain Activations reside in Silos
Think of Silos as virtual memory (RAM)
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
http://bit.ly/Ry526A
Stateful Grain Instances reside in
cold storage
The Activation (state) can be persisted to cold storage
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Hello World!
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
public interface IHello : IGrain
{
Task<string> SayHello(string greeting);
}
Grain interfaces
Marker interface to indicate
grain interfaces
All grain interface methods must
be asynchronous
public class HelloGrain : GrainBase, IHello
{
Task<string> SayHello(string greeting)
{
var resp = "You said: '" + greeting + "', I say: Hello!";
return Task.FromResult(resp);
}
}
Implementing the grain type
private async static Task SendMessage(long grainId)
{
IHello friend = HelloFactory.GetGrain(grainId);
string response = await friend.SayHello("Good morning!");
Console.WriteLine("Response: {0}", response);
}
Talking to grains
Factory Class is auto-generated at
compile time
Grain Id (long , GUID or String)
Give us an other example!
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Azure & Orleans
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Common characteristics
• Large numbers of independent actors
• Free-form relations
• High throughput/low latency
• These generally dictate stateful compute
• Fine-Grained partitioning is natural
• Cloud-based scale-out & elasticity
• Much broader developer audience
Orleans was built for…
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
A cloud native runtime
What does Orleans bring to cloud services
in Azure?
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
• A powerful Virtual Actor concept
• Familiar programming model
• Smooth learning curve for developers new to asynchronous
programming
What does Orleans bring to cloud services
in Azure?
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
• Faster development through separation of concerns (OOP)
• Makes cloud-scale programming attainable
What does Orleans bring to cloud services
in Azure?
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
• Uncompromised performance
• Scalability by default
• Fewer concurrency hazard concerns and headaches
• Simplified failure handling through error propagation
Scalability by default??
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
• Near linear scaling to hundreds of
thousands of requests per second
• Efficient resource usage
• Location transparency simplifies
scaling up or down
• Complements Azure PaaS
• Easily adjust scale over time
Test Lab Numbers
Orleans – A “cloud native”
Runtime Built for #Azure
By Alexandre Brisebois
@Brisebois http://bit.ly/1lc9W3Bbrisebois@outlook.com
Using Orleans to Build Halo 4’s
Distributed Cloud Services in Azure
http://bit.ly/1g6V5c3
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Tackle Distribution, High Throughput
and Low-Latency with Orleans – A
“cloud native” Runtime Built
for #Azure
http://bit.ly/1og5ZOI
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Orleans: Distributed Virtual
Actors for Programmability and
Scalability
http://bit.ly/1gkv43A
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Orleans: Cloud Computing for
Everyone
http://bit.ly/QqiUik
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Orleans: A Framework for Cloud
Computing
http://bit.ly/1hDX4j0
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Scenarios
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Devices send telemetry to the Cloud
Per-device actors process and
pre-aggregate incoming data
Multi-level aggregation by actors
Statistics, predictive analytics, fraud
detection, etc.
Control channel back to devices
Grouping by location, category, etc.
Elastically scales with # of devices
[Near] real-time analytics
Actors hold cache values
Semantic operation on values
Function shipping (method calls)
Coordination across multiple values
Transparent on-demand reactivation
Write-through cache with
optional batching
Intelligent cache
Scenario from Halo 4
@Brisebois http://bit.ly/1lc9W3B brisebois@outlook.com
Near-real-time processing
State is mostly in memory
Constantly evolving social graph
A fraction of total user base online
Very high throughput, low latency
Inherent races
Presence service
Heartbeat
Update game status
Player grain
Client observer

Más contenido relacionado

La actualidad más candente

Nordstrom Data Lab Recommendo API with Node.js
Nordstrom Data Lab Recommendo API with Node.jsNordstrom Data Lab Recommendo API with Node.js
Nordstrom Data Lab Recommendo API with Node.js
David Von Lehman
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Rails
jduff
 

La actualidad más candente (20)

Selenium
SeleniumSelenium
Selenium
 
Getting Started with ASP.NET 5
Getting Started with ASP.NET 5Getting Started with ASP.NET 5
Getting Started with ASP.NET 5
 
10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster
 
Containerize all the things!
Containerize all the things!Containerize all the things!
Containerize all the things!
 
Ruby performance - The low hanging fruit
Ruby performance - The low hanging fruitRuby performance - The low hanging fruit
Ruby performance - The low hanging fruit
 
Nordstrom Data Lab Recommendo API with Node.js
Nordstrom Data Lab Recommendo API with Node.jsNordstrom Data Lab Recommendo API with Node.js
Nordstrom Data Lab Recommendo API with Node.js
 
Scalable game-servers-tgc
Scalable game-servers-tgcScalable game-servers-tgc
Scalable game-servers-tgc
 
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless DreamsRainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
 
RavenDB 4.0
RavenDB 4.0RavenDB 4.0
RavenDB 4.0
 
No Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with BootiqueNo Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with Bootique
 
Scala in the Wild
Scala in the WildScala in the Wild
Scala in the Wild
 
User-percieved performance
User-percieved performanceUser-percieved performance
User-percieved performance
 
A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databases
 
Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
 
Deploying microservices on AWS
Deploying microservices on AWSDeploying microservices on AWS
Deploying microservices on AWS
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend tooling
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Rails
 
ASP.NET vNext
ASP.NET vNextASP.NET vNext
ASP.NET vNext
 
Asynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAsynchronous programming in ASP.NET
Asynchronous programming in ASP.NET
 

Similar a Orleans – a “cloud native” runtime built for #azure

Similar a Orleans – a “cloud native” runtime built for #azure (20)

SAP on Azure Web Dispatcher High Availability
SAP on Azure Web Dispatcher High AvailabilitySAP on Azure Web Dispatcher High Availability
SAP on Azure Web Dispatcher High Availability
 
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
 
"It’s not only Lambda! Economics behind Serverless" at JAX Conference in Mai ...
"It’s not only Lambda! Economics behind Serverless" at JAX Conference in Mai ..."It’s not only Lambda! Economics behind Serverless" at JAX Conference in Mai ...
"It’s not only Lambda! Economics behind Serverless" at JAX Conference in Mai ...
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010
 
Building Real World Application with Azure
Building Real World Application with AzureBuilding Real World Application with Azure
Building Real World Application with Azure
 
Cosmos DB and Azure Functions A serverless database processing.pptx
Cosmos DB and Azure Functions  A serverless database processing.pptxCosmos DB and Azure Functions  A serverless database processing.pptx
Cosmos DB and Azure Functions A serverless database processing.pptx
 
DataWeekender 4_2 Cosmos DB and Azure Functions- A serverless database proces...
DataWeekender 4_2 Cosmos DB and Azure Functions- A serverless database proces...DataWeekender 4_2 Cosmos DB and Azure Functions- A serverless database proces...
DataWeekender 4_2 Cosmos DB and Azure Functions- A serverless database proces...
 
Cloud Messaging with NServiceBus and Microsoft Azure
Cloud Messaging with NServiceBus and Microsoft AzureCloud Messaging with NServiceBus and Microsoft Azure
Cloud Messaging with NServiceBus and Microsoft Azure
 
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
 
The impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenThe impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves Goeleven
 
Microservices & Streaming Data
Microservices & Streaming DataMicroservices & Streaming Data
Microservices & Streaming Data
 
Whats new in Microsoft Windows Server 2016 Clustering and Storage
Whats new in Microsoft Windows Server 2016 Clustering and StorageWhats new in Microsoft Windows Server 2016 Clustering and Storage
Whats new in Microsoft Windows Server 2016 Clustering and Storage
 
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su AzureSql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su Azure
 
Running Galera Cluster on Microsoft Azure
Running Galera Cluster on Microsoft AzureRunning Galera Cluster on Microsoft Azure
Running Galera Cluster on Microsoft Azure
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
 
NSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves GoelevenNSBCon UK nservicebus on Azure by Yves Goeleven
NSBCon UK nservicebus on Azure by Yves Goeleven
 
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
Select Stars: A DBA's Guide to Azure Cosmos DB (Chicago Suburban SQL Server U...
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 

Más de Brisebois

Windows azurewebsites
Windows azurewebsitesWindows azurewebsites
Windows azurewebsites
Brisebois
 
Une RESTful Architecture
Une RESTful ArchitectureUne RESTful Architecture
Une RESTful Architecture
Brisebois
 

Más de Brisebois (6)

Devteach 2016: A practical overview of actors in service fabric
Devteach 2016: A practical overview of actors in service fabricDevteach 2016: A practical overview of actors in service fabric
Devteach 2016: A practical overview of actors in service fabric
 
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?
 
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

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Orleans – a “cloud native” runtime built for #azure