Skip to content

Commit eaca9d4

Browse files
committed
Merge pull request #147 from 2m/various-typo-fixes
Fix various typos
2 parents 5851bb7 + 5911d5c commit eaca9d4

File tree

4 files changed

+55
-49
lines changed

4 files changed

+55
-49
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The role of this group is detailed in the following, additions to this list are
2222
Gatekeepers commit to the following:
2323

2424
1. 1-week SLA on :+1: or :-1: Pull Requests
25-
* If a Gatekeeper will be unavailabile for a period of time, notify @reactive-streams/contributors and appoint who will vote in his/her place in the mean time
25+
* If a Gatekeeper will be unavailable for a period of time, notify @reactive-streams/contributors and appoint who will vote in his/her place in the mean time
2626
2. tag @reactive-streams/contributors with a deadline when there needs to be a vote on an Issue,
2727
with at least 1 week of notice (see rule 1 above)
2828

@@ -54,7 +54,7 @@ Follow these guidelines when creating public commits and writing commit messages
5454
1. If your work spans multiple local commits (for example; if you do safe point commits while working in a feature branch or work in a branch for long time doing merges/rebases etc.) then please do not commit it all but rewrite the history by squashing the commits into a single big commit which you write a good commit message for (like discussed in the following sections). For more info read this article: [Git Workflow](http://sandofsky.com/blog/git-workflow.html). Every commit should be able to be used in isolation, cherry picked etc.
5555

5656
2. First line should be a descriptive sentence what the commit is doing. It should be possible to fully understand what the commit does—but not necessarily how it does it—by just reading this single line. We follow the “imperative present tense” style for commit messages ([more info here](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)).
57-
57+
5858
It is **not ok** to only list the ticket number, type "minor fix" or similar. In order to help with automatic filtering of the commit history (generating ChangeLogs, writing the migration guide, code archaeology) we use the following encoding:
5959

6060
3. Following the single line description should be a blank line followed by an enumerated list with the details of the commit. For very simple commits this may be empty.

CopyrightWaivers.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ viktorklang | Viktor Klang, [email protected], Typesafe Inc.
2424
smaldini | Stephane Maldini, [email protected], Pivotal Software Inc.
2525
savulchik | Stanislav Savulchik, [email protected]
2626
ktoso | Konrad Malawski, [email protected], Typesafe Inc.
27-
ouertani | Slim Ouertani, [email protected]
27+
ouertani | Slim Ouertani, [email protected]
28+
2m | Martynas Mickevičius, [email protected], Typesafe Inc.

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,25 @@ The purpose of Reactive Streams is to provide a standard for asynchronous stream
44

55
The latest preview release is available on Maven Central as
66

7-
<dependency>
8-
<groupId>org.reactivestreams</groupId>
9-
<artifactId>reactive-streams</artifactId>
10-
<version>1.0.0.M1</version>
11-
</dependency>
12-
<dependency>
13-
<groupId>org.reactivestreams</groupId>
14-
<artifactId>reactive-streams-tck</artifactId>
15-
<version>1.0.0.M1</version>
16-
<scope>test</scope>
17-
</dependency>
7+
```xml
8+
<dependency>
9+
<groupId>org.reactivestreams</groupId>
10+
<artifactId>reactive-streams</artifactId>
11+
<version>1.0.0.M1</version>
12+
</dependency>
13+
<dependency>
14+
<groupId>org.reactivestreams</groupId>
15+
<artifactId>reactive-streams-tck</artifactId>
16+
<version>1.0.0.M1</version>
17+
<scope>test</scope>
18+
</dependency>
19+
```
1820

1921
## Goals, Design and Scope ##
2022

2123
Handling streams of data—especially “live” data whose volume is not predetermined—requires special care in an asynchronous system. The most prominent issue is that resource consumption needs to be carefully controlled such that a fast data source does not overwhelm the stream destination. Asynchrony is needed in order to enable the parallel use of computing resources, on collaborating network hosts or multiple CPU cores within a single machine.
2224

23-
The main goal of Reactive Streams is to govern the exchange of stream data across an asynchronous boundary – think passing elements on to another thread or thread-pool — while ensuring that the receiving side is not forced to buffer arbitrary amounts of data. In other words, backpressure is an integral part of this model in order to allow the queues which mediate between threads to be bounded. The benefits of asynchronous processing would be negated if the communication of backpressure were synchronous (see also the [Reactive Manifesto](http://reactivemanifesto.org/)), therefore care has been taken to mandate fully non-blocking and asynchronous behavior of all aspects of a Reactive Streams implementation.
25+
The main goal of Reactive Streams is to govern the exchange of stream data across an asynchronous boundary – think passing elements on to another thread or thread-pool — while ensuring that the receiving side is not forced to buffer arbitrary amounts of data. In other words, backpressure is an integral part of this model in order to allow the queues which mediate between threads to be bounded. The benefits of asynchronous processing would be negated if the communication of backpressure were synchronous (see also the [Reactive Manifesto](http://reactivemanifesto.org/)), therefore care has been taken to mandate fully non-blocking and asynchronous behavior of all aspects of a Reactive Streams implementation.
2426

2527
It is the intention of this specification to allow the creation of many conforming implementations, which by virtue of abiding by the rules will be able to interoperate smoothly, preserving the aforementioned benefits and characteristics across the whole processing graph of a stream application.
2628

@@ -35,7 +37,7 @@ In summary, Reactive Streams is a standard and specification for Stream-oriented
3537

3638
The Reactive Streams specification consists of the following parts:
3739

38-
**The API** specifies the types to implement Reactive Streams and achieve interoperablility between different implementations.
40+
***The API*** specifies the types to implement Reactive Streams and achieve interoperability between different implementations.
3941

4042
***The Technology Compatibility Kit (TCK)*** is a standard test suite for conformance testing of implementations.
4143

@@ -81,8 +83,8 @@ public interface Publisher<T> {
8183
| <a name="1.3">3</a> | `onSubscribe`, `onNext`, `onError` and `onComplete` signaled to a `Subscriber` MUST be signaled sequentially (no concurrent notifications) |
8284
| <a name="1.4">4</a> | If a `Publisher` fails it MUST signal an `onError` |
8385
| <a name="1.5">5</a> | If a `Publisher` terminates successfully (finite stream) it MUST signal an `onComplete` |
84-
| <a name="1.6">6</a> | If a `Publisher` signals either `onError` or `onComplete` on a `Subscriber`, that `Subscriber`’s `Subscription` MUST be considered canceled |
85-
| <a name="1.7">7</a> | Once a terminal state has been signaled (`onError`, `onComplete`) it is REQUIRED that no further signals occur
86+
| <a name="1.6">6</a> | If a `Publisher` signals either `onError` or `onComplete` on a `Subscriber`, that `Subscriber`’s `Subscription` MUST be considered cancelled |
87+
| <a name="1.7">7</a> | Once a terminal state has been signaled (`onError`, `onComplete`) it is REQUIRED that no further signals occur |
8688
| <a name="1.8">8</a> | If a `Subscription` is cancelled its `Subscriber` MUST eventually stop being signaled |
8789
| <a name="1.9">9</a> | Invoking `Publisher.subscribe` MUST return normally. The only legal way to signal failure (or reject a `Subscriber`) is via the `onError` method |
8890
| <a name="1.10">10</a> | `Publisher.subscribe` MAY be called as many times as wanted but MUST be with a different `Subscriber` each time [see [2.12](#2.12)]. It is RECOMMENDED to reject the `Subscription` with a `java.lang.IllegalStateException` if the same `Subscriber` already has an active `Subscription` with this `Publisher`. The cause message MUST include a reference to this rule and/or quote the full rule |
@@ -144,7 +146,7 @@ public interface Subscription {
144146
| <a name="3.10">10</a> | While the `Subscription` is not cancelled, `Subscription.request(long n)` MAY synchronously call `onNext` on this (or other) subscriber(s) |
145147
| <a name="3.11">11</a> | While the `Subscription` is not cancelled, `Subscription.request(long n)` MAY synchronously call `onComplete` or `onError` on this (or other) subscriber(s) |
146148
| <a name="3.12">12</a> | While the `Subscription` is not cancelled, `Subscription.cancel()` MUST request the `Publisher` to eventually stop signaling its `Subscriber`. The operation is NOT REQUIRED to affect the `Subscription` immediately. |
147-
| <a name="3.13">13</a> | While the `Subscription` is not cancelled, `Subscription.cancel()` MUST request the `Publisher` to eventually drop any references to the corresponding subscriber. Re-subscribing with the same `Subscriber` object is discouraged [see [2.12](#2.12)], but this specification does not mandate that it is disallowed since that would mean having to store previously canceled subscriptions indefinitely |
149+
| <a name="3.13">13</a> | While the `Subscription` is not cancelled, `Subscription.cancel()` MUST request the `Publisher` to eventually drop any references to the corresponding subscriber. Re-subscribing with the same `Subscriber` object is discouraged [see [2.12](#2.12)], but this specification does not mandate that it is disallowed since that would mean having to store previously cancelled subscriptions indefinitely |
148150
| <a name="3.14">14</a> | While the `Subscription` is not cancelled, invoking `Subscription.cancel` MAY cause the `Publisher`, if stateful, to transition into the `shut-down` state if no other `Subscription` exists at this point [see [1.13](#1.13)].
149151
| <a name="3.15">15</a> | `Subscription.cancel` MUST NOT throw an `Exception` and MUST signal `onError` to its `Subscriber` |
150152
| <a name="3.16">16</a> | `Subscription.request` MUST NOT throw an `Exception` and MUST signal `onError` to its `Subscriber` |
@@ -164,7 +166,7 @@ public interface Processor<T, R> extends Subscriber<T>, Publisher<R> {
164166
| ID | Rule |
165167
| ------------------------ | ------------------------------------------------------------------------------------------------------ |
166168
| <a name="4.1">1</a> | A `Processor` represents a processing stage—which is both a `Subscriber` and a `Publisher` and MUST obey the contracts of both |
167-
| <a name="4.2">2</a> | A `Processor` MAY choose to recover an `onError` signal. If it chooses to do so, it MUST consider the `Subscription` canceled, otherwise it MUST propagate the `onError` signal to its Subscribers immediately |
169+
| <a name="4.2">2</a> | A `Processor` MAY choose to recover an `onError` signal. If it chooses to do so, it MUST consider the `Subscription` cancelled, otherwise it MUST propagate the `onError` signal to its Subscribers immediately |
168170
169171
While not mandated, it can be a good idea to cancel a `Processors` upstream `Subscription` when/if its last `Subscriber` cancels their `Subscription`,
170172
to let the cancellation signal propagate upstream.
@@ -210,14 +212,13 @@ The Reactive Streams contract allows implementations the flexibility to manage r
210212

211213
In order to allow fully asynchronous implementations of all participating API elements—`Publisher`/`Subscription`/`Subscriber`/`Processor`—all methods defined by these interfaces return `void`.
212214

213-
214215
### Subscriber controlled queue bounds ###
215216

216217
One of the underlying design principles is that all buffer sizes are to be bounded and these bounds must be *known* and *controlled* by the subscribers. These bounds are expressed in terms of *element count* (which in turn translates to the invocation count of onNext). Any implementation that aims to support infinite streams (especially high output rate streams) needs to enforce bounds all along the way to avoid out-of-memory errors and constrain resource usage in general.
217218

218219
Since back-pressure is mandatory the use of unbounded buffers can be avoided. In general, the only time when a queue might grow without bounds is when the publisher side maintains a higher rate than the subscriber for an extended period of time, but this scenario is handled by backpressure instead.
219220

220-
Queue bounds can be controlled by a subscriber by signaling demand for the appropriate number of elements. At any point in time the subscriber knows:
221+
Queue bounds can be controlled by a subscriber signaling demand for the appropriate number of elements. At any point in time the subscriber knows:
221222

222223
- the total number of elements requested: `P`
223224
- the number of elements that have been processed: `N`

0 commit comments

Comments
 (0)