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

Initial implementation #1

Merged
merged 3 commits into from
Mar 26, 2014
Merged

Initial implementation #1

merged 3 commits into from
Mar 26, 2014

Conversation

rkuhn
Copy link
Member

@rkuhn rkuhn commented Feb 28, 2014

This includes a first working prototype of the SPI, API and TCK. It is
meant to serve as a basis for more detailed discussion.

Most coding was done by Mathias Doenitz (@sirthias) and Johannes Rudolph
(@jrudolph) for Typesafe.

@@ -0,0 +1,119 @@
Reactive-Streams SPI Specification
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this file be spec.md?

This includes a first working prototype of the SPI, API and TCK. It is
meant to serve as a basis for more detailed discussion.

Most coding was done by Mathias Doenitz (@sirthias) and Johannes Rudolph
(@jrudolph) for Typesafe.

### Publisher::subscribe(Subscriber)

* when Publisher is in `completed` state
Copy link
Contributor

Choose a reason for hiding this comment

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

Why would a Publisher be in a completed state when subscribe is invoked?

Is this assuming Publisher is "hot", as in a Subject? On a "cold" Publisher a subscribe should just do the work each time it is subscribed.

Same goes for the error state.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess implementation can adjust the buffering part when supplying a Publisher (which I would rather read Observable).

Copy link
Contributor

Choose a reason for hiding this comment

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

We need to clarify if a Publisher is intended to multicast or not. It would be easier if we separate out like Observable and Subject as they have different characteristics and purposes.

Copy link
Member Author

Choose a reason for hiding this comment

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

A Publisher may run out of elements, in which case it is “completed”. This is true for example for a TCP stream. A Publisher which just publishes the elements of a strict collection could indeed be implemented such that it reruns for every new Subscriber; it could also realized by creating a PublisherFactory which basically produces wrapped iterators for every new Subscriber. That area is currently not covered by this proposal, but we should of course make sure that the rules here support all use-cases we want to allow.

@benjchristensen
Copy link
Contributor

Roland, George and I spoke over Skype to clarify the scope of this ... it is narrower than I interpreted so many of my questions are invalidated.

George and I are writing code with our various use cases to try out this proposal and see how it fits and if there are any tweaks we need or would like to propose. We'll respond with more in the next several days.

@rkuhn
Copy link
Member Author

rkuhn commented Mar 4, 2014

Thanks, Ben! Looking forward to your feedback.

We’ll draft a README to be added to this PR which summarizes what we talked about, to save others the same trouble.


**The API** specifies the types that the users of Reactive Stream libraries use.

***The Technology Compatibility Kit (TCK)*** is astandard test suite for conformance testing of implementations.
Copy link

Choose a reason for hiding this comment

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

s/astandard/a standard/

rkuhn added a commit that referenced this pull request Mar 26, 2014
@rkuhn rkuhn merged commit dd11918 into master Mar 26, 2014
@rkuhn rkuhn deleted the wip-initial branch March 26, 2014 13:42
ttulka added a commit to ttulka/reactive-streams-jvm that referenced this pull request Jun 12, 2017
cancelled being true here is impossible because the only way to get that
true is by submitting a Subscription to the Subscriber that happens once
and under this condition.
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.

6 participants