Align path-based LiveObjects API spec with ably-js implementation#480
Draft
sacOO7 wants to merge 2 commits into
Draft
Align path-based LiveObjects API spec with ably-js implementation#480sacOO7 wants to merge 2 commits into
sacOO7 wants to merge 2 commits into
Conversation
… Subscription-only deregistration
4 tasks
…i-spec' into fix/liveobjects-path-spec-based-on-ably-js-v2 # Conflicts: # specifications/objects-features.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LiveObjects spec changes covering path-based subscriptions, identity-based subscription lifecycle behavior, and deregistration APIs:
• Multi-parent reference tracking (RTLO3f, RTLO3g, RTO5c10, RTO24b1)
LiveObjectnow maintains aparentReferencesmap keyed by parentLiveMap.LiveMapis tombstoned.getFullPathshelper traverses the parent graph upward to the root with cycle protection, returning all distinct paths currently referencing the object (or an empty set if the object is orphaned).PathObjectSubscriptionRegister(RTO24b1) now usesgetFullPathsto determine dispatch targets, allowing a single object update to fan out across every path referencing that object.parentReferencesfrom the finalizedLiveMapstate.• Tombstone-driven auto-deregistration (RTLO4b8, RTLO4b9, RTLO4b10)
LiveObject#subscribelisteners receiving a tombstone update (OBJECT_DELETE or sync tombstone) are invoked once and then automatically deregistered.•
Subscriptionas the sole deregistration mechanism (SUB2b, RTLO4c, RTPO20, RTINS17)unsubscribe(listener)APIs fromLiveObject,PathObject, andInstance(corresponding clauses deleted).Subscriptionreturned bysubscribe.Subscription#unsubscribeis explicitly documented as idempotent; repeated calls are treated as no-ops.• IDL updates
unsubscribedeclarations.Primitivetype alias.countandentriesbacking fields onLiveCounterValueTypeandLiveMapValueType.