Lakona.Game.Cluster.Rpc
0.2.4
dotnet add package Lakona.Game.Cluster.Rpc --version 0.2.4
NuGet\Install-Package Lakona.Game.Cluster.Rpc -Version 0.2.4
<PackageReference Include="Lakona.Game.Cluster.Rpc" Version="0.2.4" />
<PackageVersion Include="Lakona.Game.Cluster.Rpc" Version="0.2.4" />
<PackageReference Include="Lakona.Game.Cluster.Rpc" />
paket add Lakona.Game.Cluster.Rpc --version 0.2.4
#r "nuget: Lakona.Game.Cluster.Rpc, 0.2.4"
#:package Lakona.Game.Cluster.Rpc@0.2.4
#addin nuget:?package=Lakona.Game.Cluster.Rpc&version=0.2.4
#tool nuget:?package=Lakona.Game.Cluster.Rpc&version=0.2.4
Lakona.Game.Cluster.Rpc
Lakona.Game.Cluster.Rpc contains the Lakona.Rpc adapter layer for explicit Lakona.Game cluster node-to-node messaging, remote node-directory calls, and remote route-directory calls.
The package stays outside Lakona.Game.Cluster so core route contracts remain transport-neutral. It provides:
- a Lakona.Rpc method contract for sending
ClusterMessageenvelopes between nodes ClusterNodeMessenger, anINodeMessengerimplementation backed by a Lakona.Rpc client factoryClusterClientFactory, a reusable client cache over application-provided Lakona.Rpc transportsIClusterTransportFactory, the boundary where projects choose TCP, WebSocket, KCP, security, and endpoint policyTcpClusterTransportFactory, a TCP transport factory for endpoint addresses such astcp://127.0.0.1:20010ClusterMessageBinder, a server-side binder that dispatches inbound cluster messages into anIClusterMessageHandlerNodeDirectoryClient, anINodeDirectoryclient backed by Lakona.Rpc callsNodeDirectoryBinder, a server-side binder that exposes an application-providedINodeDirectoryRouteDirectoryClient, anIRouteDirectoryclient backed by Lakona.Rpc callsRouteDirectoryBinder, a server-side binder that exposes an application-providedIRouteDirectory
The cluster protocol DTOs in this package are serializer-neutral. Configure the
cluster serializer with Lakona:Cluster:Serializer; add a serializer package
such as Lakona.Game.Cluster.Rpc.MemoryPack only when that concrete format is
selected for the cluster channel.
It does not provide durable route directory storage, external platform discovery bindings, durable queues, gameplay DTOs, actor migration, or transparent remote actor clients. A route directory service can expose InMemoryRouteDirectory for smoke tests, or a project-owned durable implementation for production-specific policy.
Directory Hosting And Bootstrap
The shared node and route directories are ordinary node-local implementations exposed over the node's advertised cluster endpoint. A data node can own durable directory storage while gateway and battle nodes use Lakona:Cluster:Seeds to create remote directory clients.
Example data node that owns the shared directories and business features:
{
"Lakona": {
"Node": {
"Id": "data-1"
},
"Feature": [ "state-store", "matchmaking", "leaderboard" ],
"Cluster": {
"Endpoint": "tcp://10.0.0.1:21001",
"Serializer": "memorypack",
"Seeds": [ "tcp://10.0.0.1:21001" ],
"Directory": {
"Provider": "postgres",
"ConnectionStringName": "LakonaClusterPostgres",
"NodeTable": "lakona_cluster_nodes",
"EnsureSchemaOnStartup": false
}
}
}
}
Example gateway node with only endpoint-local client RPC exposure:
{
"Lakona": {
"Node": {
"Id": "gateway-1"
},
"Feature": [],
"Endpoints": [
{
"Transport": "websocket",
"Serializer": "json",
"Host": "0.0.0.0",
"Port": 20000,
"Path": "/ws",
"RpcServices": [ "login", "player" ]
}
],
"Cluster": {
"Endpoint": "tcp://10.0.0.2:21002",
"Serializer": "memorypack",
"Seeds": [ "tcp://10.0.0.1:21001" ]
}
}
}
Feature declares cluster-discoverable node capability. RpcServices declares services exposed only on that client endpoint. Nodes that do not register a local INodeDirectory or IRouteDirectory use Lakona:Cluster:Seeds as the public bootstrap input and register themselves, client-session routes, and lease refreshes through the remote directory node.
Lakona:Cluster:Serializer is required when cluster is configured. Supported
values are json and memorypack, and all communicating cluster nodes must
use the same value. It selects the node-to-node cluster payload serializer and
does not replace endpoint-local client RPC serializers.
Additional concrete transport factories should be added only with passing cross-process smoke tests. The package exposes IClusterTransportFactory so consuming projects can wire custom Lakona.Rpc transport policy while the package keeps the node messaging protocol and status mapping centralized.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Lakona.Game.Cluster (>= 0.3.2)
- Lakona.Rpc.Client (>= 0.12.3)
- Lakona.Rpc.Server (>= 0.13.3)
- Lakona.Rpc.Transport.Tcp (>= 0.11.6)
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 |
|---|