A straightforward approach to building distributed, high-scale applications in .NET

Orleans is a framework that provides a straightforward approach to building distributed high-scale computing applications, without the need to learn and apply complex concurrency or other scaling patterns. It was created by Microsoft Research and designed for use in the cloud.

Orleans has been used extensively in Microsoft Azure by several Microsoft product groups, most notably by 343 Industries as a platform for all of Halo 4 and Halo 5 cloud services, as well as by a growing number of other companies.

Scalable by Default

Orleans handles the complexity of building distributed systems, enabling your application to scale to hundreds of servers.

Low Latency

Orleans allows you to keep the state you need in memory, so your application can rapidly respond to incoming requests.

Simplified Concurrency

Orleans allows you to write simple, single threaded C# code, handling concurrency with asynchronous message passing between actors.

In Orleans, actors are called 'grains', and are described using an interface. Async methods are used to indicate which messages the actor can receive:

public interface IMyGrain : IGrainWithStringKey
    Task<string> SayHello(string name);

The implementation is executed inside the Orleans framework:

public class MyGrain : IMyGrain
    public Task<string> SayHello(string name)
        return Task.FromResult($"Hello {name}");

You can then send messages to the grain by creating a proxy object, and calling the methods:

var grain = GrainClient.GrainFactory.GetGrain<IMyGrain>("grain1");
await grain.SayHello("World");

Where Next?

To learn more about the concepts in Orleans, read the introduction.

There are a number of step-by-step tutorials.

Discuss your Orleans questions on the gitter chat room.

Fork the code on the GitHub Respository.