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

WIP fix: yet another prefix lossy subscription sketch #5418

Closed
wants to merge 2 commits into from

Conversation

erights
Copy link
Member

@erights erights commented May 21, 2022

Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see how the introduction of the updateCount can help satisfy the "make a client-side notifier for a subscription" problem.

The reason why the implementation in #5403 handles configurable subscription history is that the other "prefix lossy" subscriptions are essentially the same as historyLimit=1, but I see legitimate uses of historyLimit=Infinity (current subscription implementation) and historyLimit=0 (start with the next published value). I want to be sure we are agreed upon breaking compatibility and restricting existing flexibility before we remove support for all subscriptions except historyLimit=1.

Having only "prefix lossy" subscriptions available to me means that some of my uses will require more bookkeeping on the client-side to consume as intended, and also while necessarily consuming more memory on the server-side.

packages/notifier/src/subscriber.js Outdated Show resolved Hide resolved
packages/notifier/README.md Outdated Show resolved Hide resolved
Comment on lines 138 to +143
* @typedef {object} SharableSubscription
* @property {() => ERef<SubscriptionInternals<T>>} getSharableSubscriptionInternals
* Used to replicate the multicast values at other sites. To manually create a
* local representative of a Subscription, do
* ```js
* localIterable =
* makeSubscription(E(remoteIterable).getSharableSubscriptionInternals());
* ```
* The resulting `localIterable` also supports such remote use, and
* will return access to the same representation.
* @property {GetIterationSince<T>} getIterationSince
* Internally used to get the "current" SharableSubscriptionInternals
* in order to make a subscription iterator that starts there.
* The answer is "current" in that it was accurate at some moment between
* when you asked and when you got the answer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bookmarking this code so that I can refer to it.

@erights erights assigned gibson042 and unassigned erights Jun 6, 2022
@turadg turadg removed their request for review July 14, 2022 16:00
@turadg
Copy link
Member

turadg commented Jul 14, 2022

issue is closed #5413

@turadg turadg closed this Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants