VOOZH about

URL: https://www.nuget.org/packages/Lakona.Game.Cluster/

⇱ NuGet Gallery | Lakona.Game.Cluster 0.2.0




Lakona.Game.Cluster 0.2.0

dotnet add package Lakona.Game.Cluster --version 0.2.0
 
 
NuGet\Install-Package Lakona.Game.Cluster -Version 0.2.0
 
 
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.2.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lakona.Game.Cluster" Version="0.2.0" />
 
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.2.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lakona.Game.Cluster, 0.2.0"
 
 
#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.2.0
 
 
#: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.2.0
 
Install as a Cake Addin
#tool nuget:?package=Lakona.Game.Cluster&version=0.2.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Lakona.Game.Cluster

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

This package is intentionally small. It defines node identity, feature descriptors, 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 TCP transport behavior live in the separate Lakona.Game.Cluster.Rpc package.

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 application features to start, 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. Features are configured inside a node. A development node can host every feature in one process, while production can split the same features across several nodes without changing route or messaging code.

All-In-One Development Node

{
 "Lakona": {
 "Node": {
 "Id": "dev-1"
 },
 "Feature": [
 "database",
 "state-store",
 "matchmaking",
 "leaderboard",
 "battle-runtime"
 ],
 "Endpoints": [
 {
 "Transport": "websocket",
 "Host": "127.0.0.1",
 "Port": 20000,
 "Path": "/ws",
 "RpcServices": [ "login", "player" ]
 },
 {
 "Transport": "kcp",
 "Host": "127.0.0.1",
 "Port": 20001,
 "RpcServices": [ "battle" ]
 }
 ],
 "Cluster": {
 "Endpoint": "tcp://127.0.0.1:21000",
 "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

{
 "ConnectionStrings": {
 "AgarPostgres": "Host=postgres;Database=lakona-game;Username=lakona-game;Password=..."
 },
 "Lakona": {
 "Node": {
 "Id": "data-1"
 },
 "Feature": [
 "database",
 "state-store",
 "matchmaking",
 "leaderboard"
 ],
 "Cluster": {
 "Endpoint": "tcp://10.0.0.1:21001",
 "Seeds": [ "tcp://10.0.0.1:21001" ],
 "RouteLeaseSeconds": 30
 }
 }
}
{
 "Lakona": {
 "Node": {
 "Id": "gateway-1"
 },
 "Feature": [],
 "Endpoints": [
 {
 "Transport": "websocket",
 "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 data node above can provide a project-owned persistent node directory through Lakona.Game.Cluster.Sql. The gateway node starts no application features because Feature is an empty array, but it still exposes client RPC services and a node-to-node cluster endpoint.

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

Node Directory Storage

The core package includes transport-neutral node-directory contracts and the in-memory implementation:

  • InMemory: tests, local validation, and all-in-one development.
  • Persistent: production-oriented deployments through Lakona.Game.Cluster.Sql or project-owned adapters.

Persistent storage is required so NodeEpoch allocation does not roll back after a directory restart and active leases can be recovered or expired consistently. It is live membership metadata, not a business event log and not durable route ownership.

The core cluster package does not depend on a persistent provider. Concrete persistent providers such as SQL databases, Redis, Consul, etcd, or Kubernetes API integration should be adapters selected by project configuration, not assumptions baked into route or messaging APIs.

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

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Lakona.Game.Cluster:

Package Downloads
Lakona.Game.Server

Server-side actor runtime, RPC hosting helpers, session lifecycle, and reliable push infrastructure for Lakona.Game applications.

Lakona.Game.Cluster.Sql

SQL-backed node directory persistence for Lakona.Game cluster membership.

Lakona.Game.Cluster.Rpc

Lakona.Rpc-based node messenger adapter for Lakona.Game cluster routing.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 128 6/17/2026