blitzschach / net-orleans-demo

microsoft orleans demo using localhost cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

net-orleans-demo

This project demonstrates Microsoft Orleans localhost clustering.

Run

Server

You can run up to 3 servers / silos.
Since every silo needs different ports, there is a launchSettings profile for each silo.

Silo 1 is considered the primary silo the others connect to in order to form a cluster.
Therefore, silo 1 needs to be started at all times.

dotnet run --project ./OrleansDemo.Server/OrleansDemo.Server.csproj --launch-profile silo1
dotnet run --project ./OrleansDemo.Server/OrleansDemo.Server.csproj --launch-profile silo2
dotnet run --project ./OrleansDemo.Server/OrleansDemo.Server.csproj --launch-profile silo3

A dashboard will be provided for each server instance.
You can visit the dashboard of server / silo 1 at the following address:

http://localhost:10103/

Client

The client must connect to a specific silo.
Thus, there are predefined profiles in the client launchSettings as well.

Start the client using one of the profiles.

dotnet run --project ./OrleansDemo.Client/OrleansDemo.Client.csproj --launch-profile silo1

Requesting Grains

The client provides a /greet endpoint which can be called to request a GreeterGrain.

curl http://localhost:9500/greet

About

microsoft orleans demo using localhost cluster


Languages

Language:C# 100.0%