Skip to content

2.x Design: Flowable/Observable #3348

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

Merged
merged 1 commit into from
Sep 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,39 @@ Consumer requests data when it wishes, and the data is then pushed when the prod

##### Observable

... under discussion ... (related to Observable/Flowable debate)
Stream that supports async and synchronous push. It does not support interactive flow control (`request(n)`).

Usable for:

- hot and cold sources
- sync or async
- push
- 0, 1, many or infinite items

Flow control support:

- buffering, sampling, throttling, windowing, dropping, etc
Copy link
Member

Choose a reason for hiding this comment

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

Note that sampling by itself still can overflow a client if said client doesn't request fast enough or big enough. Same is true for throttling and non-count based buffering (such as with boundary Publisher). Window is a bit both since the outer sequence may overflow the client but the inners can't because UnicastSubject buffers values (see subscription gap problem) and replays them with as the client requests.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, but they are still approaches to flow control.

- temporal and count-based strategies

##### Flowable

Stream that supports async and synchronous push and pull. It supports interactive flow control (`request(n)`).

Usable for:

- hot and cold sources
- sync or async
- push
- pull
- 0, 1, many or infinite items

Flow control support:

- buffering, sampling, throttling, windowing, dropping, etc
- temporal and count-based strategies
- `request(n)` consumer demand signal
- for pull-based sources, this allows batched "async pull"
- for push-based sources, this allows backpressure signals to conditionally apply strategies (i.e. drop, buffer, sample, fail, etc)

##### Observer

Expand Down