Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Latest commit

 

History

History
48 lines (42 loc) · 2.34 KB

README.md

File metadata and controls

48 lines (42 loc) · 2.34 KB

Support for hosting Orleans on Serivce Fabric is now included in the Orleans core repository and published via the Microsoft.Orleans.ServiceFabric package.

Orleans Service Fabric Silo

This is a simple library which allows Orleans to be hosted on Service Fabric.

Instructions

  • Create a stateless service to host your actors.
  • Install the Orleans Service Fabric Silo package:
PM> Install-Package Microsoft.Orleans.ServiceFabric.Silo -Pre
  • Alter the CreateServiceInstanceListeners method to construct an OrleansCommunicationListener, like so:
protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners()
{
    var silo =
        new ServiceInstanceListener(
            parameters =>
            new OrleansCommunicationListener(parameters, this.GetClusterConfiguration(), this.ServicePartition));
    return new[] { silo };
}
  • Install the Orleans Service Fabric Client package:
PM> Install-Package Microsoft.Orleans.ServiceFabric.Client -Pre

Then consume it in the client, initializing Orleans like so:

OrleansFabricClient.Initialize(new Uri("fabric:/CalculatorApp/CalculatorService"), this.GetConfiguration());

Replace fabric:/CalculatorApp/CalculatorService with the Service Fabric URI of the service created earlier.

In your ServiceManifest.xml, add the following endpoints:

<Endpoint Name="OrleansSiloEndpoint"  Type="Internal" Protocol="tcp"/>
<Endpoint Name="OrleansProxyEndpoint"  Type="Internal" Protocol="tcp"/>

Sample Project Instructions

  1. Start the Azure Storage Emulator - it is currently needed for Orleans to discover other nodes.
  2. Debug CalculatorApp from Visual Studio.
  3. Run TestClient.exe get from TestClient's output directory.
  4. Run TestClient.exe add 3.14 from TestClient's output directory.

Hope this helps :) Hit me up on @ReubenBond if you have questions.

Join us! Orleans is a warm, welcoming community & we're on Gitter: Gitter