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

Backpressure: Window by Size #1828

Closed
benjchristensen opened this issue Nov 6, 2014 · 13 comments
Closed

Backpressure: Window by Size #1828

benjchristensen opened this issue Nov 6, 2014 · 13 comments
Milestone

Comments

@benjchristensen
Copy link
Member

The window operators that use time or Observable boundaries do not participate in backpressure ... they act as "temporal" operators for flow control and not reactive pull. The window(int size) variant however seems like it should work with reactive pull backpressure and behave similarly to groupBy.

In other words, it can be applied to a cold observable and correctly compose backpressure to emit windows and items within each window at a controlled rate.

Any thoughts or opinions on this?

@benjchristensen benjchristensen added this to the 1.0 milestone Nov 6, 2014
@headinthebox
Copy link
Contributor

Yes, anything with count sounds like a slamdunk to participate in back-pressure. In fact, I can imagine we would ask for chunks the size of the window.

@benjchristensen benjchristensen changed the title Window by Size Backpressure? Backpressure: Window by Size Nov 6, 2014
@benjchristensen
Copy link
Member Author

I'll try and get this done in time.

@benjchristensen
Copy link
Member Author

I'm probably not going to get this in for 1.0.0 so it will have to come during the 1.0.x releases.

@benjchristensen benjchristensen modified the milestones: 1.0.x, 1.0 Nov 9, 2014
@pakoito
Copy link

pakoito commented Nov 9, 2014

In layman's terms, this feature request is a sliding window for the latest up to N elements over T time, right?

I'm going through the documentation and haven't found anything similar, and it's a common use component in this environments.

@benjchristensen
Copy link
Member Author

@pakoito no, this is adding reactive pull backpressure to already existing functionality.

Go ahead and open a new issue with your use case if the operators are not working for you (see http://reactivex.io/RxJava/javadoc/rx/Observable.html#window(long,%20long,%20java.util.concurrent.TimeUnit,%20int,%20rx.Scheduler) )

@pakoito
Copy link

pakoito commented Nov 9, 2014

That operator is what I was after, thank you. I would add to the documentation/example that the windows for that case can overlap, unlike other count based window/buffer operations.

@zsxwing
Copy link
Member

zsxwing commented Nov 11, 2014

The window(int size) variant however seems like it should work with reactive pull backpressure and behave similarly to groupBy.

I think it's more like buffer. Only support to request the number of Windows., but don't support backpressure for each Window Observable. Right?

@benjchristensen
Copy link
Member Author

I actually see this one as more similar to groupBy as it needs to provide backpressure on all windows, otherwise there isn't any backpressure.

@akarnokd
Copy link
Member

Is this in the works? @zsxwing PR #1862 was closed do you want to revive it?

@zsxwing
Copy link
Member

zsxwing commented Mar 12, 2015

I'm busy with other work and may not go back to work on this one soon. If someone is interested in the issue, please go head.

@akarnokd
Copy link
Member

Window supports backpressure on the outer Observable as of 1.0.14 and there is a PR that adds backpressure support to the inner observable: #3150.

@benjchristensen benjchristensen modified the milestones: 1.1, 1.0.x Aug 28, 2015
@akarnokd
Copy link
Member

akarnokd commented Feb 9, 2016

Backpressure support added + there is a subsequent fix to this, #3678

@akarnokd
Copy link
Member

Closing via #3678.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants