-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(daemon): Add
reverseLocate()
and followLocatorNameChanges()
…
…(merge #2195) Adds `reverseLocate()` and `followLocatorNameChanges()` to the daemon's directory. To match this new method, the directory's `followChanges()` and the pet store's underlying `follow()` are renamed to `followNameChanges()`. The directory's `reverseLocate(locator)` and `followLocatorNameChanges(locator)` are backed up by the pet store's `reverseIdentify(id)` and `followIdNameChanges(id)`, respectively. The implementation of the former is straightforward. The implementation of the latter required the introduction of a new pubsub topic, `idChangesTopic`, and a map from ids to `idChangesTopic` subscriptions (one for each id). Since the pet store is unaware of whether ids exist, `followIdNameChanges()` will naively create a subscription that first publishes an empty array of names, and then any subsequent names that are added for that id. `followLocatorNameChanges()` inherits this property. The current implementation suffers from the limitation that locator name change subscriptions cannot be ended. A follow-up may introduce the ability for subscribers to cancel their subscription. Locator subscriptions can also be a target for our future garbage collector, which can delete subscriptions for unreachable locators. Cancelling a locator should not end the subscription, because we consider the liveness of a value to be orthogonal to the subscriber's interest in changes to its names.
- Loading branch information
Showing
14 changed files
with
573 additions
and
161 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.