Giter Site home page Giter Site logo

orleansfabricsilo's Introduction

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

orleansfabricsilo's People

Contributors

abatishchev avatar johnny-bee avatar onionhammer avatar reubenbond avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.