Default hot body subscriptions to live delivery
This commit is contained in:
parent
fd070cc8b2
commit
4d2ddb5beb
3 changed files with 27 additions and 3 deletions
|
|
@ -2860,7 +2860,7 @@ namespace GameCult.Mesh
|
|||
CultNetDatabaseSubscriptionClient subscriptions,
|
||||
IEnumerable<CultMeshBodyTransportKind> supportedBodyTransports,
|
||||
CultMeshHotBodySubscription subscription,
|
||||
CultNetDatabaseSubscriptionDeliveryMode deliveryMode = CultNetDatabaseSubscriptionDeliveryMode.ReplicateToCache)
|
||||
CultNetDatabaseSubscriptionDeliveryMode deliveryMode = CultNetDatabaseSubscriptionDeliveryMode.Live)
|
||||
{
|
||||
if (subscriptions == null) throw new ArgumentNullException(nameof(subscriptions));
|
||||
if (supportedBodyTransports == null) throw new ArgumentNullException(nameof(supportedBodyTransports));
|
||||
|
|
@ -2883,7 +2883,7 @@ namespace GameCult.Mesh
|
|||
CultNetDatabaseSubscriptionClient subscriptions,
|
||||
CultMeshBodyPublicationResolver bodyResolver,
|
||||
CultMeshHotBodySubscription subscription,
|
||||
CultNetDatabaseSubscriptionDeliveryMode deliveryMode = CultNetDatabaseSubscriptionDeliveryMode.ReplicateToCache)
|
||||
CultNetDatabaseSubscriptionDeliveryMode deliveryMode = CultNetDatabaseSubscriptionDeliveryMode.Live)
|
||||
{
|
||||
if (bodyResolver == null) throw new ArgumentNullException(nameof(bodyResolver));
|
||||
return SubscribeHotBodyAsync(subscriptions, bodyResolver.SupportedTransports, subscription, deliveryMode);
|
||||
|
|
|
|||
|
|
@ -924,7 +924,11 @@ latest-publication record, consumer identity, and logical body demand in one
|
|||
contract. The local `CultMeshBodyTransportService` contributes only adapters it
|
||||
can actually open, ordered shared-memory first; the server combines those
|
||||
capabilities with observed peer locality. Applications do not hand-assemble
|
||||
transport-name arrays or request one snapshot per frame.
|
||||
transport-name arrays or request one snapshot per frame. Hot-body subscriptions
|
||||
default to `Live`: their exact initial metadata is decoded for bootstrap, then
|
||||
subsequent layout/publication changes remain ephemeral notifications. Durable
|
||||
cache replication is an explicit opt-in for consumers that actually own a
|
||||
replica requirement.
|
||||
|
||||
### Reactive document delivery body map
|
||||
|
||||
|
|
@ -936,6 +940,9 @@ the value; the transport and renderer own neither its persistence nor meaning.
|
|||
`CultNetDatabaseSubscriptionDeliveryMode`. `ReplicateToCache` materializes
|
||||
bootstrap and durable state before notification. `Live` validates and decodes
|
||||
the same typed payload, then notifies the subscriber without a replica write.
|
||||
High-rate body subscriptions select `Live` by default; general database
|
||||
subscriptions retain the durable default because CultMesh cannot infer their
|
||||
ownership contract.
|
||||
|
||||
**Outputs:** both modes produce the same typed initial values and change event.
|
||||
Only durable replication mutates the consumer's CultCache.
|
||||
|
|
|
|||
Loading…
Reference in a new issue