Repository navigation
v0.24.0
Two redesigns and a server-side allocation rework. Wire-breaking: 0.23.x ↔ 0.24.0 do not mix.
- Signature handshake — annotated client signature replaces
ClientCapabilities. O(1) gate, < 100 B steady-state connect (vs ~5 KB). Client-sideIServerAnnotationCache(in-memory + Unity PlayerPrefs); cache invalidation viaserverHash. - Client-owned subscriptions — server no longer persists subscription list; client claims its set on Resume via
SessionConnectRequest.ClaimedSubscriptions, entity grain verdictsContinued/Refreshed/Failedper claim. AnyFailedroutes throughIMetaSessionRecoveryHandler. - Session recovery — explicit
SessionConnectMode.{Resume,StartNew};IMetaSessionRecoveryHandlergame-level callback onSessionUnknown; unifiedTriggerRecovery(transport-reconnect + server-pushed). Persisted RPC-ordering baseline (LastDispatchedRequestId+LastCompletedRequestId) eliminates infinite retry loops after silo restart; stale + cache-miss returns an error op instead of silent re-execution. - Server-side allocation rework —
PooledPayloadRegistry(0.23.1 opt-in, never engaged) removed (~1500 LOC, 9 files). Replaced by cachedIPayloadWriterper grain returningReadOnlyMemory<byte>over pool-rented scratch (IServerRecordContext.AcquireWriter());Immutable<ROM>kept only at Orleans grain boundaries;SessionManagerGrainhot-path wrappers flipped class → struct;_pendingPacketsaliased to persisted state;CleanupPendingPackets*rewritten (prefix-scan + singleRemoveRange). - Fixes —
ReclaimSubscriptionAsynctruth source isEntitySequenceNumberalone; missingSubscribersentry is repaired in place (no more state-rollback after silo restart with offline-applied RPCs).- Client
_lastKnownEntitySeqadvances on everyCrossEntityOperations[i], not just the outer entity (no more spurious Refreshed after cross-entity activity). ResendPendingRequestsAsyncnow awaitsTask.WhenAll(resends)— was fire-and-forget, racing with new user actions during recovery.CleanupPendingPacketsByCount— leftover emptyforloop caused N-timesRemoveRange→ broadcasts lost. Fixed.- Unity Expedition example — server projects switched from NuGet to
ProjectReference.
See docs/GUIDE.md and docs/ARCHITECTURE.md for integration details and rationale.