Lakona.Game.Cluster 0.5.6

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Lakona.Game.Cluster --version 0.5.6
                    
NuGet\Install-Package Lakona.Game.Cluster -Version 0.5.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lakona.Game.Cluster" Version="0.5.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lakona.Game.Cluster" Version="0.5.6" />
                    
Directory.Packages.props
<PackageReference Include="Lakona.Game.Cluster" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Lakona.Game.Cluster --version 0.5.6
                    
#r "nuget: Lakona.Game.Cluster, 0.5.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Lakona.Game.Cluster@0.5.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Lakona.Game.Cluster&version=0.5.6
                    
Install as a Cake Addin
#tool nuget:?package=Lakona.Game.Cluster&version=0.5.6
                    
Install as a Cake Tool

Lakona.Game.Cluster

Lakona.Game.Cluster contains optional explicit cluster routing contracts for Lakona.Game.

This package is intentionally small. It defines node identity, node-directory abstractions, route identity, generation-aware route locations, message envelopes, route directory abstractions, router abstractions, a loopback messenger, and in-memory implementations for tests or local single-process validation.

Diagnostics are exposed through the Lakona.Game.Cluster Meter and ActivitySource. Metrics use low-cardinality tags such as stage, status, delivery, and message kind.

It does not provide a production network adapter, Redis-specific state, external platform discovery bindings, remote actor proxies, actor migration, or durable route state. RPC-specific clients, binders, and fixed TCP + MemoryPack transport behavior live inside Lakona.Game.Server.

Actor route helpers produce route keys from application-chosen actor ids only. They do not encode node ids, endpoints, execution lanes, or local actor-kernel scheduler internals.

Route locations include a route generation, node epoch, endpoint, lease expiration, and metadata. In-memory registration rejects stale generations and older node epochs, and lease refresh requires the caller to present the matching route owner. This keeps restarted nodes and moved route owners from accidentally reviving old ownership.

Cluster Configuration

Runtime configuration uses the application Lakona root. Static settings tell a node its own identity, which actor kinds it may host, which client endpoints to expose, which cluster endpoint to advertise, and which seed endpoints can reach the cluster directory. The live cluster view comes from the node directory.

In Lakona.Game cluster terminology, a node is one .NET server process. Machine, process, and node are treated as the same deployment unit. Actor hosting capability is configured inside a node. A development node can host all actor kinds in one process, while production can split actor kinds across several nodes without changing route or messaging code.

All-In-One Development Node

{
  "Lakona": {
    "Node": {
      "Id": "dev-1"
    },
    "ActorHosts": [ "room", "matchmaking", "leaderboard" ],
    "Endpoints": [
      {
        "Transport": "websocket",
        "Serializer": "json",
        "Host": "127.0.0.1",
        "Port": 20000,
        "Path": "/ws",
        "RpcServices": [ "login", "player" ]
      },
      {
        "Transport": "kcp",
        "Serializer": "json",
        "Host": "127.0.0.1",
        "Port": 20001,
        "RpcServices": [ "battle" ]
      }
    ],
    "Cluster": {
      "Endpoint": "tcp://127.0.0.1:21000",
      "Serializer": "json",
      "Seeds": [ "tcp://127.0.0.1:21000" ],
      "RouteLeaseSeconds": 30
    }
  }
}

This layout is for local development and smoke tests. The node-directory and route-directory implementations are ordinary DI services supplied by the game server process or project configuration. Their storage can be in-memory for local validation.

Split Production Nodes

{
  "Lakona": {
    "Node": {
      "Id": "data-1"
    },
    "ActorHosts": [ "matchmaking", "leaderboard" ],
    "Cluster": {
      "Endpoint": "tcp://10.0.0.1:21001",
      "Seeds": [ "tcp://10.0.0.1:21001" ],
      "RouteLeaseSeconds": 30
    }
  }
}
{
  "Lakona": {
    "Node": {
      "Id": "gateway-1"
    },
    "ActorHosts": [],
    "Endpoints": [
      {
        "Transport": "websocket",
        "Serializer": "json",
        "Host": "0.0.0.0",
        "AdvertisedHost": "gateway-1",
        "Port": 20000,
        "Path": "/ws",
        "RpcServices": [ "login", "player" ]
      }
    ],
    "Cluster": {
      "Endpoint": "tcp://10.0.0.2:21002",
      "Seeds": [ "tcp://10.0.0.1:21001" ]
    }
  }
}

The nodes above join the same ephemeral replicated control plane through their seed endpoints. The gateway node hosts no application actors because ActorHosts is empty, but it still exposes client RPC services and a node-to-node cluster endpoint.

Startup service groups are declared in hotfix code. Every node whose ActorHosts includes the actor kind starts one replica and advertises a ready descriptor through the node directory. Replica state is node-local.

Every node that configures Lakona:Cluster:Endpoint must listen on that endpoint. Framework-owned cluster endpoint hosting binds node-directory RPC, route-directory RPC, notification relay, and remote actor dispatch when the corresponding local services are registered in DI.

Lakona.Game.Server supplies one framework-owned node-to-node channel using TCP and MemoryPack. This is separate from endpoint-local client RPC serializer names. Cluster peers negotiate lakona.cluster.memorypack.v1 before RPC starts.

Node Directory Storage

The core package includes transport-neutral node-directory contracts and an in-memory implementation for local validation. Under replicated hosting, directory reads are projections of the locally replicated membership snapshot; they do not query a database or seed endpoint.

Framework-owned membership and route state is intentionally ephemeral. Product state that must survive cluster loss belongs in application-owned persistence, outside the cluster directory contracts.

Route Key Conventions

ClusterActorRouteKeys provides standard route key helpers:

  • ForActor("player/alice") → route key "actor:player/alice" for actor-targeted messages.
  • ForReply(nodeId) → route key "actor-reply:<nodeId>" for reply messages used by RemoteActorGateway.

These are conventions, not protocol requirements. Projects can define their own route key schemes.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated