SlideShare a Scribd company logo
Massively Scalable
.NET Web Services w/
Project Orleans
DECEMBER 5TH 2016 – NEWMAN SCOTT HUNTER
SCOTT@DRIFTLOGIC.NET
SCOTTHUNTER@EA.COM
Who is this guy?
Agenda
• Introducing Orleans
• Basic Actor Concepts
• OrleansTerminology
• Orleans in Action
• Use Cases and Gotchas
What is Orleans?
• .NET Framework used to create
Scalable, Distributed, .NET Applications
• Focused on low response latency and
high concurrency
• Usable in any .NET application (but
frequently used with WebAPI
Applications)
• Based on a system of VirtualActors
What are Actors?
What are Actors?
A framework for concurrency based on Message
Passing between objects that eliminates (or
greatly reduces) the developer overhead involved
in multithreaded development.
Thread One Thread Two Thread Three
Memory
Memory
Memory
Memory
Thread A Thread B
Orleans Terminology
What are actors?
• Actors have ‘message boxes’ where actions to be performed by the actor are
stored, and processed in the order they arrive.
• Actor message execution is typically single threaded*
• BecauseActors only execute messages stored in their inbox and can only
send messages to other Actors via their inboxes, issues with concurrency are
minimized*
What are VIRTUAL actors?
• Must be instantiated before
messages can be received.
Concrete Actors
• Can be messaged regardless
if they have been created.
Virtual Actors
Orleans Terminology
• Each Orleans ‘Actor’ is a ‘Grain’. A grain SHOULD correspond
to a discrete unit.
Orleans Terminology
• Each ‘Grain’ receives one ‘Turn’ when executing awaiting
messages, and may send messages to other ‘Grain’s
Orleans Terminology
• Each ‘Grain’ must be created in a ‘Silo’.A silo is a process
containing the activated ‘Grains’, managers for activation and
persistence, messaging, grain directory, and scheduler.
Messaging / Serialization
Persistence /
Activation Manager
Actor Directory
Scheduler
Orleans Terminology
• A cluster consists of multiple silos. Each silo maintains a
directory of Grains activated within it and will pass messages to
grains created in other silos, if active.
Orleans Terminology
• Each Silo has a client access port, so requests to any grain can
be addressed to any silo.
Orleans Terminology
IIS
Orleans in Action
Orleans in Action
• Three core components
• Interface
• Implementation
• Access
Orleans in Action
Orleans in Action
• Possible Grain Keys (As Defined by the Interface)
• Guid
• Long
• String
• ‘Compound Primary’
• Hash of a GUID and a Long
Orleans in Action
• Grain Keys control the activation of each grain (Remember that each
grain has STATE and is backed by a datastore)
• Grain Activation (and destruction) has an overhead, but can also be
choke points.
• Keys for grains should be designed around the use case.
Orleans in Action
Use Case
• Working with User Information
• Performing Requests on
Multiple Users (in the same
request)
• Working with Group Session
Example Grain Key
• User ID (LONG or STRING)
• CONST LONG
• GUID (tracked within the
requesting client OR a grain)
Orleans in Action
Orleans in Action
Use Cases and Gotchas
Use Cases and Gotchas
[StatelessWorker]
• By default, Orleans activates only ONE copy of a grain across all silos.
• If a Grain is marked as StatelessWorker, then multiple copies of the
same grain will be created, per silo, as needed.
• If existing workers are busy, additional instances are created within the
silos automatically.
Use Cases and Gotchas
Scaling Orleans
• New Silos can be added at any time.
• Created grains do not redistribute, once a grain is created, it is tied to
the created silo
• To redistribute at high load, the cluster needs to be restarted, so that
grains are reactivated.
Use Cases and Gotchas
Orleans + Sharding
• For maximum impact, data storage needs to be SHARDED.
• If all grains perform data access on the same table (or document), then
Orleans makes it easier to overwhelm any particular table.
• Grains make it easier to fully utilize sharded data stores for maximum
throughput.
More Info
Orleans Homepage
https://dotnet.github.io/orleans/
Halo 4Web Services in Orleans
https://www.youtube.com/watch?v=rEa2nQrpEhc
Orleans MSR Home Page
https://www.microsoft.com/en-us/research/project/orleans-virtual-actors/
Azure ReliableActors
https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-actors-get-started
Java Orbit
https://github.com/orbit/orbit
Newman Scott Hunter
scott@driftlogic.net
scotthunter@ea.com

More Related Content

What's hot

Apache Solr 5.0 and beyond
Apache Solr 5.0 and beyondApache Solr 5.0 and beyond
Apache Solr 5.0 and beyond
Anshum Gupta
 
Akka.Net Overview
Akka.Net OverviewAkka.Net Overview
Akka.Net Overview
Geoffrey Vandiest
 
Rethinking the debugger
Rethinking the debuggerRethinking the debugger
Rethinking the debugger
Iulian Dragos
 
What's new in Solr 5.0
What's new in Solr 5.0What's new in Solr 5.0
What's new in Solr 5.0
Anshum Gupta
 
What's New in Apache Solr 4.10
What's New in Apache Solr 4.10What's New in Apache Solr 4.10
What's New in Apache Solr 4.10
Anshum Gupta
 
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
PAPIs.io
 
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
Andrus Adamchik
 
SolrCloud Cluster management via APIs
SolrCloud Cluster management via APIsSolrCloud Cluster management via APIs
SolrCloud Cluster management via APIs
Anshum Gupta
 
InfectNet Technical
InfectNet TechnicalInfectNet Technical
InfectNet Technical
Attila Bagossy
 
Scaling SolrCloud to a large number of Collections
Scaling SolrCloud to a large number of CollectionsScaling SolrCloud to a large number of Collections
Scaling SolrCloud to a large number of Collections
Anshum Gupta
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka Cluster
Konstantin Tsykulenko
 
Standard libraries with_xamarin
Standard libraries with_xamarinStandard libraries with_xamarin
Standard libraries with_xamarin
Ken Tucker
 
Solr security frameworks
Solr security frameworksSolr security frameworks
Solr security frameworks
Anshum Gupta
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
Yung-Lin Ho
 
Understanding the Solr security framework - Lucene Solr Revolution 2015
Understanding the Solr security framework - Lucene Solr Revolution 2015Understanding the Solr security framework - Lucene Solr Revolution 2015
Understanding the Solr security framework - Lucene Solr Revolution 2015
Anshum Gupta
 
Intro to Apache Solr
Intro to Apache SolrIntro to Apache Solr
Intro to Apache Solr
Shalin Shekhar Mangar
 
Dev-Friendly Ops
Dev-Friendly OpsDev-Friendly Ops
Dev-Friendly Ops
Josh Schramm
 
Hashicorp Products Overview
Hashicorp Products OverviewHashicorp Products Overview
Hashicorp Products Overview
Uchit Vyas ☁
 
Actor model : A Different Concurrency Approach
Actor model : A Different Concurrency ApproachActor model : A Different Concurrency Approach
Actor model : A Different Concurrency Approach
Emre Akış
 
Taming Pythons with ZooKeeper (Pyconfi edition)
Taming Pythons with ZooKeeper (Pyconfi edition)Taming Pythons with ZooKeeper (Pyconfi edition)
Taming Pythons with ZooKeeper (Pyconfi edition)
Jyrki Pulliainen
 

What's hot (20)

Apache Solr 5.0 and beyond
Apache Solr 5.0 and beyondApache Solr 5.0 and beyond
Apache Solr 5.0 and beyond
 
Akka.Net Overview
Akka.Net OverviewAkka.Net Overview
Akka.Net Overview
 
Rethinking the debugger
Rethinking the debuggerRethinking the debugger
Rethinking the debugger
 
What's new in Solr 5.0
What's new in Solr 5.0What's new in Solr 5.0
What's new in Solr 5.0
 
What's New in Apache Solr 4.10
What's New in Apache Solr 4.10What's New in Apache Solr 4.10
What's New in Apache Solr 4.10
 
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
 
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
 
SolrCloud Cluster management via APIs
SolrCloud Cluster management via APIsSolrCloud Cluster management via APIs
SolrCloud Cluster management via APIs
 
InfectNet Technical
InfectNet TechnicalInfectNet Technical
InfectNet Technical
 
Scaling SolrCloud to a large number of Collections
Scaling SolrCloud to a large number of CollectionsScaling SolrCloud to a large number of Collections
Scaling SolrCloud to a large number of Collections
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka Cluster
 
Standard libraries with_xamarin
Standard libraries with_xamarinStandard libraries with_xamarin
Standard libraries with_xamarin
 
Solr security frameworks
Solr security frameworksSolr security frameworks
Solr security frameworks
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
 
Understanding the Solr security framework - Lucene Solr Revolution 2015
Understanding the Solr security framework - Lucene Solr Revolution 2015Understanding the Solr security framework - Lucene Solr Revolution 2015
Understanding the Solr security framework - Lucene Solr Revolution 2015
 
Intro to Apache Solr
Intro to Apache SolrIntro to Apache Solr
Intro to Apache Solr
 
Dev-Friendly Ops
Dev-Friendly OpsDev-Friendly Ops
Dev-Friendly Ops
 
Hashicorp Products Overview
Hashicorp Products OverviewHashicorp Products Overview
Hashicorp Products Overview
 
Actor model : A Different Concurrency Approach
Actor model : A Different Concurrency ApproachActor model : A Different Concurrency Approach
Actor model : A Different Concurrency Approach
 
Taming Pythons with ZooKeeper (Pyconfi edition)
Taming Pythons with ZooKeeper (Pyconfi edition)Taming Pythons with ZooKeeper (Pyconfi edition)
Taming Pythons with ZooKeeper (Pyconfi edition)
 

Viewers also liked

Orleans Cloud Computing
Orleans Cloud Computing  Orleans Cloud Computing
Orleans Cloud Computing
Huzaifa zafar
 
Phoenix Framework for the realtime web
Phoenix Framework for the realtime webPhoenix Framework for the realtime web
Phoenix Framework for the realtime web
Pedro Medeiros
 
Обзор фреймворка Twisted
Обзор фреймворка TwistedОбзор фреймворка Twisted
Обзор фреймворка Twisted
Python Meetup
 
Comparing different concurrency models on the JVM
Comparing different concurrency models on the JVMComparing different concurrency models on the JVM
Comparing different concurrency models on the JVM
Mario Fusco
 
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?
João Pedro Martins
 
Антон Молдован "Building data intensive stateful services with Orleans"
Антон Молдован "Building data intensive stateful services with Orleans"Антон Молдован "Building data intensive stateful services with Orleans"
Антон Молдован "Building data intensive stateful services with Orleans"
Fwdays
 
Designing Teams for Emerging Challenges
Designing Teams for Emerging ChallengesDesigning Teams for Emerging Challenges
Designing Teams for Emerging Challenges
Aaron Irizarry
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
Natasha Murashev
 

Viewers also liked (8)

Orleans Cloud Computing
Orleans Cloud Computing  Orleans Cloud Computing
Orleans Cloud Computing
 
Phoenix Framework for the realtime web
Phoenix Framework for the realtime webPhoenix Framework for the realtime web
Phoenix Framework for the realtime web
 
Обзор фреймворка Twisted
Обзор фреймворка TwistedОбзор фреймворка Twisted
Обзор фреймворка Twisted
 
Comparing different concurrency models on the JVM
Comparing different concurrency models on the JVMComparing different concurrency models on the JVM
Comparing different concurrency models on the JVM
 
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?
 
Антон Молдован "Building data intensive stateful services with Orleans"
Антон Молдован "Building data intensive stateful services with Orleans"Антон Молдован "Building data intensive stateful services with Orleans"
Антон Молдован "Building data intensive stateful services with Orleans"
 
Designing Teams for Emerging Challenges
Designing Teams for Emerging ChallengesDesigning Teams for Emerging Challenges
Designing Teams for Emerging Challenges
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similar to Massively Scaleable .NET Web Services with Project Orleans

Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASS DBA Virtu...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASS DBA Virtu...Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASS DBA Virtu...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASS DBA Virtu...
Bob Pusateri
 
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
Shalin Shekhar Mangar
 
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASSDC User Gr...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASSDC User Gr...Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASSDC User Gr...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASSDC User Gr...
Bob Pusateri
 
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (New England SQ...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (New England SQ...Locks, Blocks, and Snapshots: Maximizing Database Concurrency (New England SQ...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (New England SQ...
Bob Pusateri
 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platform
Tommaso Teofili
 
Akka Actors
Akka ActorsAkka Actors
Akka Actors
Dylan Forciea
 
Build distributed, highly scalable applications in .NET using Microsoft Orleans
Build distributed, highly scalable applications in .NET using Microsoft OrleansBuild distributed, highly scalable applications in .NET using Microsoft Orleans
Build distributed, highly scalable applications in .NET using Microsoft Orleans
WinWire Technologies Inc
 
Enterprise Search Using Apache Solr
Enterprise Search Using Apache SolrEnterprise Search Using Apache Solr
Enterprise Search Using Apache Solr
sagar chaturvedi
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloud
Anshum Gupta
 
Roaring with elastic search sangam2018
Roaring with elastic search sangam2018Roaring with elastic search sangam2018
Roaring with elastic search sangam2018
Vinay Kumar
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
Abdelmonaim Remani
 
Thread
ThreadThread
Thread
sajidhuseyin
 
Thread
ThreadThread
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
jaxconf
 
Solr Recipes
Solr RecipesSolr Recipes
Solr Recipes
Erik Hatcher
 
Building and Running Solr-as-a-Service: Presented by Shai Erera, IBM
Building and Running Solr-as-a-Service: Presented by Shai Erera, IBMBuilding and Running Solr-as-a-Service: Presented by Shai Erera, IBM
Building and Running Solr-as-a-Service: Presented by Shai Erera, IBM
Lucidworks
 
Performance optimization - JavaScript
Performance optimization - JavaScriptPerformance optimization - JavaScript
Performance optimization - JavaScript
Filip Mares
 
Shard-Query, an MPP database for the cloud using the LAMP stack
Shard-Query, an MPP database for the cloud using the LAMP stackShard-Query, an MPP database for the cloud using the LAMP stack
Shard-Query, an MPP database for the cloud using the LAMP stack
Justin Swanhart
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
Newlink
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
Newlink
 

Similar to Massively Scaleable .NET Web Services with Project Orleans (20)

Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASS DBA Virtu...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASS DBA Virtu...Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASS DBA Virtu...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASS DBA Virtu...
 
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
 
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASSDC User Gr...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASSDC User Gr...Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASSDC User Gr...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (PASSDC User Gr...
 
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (New England SQ...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (New England SQ...Locks, Blocks, and Snapshots: Maximizing Database Concurrency (New England SQ...
Locks, Blocks, and Snapshots: Maximizing Database Concurrency (New England SQ...
 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platform
 
Akka Actors
Akka ActorsAkka Actors
Akka Actors
 
Build distributed, highly scalable applications in .NET using Microsoft Orleans
Build distributed, highly scalable applications in .NET using Microsoft OrleansBuild distributed, highly scalable applications in .NET using Microsoft Orleans
Build distributed, highly scalable applications in .NET using Microsoft Orleans
 
Enterprise Search Using Apache Solr
Enterprise Search Using Apache SolrEnterprise Search Using Apache Solr
Enterprise Search Using Apache Solr
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloud
 
Roaring with elastic search sangam2018
Roaring with elastic search sangam2018Roaring with elastic search sangam2018
Roaring with elastic search sangam2018
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
 
Thread
ThreadThread
Thread
 
Thread
ThreadThread
Thread
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
 
Solr Recipes
Solr RecipesSolr Recipes
Solr Recipes
 
Building and Running Solr-as-a-Service: Presented by Shai Erera, IBM
Building and Running Solr-as-a-Service: Presented by Shai Erera, IBMBuilding and Running Solr-as-a-Service: Presented by Shai Erera, IBM
Building and Running Solr-as-a-Service: Presented by Shai Erera, IBM
 
Performance optimization - JavaScript
Performance optimization - JavaScriptPerformance optimization - JavaScript
Performance optimization - JavaScript
 
Shard-Query, an MPP database for the cloud using the LAMP stack
Shard-Query, an MPP database for the cloud using the LAMP stackShard-Query, an MPP database for the cloud using the LAMP stack
Shard-Query, an MPP database for the cloud using the LAMP stack
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 

Recently uploaded

Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
Madan Karki
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
TaghreedAltamimi
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
MiscAnnoy1
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 

Recently uploaded (20)

Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 

Massively Scaleable .NET Web Services with Project Orleans

  • 1. Massively Scalable .NET Web Services w/ Project Orleans DECEMBER 5TH 2016 – NEWMAN SCOTT HUNTER SCOTT@DRIFTLOGIC.NET SCOTTHUNTER@EA.COM
  • 2. Who is this guy?
  • 3. Agenda • Introducing Orleans • Basic Actor Concepts • OrleansTerminology • Orleans in Action • Use Cases and Gotchas
  • 4. What is Orleans? • .NET Framework used to create Scalable, Distributed, .NET Applications • Focused on low response latency and high concurrency • Usable in any .NET application (but frequently used with WebAPI Applications) • Based on a system of VirtualActors
  • 6. What are Actors? A framework for concurrency based on Message Passing between objects that eliminates (or greatly reduces) the developer overhead involved in multithreaded development.
  • 7. Thread One Thread Two Thread Three Memory
  • 12. What are actors? • Actors have ‘message boxes’ where actions to be performed by the actor are stored, and processed in the order they arrive. • Actor message execution is typically single threaded* • BecauseActors only execute messages stored in their inbox and can only send messages to other Actors via their inboxes, issues with concurrency are minimized*
  • 13. What are VIRTUAL actors? • Must be instantiated before messages can be received. Concrete Actors • Can be messaged regardless if they have been created. Virtual Actors
  • 14. Orleans Terminology • Each Orleans ‘Actor’ is a ‘Grain’. A grain SHOULD correspond to a discrete unit.
  • 15. Orleans Terminology • Each ‘Grain’ receives one ‘Turn’ when executing awaiting messages, and may send messages to other ‘Grain’s
  • 16. Orleans Terminology • Each ‘Grain’ must be created in a ‘Silo’.A silo is a process containing the activated ‘Grains’, managers for activation and persistence, messaging, grain directory, and scheduler. Messaging / Serialization Persistence / Activation Manager Actor Directory Scheduler
  • 17. Orleans Terminology • A cluster consists of multiple silos. Each silo maintains a directory of Grains activated within it and will pass messages to grains created in other silos, if active.
  • 18. Orleans Terminology • Each Silo has a client access port, so requests to any grain can be addressed to any silo.
  • 21. Orleans in Action • Three core components • Interface • Implementation • Access
  • 23. Orleans in Action • Possible Grain Keys (As Defined by the Interface) • Guid • Long • String • ‘Compound Primary’ • Hash of a GUID and a Long
  • 24. Orleans in Action • Grain Keys control the activation of each grain (Remember that each grain has STATE and is backed by a datastore) • Grain Activation (and destruction) has an overhead, but can also be choke points. • Keys for grains should be designed around the use case.
  • 25. Orleans in Action Use Case • Working with User Information • Performing Requests on Multiple Users (in the same request) • Working with Group Session Example Grain Key • User ID (LONG or STRING) • CONST LONG • GUID (tracked within the requesting client OR a grain)
  • 28. Use Cases and Gotchas
  • 29. Use Cases and Gotchas [StatelessWorker] • By default, Orleans activates only ONE copy of a grain across all silos. • If a Grain is marked as StatelessWorker, then multiple copies of the same grain will be created, per silo, as needed. • If existing workers are busy, additional instances are created within the silos automatically.
  • 30. Use Cases and Gotchas Scaling Orleans • New Silos can be added at any time. • Created grains do not redistribute, once a grain is created, it is tied to the created silo • To redistribute at high load, the cluster needs to be restarted, so that grains are reactivated.
  • 31. Use Cases and Gotchas Orleans + Sharding • For maximum impact, data storage needs to be SHARDED. • If all grains perform data access on the same table (or document), then Orleans makes it easier to overwhelm any particular table. • Grains make it easier to fully utilize sharded data stores for maximum throughput.
  • 32. More Info Orleans Homepage https://dotnet.github.io/orleans/ Halo 4Web Services in Orleans https://www.youtube.com/watch?v=rEa2nQrpEhc Orleans MSR Home Page https://www.microsoft.com/en-us/research/project/orleans-virtual-actors/ Azure ReliableActors https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-actors-get-started Java Orbit https://github.com/orbit/orbit Newman Scott Hunter scott@driftlogic.net scotthunter@ea.com