Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon: followLocatorNameChanges() implementation is incomplete #2215

Open
rekmarks opened this issue Apr 17, 2024 · 0 comments
Open

daemon: followLocatorNameChanges() implementation is incomplete #2215

rekmarks opened this issue Apr 17, 2024 · 0 comments
Labels
daemon Issues pertaining the the pet dæmon 🐈‍⬛ enhancement New feature or request

Comments

@rekmarks
Copy link
Contributor

rekmarks commented Apr 17, 2024

#2195 introduced reverseLocate() and followLocatorNameChanges() to the directory. The implementation of the latter is incomplete, in that the subscriptions it creates can never be cancelled. This is unacceptable, and we have two options for solving this problem. We need more data before determining which path to pursue.

Option 1: Add cancellation

Subscribers must be furnished with the means to cancel their subscriptions. This can be done by exposing the ability to cause the async iterator that implements the subscription to return. In addition, once we have garbage collection, garbage collecting a locator should cancel any subscriptions for that locator.

Option 2: Punt this concern to the client layer

@kriskowal had the insight that followNameChanges() together with reverseLocate() furnishes the client with the capability to subscribe to the names of named locators. If the client encounters an unnamed locator, it will still be notified whenever such a locator is named. This "light client" approach may be sufficient for user interfaces, which is the purpose of followLocatorNameChanges(). It would also reduce the scope of garbage collection. This would require the implementation of a standalone module that would be imported by the client. The existing implementation could be repurposed to accomplish this.

@rekmarks rekmarks added the enhancement New feature or request label Apr 17, 2024
@kriskowal kriskowal added the daemon Issues pertaining the the pet dæmon 🐈‍⬛ label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
daemon Issues pertaining the the pet dæmon 🐈‍⬛ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants