Build a scalable IoT backend where each physical device gets its own independent in-memory worker that tracks state and responds to commands.
Create a cloud service that handles millions of users by spreading logic across many servers without rewriting it as distributed code.
Build a smart home application where each device is a long-lived stateful grain the framework keeps alive and routes messages to automatically.
Requires .NET runtime and a persistent storage provider (such as Azure Table Storage or a SQL database) to run a production-ready cluster.
Orleans is a framework from Microsoft Research that makes it much easier to build applications that need to run across many servers at once. Most programmers learn to write code that runs on a single computer, but when you need to handle millions of users or process large amounts of data reliably, you have to spread that work across many machines. Orleans tries to bridge that gap by letting you write code in a familiar, single-server style while the framework handles the complexity of distributing it. The central concept in Orleans is something called a grain. A grain is a small, independent unit of logic and data. You can think of it as a tiny worker that has a unique identity, holds some state in memory, and responds to messages. Grains are automatically loaded into memory when needed and removed when idle. Because each grain has a stable identity, other parts of the system can always reach it without knowing which server it currently lives on. This makes it straightforward to model real-world things: the README uses the example of smart thermostats, where each physical device gets its own grain that tracks its current readings and can receive commands. Orleans handles several hard problems for you: deciding which server a grain runs on, moving grains between servers, recovering from server failures, and persisting grain state to a database. Developers interact with grains through typed interfaces using standard C# async patterns, so the distributed nature of the system is mostly hidden behind code that looks like ordinary method calls. The framework runs on .NET and works on Windows, Linux, and macOS. It is maintained by Microsoft under the .NET organization and has been used in production for large cloud services, including parts of Microsoft Azure. The README describes the programming model in detail and includes examples for common scenarios like IoT backends and smart home applications.
← dotnet on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.