-
Notifications
You must be signed in to change notification settings - Fork 534
OnSubscribe vs return Subscription #43
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
Comments
Who cares more about having access to the It seems the last version of |
I agree with @jbrisbin. What are the pros/cons for the proposed alternative solutions? |
I guess the point is where the Publisher is representing a cold source vs a hot source. Since the state is held by the Subscription, there will be a need to expose it to fill its buffer from the upstream perspective meaning that the publisher can also interact with the subscription. |
Since the Publisher creates the Subscription internally (in subscribe) it
|
Sure, my point is I would rearrange the sentence to not limit the Subscriber only to have access to this Subscription. The publisher whether it holds a list of them or just register a new event loop/actor etc will certainly need to interact with the Subscription. |
The only parties involved in the usage of a Subscription are the Publisher and the Subscriber, no party outside of this very select group should by default have any interest in it. Sure, you can implement both such that they expose the Subscription to outsiders, but that would be useful only for purposes not covered by the spec. The other reason for not returning the Subscription—in fact the reason for returning |
I think this is the most concrete reason for why Thus, I think we need to support purely async implementations and retain the |
The pro for The |
Summing it up: we seem to agree on keeping the current interface definition, but we should add clarification that for the purposes of this specification a Subscription is shared by exactly one Publisher–Subscriber pair (i.e. both have access, and none other needs access for the scope of Reactive Streams alone). Together with the goal of specifying a completely asynchronous exchange this would then also be the documented rationale behind having |
I'm in favor of keeping |
I agree with keeping the current ones that return
Agreed. |
+1 |
+1 |
Sounds like the sweet sound of consensus to me. Moving to close. |
The mechanism for receiving a
Subscription
is worth discussion as there are differing views on this.Currently it is passed back from the
Publisher
to theSubscriber
:It could however be like this:
Or as shown here it could be:
The text was updated successfully, but these errors were encountered: