Introduction to Microsoft Orleans

Microsoft Orleans, the Virtual Actor Framework developed by Microsoft Research is ideal for building distributed high scale systems with C#.
Course info
Rating
(187)
Level
Intermediate
Updated
Sep 23, 2014
Duration
1h 44m
Table of contents
Description
Course info
Rating
(187)
Level
Intermediate
Updated
Sep 23, 2014
Duration
1h 44m
Description

Microsoft Orleans, the Virtual Actor Framework developed by Microsoft Research is ideal for building distributed high scale systems with C#. This course starts with an explanation of the Actor Model, and then covers each of the core concepts in Orleans by building upon a practical “internet of things” scenario.

About the author
About the author

Richard is a Microsoft MVP for Windows Azure, and Senior Consultant at Two10 Degrees. He is often found developing open source software in C# and Node.js, and lives in rural Suffolk, UK with his wife and two children.

Section Introduction Transcripts
Section Introduction Transcripts

Grain Interfaces and WebAPI
Hi I'm Richard Astbury. In this module we'll create a WebAPI so we can expose our Grains over HTTP. So far in the course we have hosted our Orleans client and server in the same Dev/Test Host, now we're going to break these apart and run a local Silo and connect to it from an ASP. NET web application. While Silos can be connected to over the network it's not recommended to rely on this as your API. We treat Orleans more like a database and keep it within a private network without allowing the public to connect to it directly. So instead it's better to build an API in front of your Silos and connect devices or services to that instead. That then allows you to do the normal authentication and authorization steps you would expect from a system. We will build a new ASP. NET web application, which will connect as a client to our Orleans Silos. This isn't the only possibility with Orleans, you could have caused to use a (_____) such as Azure service bus to decouple your API and Orleans, it depends on your exact use case. To connect a web application to Orleans is simple, first add a reference to the Orleans. dll and the Grain interfaces project, then initialize the Orleans client at application start up, this is best done in the application start method of global ASAX. Then just use the Grain interfaces in your controllers to call the required Grains. We'll extend our sample to expose the following Grain methods, we'll add an HTTP post to the decode Grain, the stateless worker which is decoding our messages. We'll allow clients to get the temperature of a device by adding a new GetTemperature method to the Device Grain and we'll create a new method on the System Grain to get the temperature of the whole system.