orleans/README.md

125 строки
5.2 KiB
Markdown
Исходник Обычный вид История

2015-01-11 09:08:59 +03:00
Orleans - Distributed Actor Model
2014-12-19 17:32:50 +03:00
=======
2016-08-04 15:40:38 +03:00
![Orleans logo](https://github.com/dotnet/orleans/blob/gh-pages/assets/logo_128.png)
2015-07-22 03:13:33 +03:00
2015-09-29 21:43:37 +03:00
[![Build status](http://dotnet-ci.cloudapp.net/job/dotnet_orleans/job/innerloop/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_orleans/job/innerloop)
2015-03-28 08:17:40 +03:00
[![NuGet](https://img.shields.io/nuget/v/Microsoft.Orleans.Core.svg?style=flat)](http://www.nuget.org/profiles/Orleans)
2015-04-22 00:42:13 +03:00
[![Issue Stats](http://www.issuestats.com/github/dotnet/orleans/badge/pr)](http://www.issuestats.com/github/dotnet/orleans)
[![Issue Stats](http://www.issuestats.com/github/dotnet/orleans/badge/issue)](http://www.issuestats.com/github/dotnet/orleans)
2015-01-24 04:13:53 +03:00
2015-04-18 01:50:17 +03:00
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/orleans?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Help Wanted Issues](https://badge.waffle.io/dotnet/orleans.svg?label=up-for-grabs&title=Help Wanted Issues)](http://waffle.io/dotnet/orleans)
2015-07-22 03:26:16 +03:00
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](http://research.microsoft.com/projects/orleans/)
implementing the [Virtual Actor Model](http://research.microsoft.com/apps/pubs/default.aspx?id=210931)
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](https://www.halowaypoint.com/) as a platform for all of Halo 4 and Halo 5 cloud services, as well as by [a number of other projects and companies](http://dotnet.github.io/orleans/Who-Is-Using-Orleans).
2015-01-11 09:06:54 +03:00
2015-02-02 16:02:01 +03:00
Installation
============
Installation is performed via [NuGet](https://www.nuget.org/packages?q=orleans).
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.Templates.Interfaces
```
In the grain implementations project:
```
PM> Install-Package Microsoft.Orleans.Templates.Grains
```
In the server (silo) project:
```
PM> Install-Package Microsoft.Orleans.Server
```
In the client project:
```
PM> Install-Package Microsoft.Orleans.Client
```
### Official Builds
2015-03-25 01:13:29 +03:00
The stable production-quality release is located [here](https://github.com/dotnet/orleans/releases/latest).
2015-02-06 21:54:30 +03:00
2015-09-29 21:43:37 +03:00
The latest clean development branch build from CI is located: [here](http://dotnet-ci.cloudapp.net/job/dotnet_orleans/job/innerloop/lastStableBuild/artifact/)
2015-02-06 21:54:30 +03:00
### Building From Source
Clone the sources from the GitHub [repo](https://github.com/dotnet/orleans)
2015-02-02 16:02:01 +03:00
Run run the `Build.cmd` script to build the binaries locally,
then reference the required NuGet packages from `Binaries\NuGet.Packages\*`.
2015-01-11 09:11:58 +03:00
Documentation
=============
Documentation is located [here](http://dotnet.github.io/orleans/)
Code Examples
=============
2015-10-15 00:47:17 +03:00
Create an interface for your grain:
```c#
public interface IHello : Orleans.IGrainWithIntegerKey
{
Task<string> SayHello(string greeting);
}
```
Provide an implementation of that interface:
```c#
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):
```c#
// Get a reference to the IHello grain with id '0'.
var friend = GrainClient.GrainFactory.GetGrain<IHello>(0);
2015-11-21 15:37:02 +03:00
// Send a greeting to the grain and await the response.
2015-10-15 00:47:17 +03:00
Console.WriteLine(await friend.SayHello("Good morning, my friend!"));
```
Community
=========
2016-01-07 08:30:56 +03:00
* Ask questions by [opening an issue on GitHub](https://github.com/dotnet/orleans/issues) or on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=orleans)
* [Chat on Gitter](https://gitter.im/dotnet/orleans)
* Follow the [@ProjectOrleans](https://twitter.com/ProjectOrleans) Twitter account for Orleans announcements.
* [OrleansContrib - Repository of community add-ons to Orleans](https://github.com/OrleansContrib/) Various community projects, including Orleans Monitoring, Design Patterns, Storage Provider, etc.
* Guidelines for developers wanting to [contribute code changes to Orleans](http://dotnet.github.io/orleans/Contributing).
2015-09-18 21:13:31 +03:00
* You are also encouraged to report bugs or start a technical discussion by starting a new [thread](https://github.com/dotnet/orleans/issues) on GitHub.
2015-02-02 02:10:53 +03:00
License
=======
2015-02-02 16:02:01 +03:00
This project is licensed under the [MIT license](https://github.com/dotnet/orleans/blob/master/LICENSE).
2015-02-02 02:10:53 +03:00
Quick Links
===========
* [MSR-ProjectOrleans](http://research.microsoft.com/projects/orleans/)
* Orleans Tech Report - [Distributed Virtual Actors for Programmability and Scalability](http://research.microsoft.com/apps/pubs/default.aspx?id=210931)
* [Orleans-GitHub](https://github.com/dotnet/orleans)
* [Orleans Documentation](http://dotnet.github.io/orleans/)
* [Contributing](http://dotnet.github.io/orleans/Contributing)
2016-07-01 03:14:27 +03:00
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.