Cloud Native application framework for .NET
Перейти к файлу
James Carter 8fc5f39ec6 Check IAddressable before DeepCopy (#2383)
* Modified CodeGenerator to check if the item being DeepCopied is an IAddressable before DeepCopying, converting to IGrainReference if so.

* Modified Guard on SerializerGenerator when getting References to IAddressable types before DeepCopy to exclude concrete Grain classes

* Modified CodeGenerator to check if the item being DeepCopied is an IAddressable (but not a concrete class) before DeepCopying, converting to IGrainReference if so.

* Add test for nested Grain->GrainReference conversion

* Improve commenting.

* Handle SystemTarget & avoid IGrainObserver
2016-11-17 14:52:23 -08:00
Samples Fixed broken links in Samples READMEs 2016-09-20 15:23:05 +02:00
misc Added files via upload 2016-04-05 17:51:45 -07:00
src Check IAddressable before DeepCopy (#2383) 2016-11-17 14:52:23 -08:00
test Check IAddressable before DeepCopy (#2383) 2016-11-17 14:52:23 -08:00
vNext Body deserialization errors should result in a fast failure to the caller rather than a timeout. 2016-11-14 12:04:54 -08:00
.gitattributes Add .gitattributes file 2015-01-27 10:44:02 -08:00
.gitignore Include Build folder 2016-09-13 14:26:39 -07:00
Build.cmd Fail build on failed compilation or test run (#2402) 2016-11-09 14:57:32 -08:00
LICENSE Update LICENSE 2015-04-22 10:26:16 -07:00
README.md Use new CI DNS 2016-11-02 15:29:55 -07:00
Test.cmd Fail build on failed compilation or test run (#2402) 2016-11-09 14:57:32 -08:00
TestAll.cmd Fail build on failed compilation or test run (#2402) 2016-11-09 14:57:32 -08:00
changelog.md Add changelog for 1.3.1 (#2422) 2016-11-15 14:52:36 -08:00
netci.groovy Run vNext tests from command line 2016-10-28 14:19:07 -07:00

README.md

Orleans logo

=======

Build status NuGet

Gitter

![Help Wanted Issues](https://badge.waffle.io/dotnet/orleans.svg?label=up-for-grabs&title=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.OrleansCodeGenerator.Build

In the grain implementations project:

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

Building From Source

Clone the sources from the GitHub repo

Run run the Build.cmd script to build the binaries locally, then reference the required NuGet packages from Binaries\NuGet.Packages\*.

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!"));

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.