-
Notifications
You must be signed in to change notification settings - Fork 229
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
Conversation
0433520
to
cab0a23
Compare
There was a problem hiding this 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.
79a6311
to
3369b16
Compare
3369b16
to
3a73b03
Compare
* @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. |
There was a problem hiding this comment.
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.
issue is closed #5413 |
Based on @dtribble 's at https://gist.github.com/dtribble/4e7cc65fb0fa8aab5a4069e80d915454