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 objects (grains).

In Orleans, grains are the building blocks of application code. Grains are instances of .NET classes that implement a conforming interface. Asynchronous methods of the interface are used to indicate which operations the grain can perform:

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 invoke the grain by obtaining a proxy object (a grain reference), 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.