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

Support merging observables with parameterized OverflowStrategy #1227

Open
ctoomey opened this issue Aug 11, 2020 · 1 comment
Open

Support merging observables with parameterized OverflowStrategy #1227

ctoomey opened this issue Aug 11, 2020 · 1 comment
Milestone

Comments

@ctoomey
Copy link
Contributor

ctoomey commented Aug 11, 2020

Per discussion in #1205.

#1202 provides for merging observables with a fixed, subscriber-backpressure-propagating strategy.

@Avasil
Copy link
Collaborator

Avasil commented Aug 12, 2020

Could you share your ideas @alexandru ?

Copying Alex's comment:

If some buffering is desired however, it would probably be incorrect to add it after the merge, because you can buffer lower-priority items, and keep the high priority items from being processed.

So I'd like us to open an issue for a buffered variant too. I'm thinking that each priority can have its own buffer and then a loop would go and select between them, cycling from high priority to low priority.

... speaking of this, this is how RxJava built a kick-ass merge operation, last time I checked. They created multiple buffers (concurrent queues), assigning them per observable being merged, to reduce the contention on the producers side. But this isn't very relevant to this PR. Mentioning it to keep it in mind for the future.

Alternatively, if we follow our current implementation of merge, we could probably do it with PriorityQueue-based implementation of BufferedSubscriber.

@Avasil Avasil added this to the 3.3.0 milestone Sep 9, 2020
@Avasil Avasil modified the milestones: 3.3.0, 3.4.0 Oct 7, 2020
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

No branches or pull requests

2 participants