SlideShare une entreprise Scribd logo
1  sur  32
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

Contenu connexe

Tendances

Apache Solr 5.0 and beyond
Apache Solr 5.0 and beyondApache Solr 5.0 and beyond
Apache Solr 5.0 and beyondAnshum Gupta
 
Rethinking the debugger
Rethinking the debuggerRethinking the debugger
Rethinking the debuggerIulian 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.0Anshum 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.10Anshum 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 BootiqueAndrus Adamchik
 
SolrCloud Cluster management via APIs
SolrCloud Cluster management via APIsSolrCloud Cluster management via APIs
SolrCloud Cluster management via APIsAnshum Gupta
 
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 CollectionsAnshum 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 ClusterKonstantin Tsykulenko
 
Standard libraries with_xamarin
Standard libraries with_xamarinStandard libraries with_xamarin
Standard libraries with_xamarinKen Tucker
 
Solr security frameworks
Solr security frameworksSolr security frameworks
Solr security frameworksAnshum Gupta
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and AkkaYung-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 2015Anshum Gupta
 
Hashicorp Products Overview
Hashicorp Products OverviewHashicorp Products Overview
Hashicorp Products OverviewUchit Vyas ☁
 
Actor model : A Different Concurrency Approach
Actor model : A Different Concurrency ApproachActor model : A Different Concurrency Approach
Actor model : A Different Concurrency ApproachEmre 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
 

Tendances (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)
 

En vedette

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 webPedro Medeiros
 
Обзор фреймворка Twisted
Обзор фреймворка TwistedОбзор фреймворка Twisted
Обзор фреймворка TwistedPython 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 JVMMario 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 ChallengesAaron Irizarry
 

En vedette (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
 

Similaire à 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 2014Shalin 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 platformTommaso Teofili
 
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 OrleansWinWire Technologies Inc
 
Enterprise Search Using Apache Solr
Enterprise Search Using Apache SolrEnterprise Search Using Apache Solr
Enterprise Search Using Apache Solrsagar 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 SolrCloudAnshum Gupta
 
Roaring with elastic search sangam2018
Roaring with elastic search sangam2018Roaring with elastic search sangam2018
Roaring with elastic search sangam2018Vinay Kumar
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling SoftwareAbdelmonaim Remani
 
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 Remanijaxconf
 
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, IBMLucidworks
 
Performance optimization - JavaScript
Performance optimization - JavaScriptPerformance optimization - JavaScript
Performance optimization - JavaScriptFilip 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 stackJustin 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-deployment2640Newlink
 
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-deployment2640Newlink
 

Similaire à 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
 

Dernier

8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 

Dernier (20)

8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 

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