C# HTML PowerShell PLpgSQL PLSQL Batchfile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Samples Cleanup connect retry loop in hello world sample (#4767) Jul 27, 2018
misc Added files via upload Apr 6, 2016
src Fix NullReferenceException in LocalGrainDirectory when trace logging … Aug 17, 2018
test TransactionRecovery test fixes (#4857) Aug 17, 2018
.gitattributes Add .gitattributes file Jan 27, 2015
.gitignore Move Service Fabric projects to Azure folder (#4413) Apr 6, 2018
Build.cmd Disable multilevel lookup (#4665) Jun 7, 2018
Directory.Build.props Fix partial build (#4844) Aug 14, 2018
Directory.Build.targets Add cross platform Solution file without the netfx and test projects (#… Nov 14, 2017
DotnetCLIVersion.txt Fix (or workaround?) for codegen using netcore/netstandard 2.1 (#4673) Jun 13, 2018
Ensure-DotNetSdk.cmd Fix (or workaround?) for codegen using netcore/netstandard 2.1 (#4673) Jun 13, 2018
LICENSE Update LICENSE Apr 22, 2015
NuGet.Config vNext Removal and merge with *.2017.csproj files (#3231) Aug 23, 2017
Orleans.sln Removed singleton transaction manager (#4568) May 11, 2018
OrleansCrossPlatform.sln Move serializer projects to a subfolder (#4411) Apr 6, 2018
Parallel-Tests.ps1 Move test running to dotnet xunit from xunit console runner (#3780) Dec 12, 2017
README.md Changed link to documentation to use https instead of http (#4849) Aug 14, 2018
Test.cmd Disable multilevel lookup (#4665) Jun 7, 2018
TestAll.cmd Move test running to dotnet xunit from xunit console runner (#3780) Dec 12, 2017
build.sh Fix (or workaround?) for codegen using netcore/netstandard 2.1 (#4673) Jun 13, 2018
changelog.md Update changelog.md for 2.0.4 release (#4786) Jul 20, 2018
init-tools.cmd vNext Removal and merge with *.2017.csproj files (#3231) Aug 23, 2017
netci.groovy Add cross platform Solution file without the netfx and test projects (#… Nov 14, 2017
run-build.sh Add cross platform Solution file without the netfx and test projects (#… Nov 14, 2017

README.md

Orleans logo

Build status NuGet Gitter Help Wanted Issues

Orleans is a framework that provides a straight-forward 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 implementing the Virtual Actor Model and designed for use in the cloud.

Orleans has been used extensively running 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 number of other projects and companies.

Installation

Installation is performed via NuGet. There are several packages, one for each different project type (interfaces, grains, silo, and client).

In the grain interfaces project:

PM> Install-Package Microsoft.Orleans.Core.Abstractions
PM> Install-Package Microsoft.Orleans.OrleansCodeGenerator.Build

In the grain implementations project:

PM> Install-Package Microsoft.Orleans.Core.Abstractions
PM> Install-Package Microsoft.Orleans.OrleansCodeGenerator.Build

In the server (silo) project:

PM> Install-Package Microsoft.Orleans.Server

In the client project:

PM> Install-Package Microsoft.Orleans.Client

Official Builds

The stable production-quality release is located here.

The latest clean development branch build from CI is located: here

Nightly builds are published to https://dotnet.myget.org/gallery/orleans-ci . These builds pass all functional tests, but are not thoroughly tested as the stable builds or pre-release builds we push to NuGet.org

To use nightly builds in your project, add the MyGet feed using either of the following methods:

  1. Changing the .csproj file to include this section:
    <RestoreSources>
      $(RestoreSources);
      https://dotnet.myget.org/F/orleans-ci/api/v3/index.json;
    </RestoreSources>

or

  1. Creating a NuGet.config file in the solution directory with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <packageSources>
    <clear />
    <add key="orleans-ci" value="https://dotnet.myget.org/F/orleans-ci/api/v3/index.json" />
    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
 </packageSources>
</configuration>

Building from source

Clone the sources from the GitHub repo

Run the Build.cmd script to build the nuget packages locally, then reference the required NuGet packages from /Artifacts/Release/*. You can run Test.cmd to run all BVT tests, and TestAll.cmd to also run Functional tests (which take much longer)

Building and running tests in Visual Studio 2017

.NET Core 2.0 SDK is a pre-requisite to build Orleans.sln.

There might be errors trying to build from Visual Studio because of conflicts with the test discovery engine (error says could not copy xunit.abstractions.dll). The reason for that error is that you need to configure the test runner in VS like so (after opening the solution):

  • Test -> Test Settings -> Uncheck Keep Test Execution Engine running
  • Test -> Test Settings -> Default Processor Architecture -> Check X64

Then either restart VS, or go to the task manager and kill the processes that starts with vstest.. Then build once again and it should succeed and tests should appear in the Test Explorer window.

Documentation

Documentation is located here

Code Examples

Create an interface for your grain:

public interface IHello : Orleans.IGrainWithIntegerKey
{
  Task<string> SayHello(string greeting);
}

Provide an implementation of that interface:

public class HelloGrain : Orleans.Grain, IHello
{
  Task<string> SayHello(string greeting)
  {
    return Task.FromResult($"You said: '{greeting}', I say: Hello!");
  }
}

Call the grain from your Web service (or anywhere else):

// Get a reference to the IHello grain with id '0'.
var friend = GrainClient.GrainFactory.GetGrain<IHello>(0);

// Send a greeting to the grain and await the response.
Console.WriteLine(await friend.SayHello("Good morning, my friend!"));

Blog

Orleans Blog is a place to share our thoughts, plans, learnings, tips and tricks, and ideas, crazy and otherwise, which don’t easily fit the documentation format. We would also like to see here posts from the community members, sharing their experiences, ideas, and wisdom. So, welcome to Orleans Blog, both as a reader and as a blogger!

Community

License

This project is licensed under the MIT license.

Quick Links

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.