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

Add Backpressure / Supervisor #1695

Merged
merged 7 commits into from
Feb 20, 2021

Conversation

etspaceman
Copy link
Contributor

This PR backports Supervisor from CE3 and adds a Backpressure interface, which allows users to supply a rate-limiting strategy to Effects.

@vasilmkd
Copy link
Member

vasilmkd commented Feb 16, 2021

Thank you for the contribution.

First of all, I might have missed some discussion somewhere so these comments may be totally irrelevant.

A question to the other maintainers, with CE3 being so close to release, was there a plan for backporting any of the new cool things to CE2, in particular Supervisor?

Backpressure seems interesting to me, and maybe it would be a nice addition to cats.effect.std instead in CE3. I would however, like to see a more generalized version, which allows for specifying a time interval with which more bandwidth-like constructs can be encoded in addition to just rate limiting.

Thoughts?

@etspaceman
Copy link
Contributor Author

was there a plan for backporting any of the new cool things to CE2, in particular Supervisor?

To answer this specifically for why this was proposed, our team needed the Supervisor trait so we created this back-port in our own code-base.

@vasilmkd
Copy link
Member

I figured I was missing some context 😄

@etspaceman
Copy link
Contributor Author

I would however, like to see a more generalized version, which allows for specifying a time interval with which more bandwidth-like constructs can be encoded in addition to just rate limiting.

I am open to ideas here. I'm not sure what you mean by a time interval, could you provide an example?

@vasilmkd
Copy link
Member

Something similar to fs2's metered.

@djspiewak
Copy link
Member

I'm not sure Fs2's metered is all that similar here. Really the problem is that there are a lot of different ways you might want to encode backpressure, and this really just represents one very simple one. For anything really meaningfully interesting, moving over to Fs2 rather than trying to do it with "pure" cats effect is almost certainly the right approach.

More generally regarding CE2… I definitely don't mind stuff getting backported as people need it, though it's unlikely I would have enough time to personally do so.

@djspiewak djspiewak merged commit c2e9db5 into typelevel:series/2.x Feb 20, 2021
@kubukoz
Copy link
Member

kubukoz commented Mar 22, 2021

Maybe I'm missing something, but is Backpressure going to be in 3.x?

@djspiewak
Copy link
Member

but is Backpressure going to be in 3.x?

I was thinking about that. It could be! It's a very common scenario, but also a scenario which is technically better suited to fs2.

At this point, it's too late to get anything into 3.0, but we should discuss whether it should be in 3.1

@kubukoz
Copy link
Member

kubukoz commented Mar 23, 2021

Mmm. I'll make a note about this in The Thing That Just Won't Come Out Until Last Minute.

@kubukoz kubukoz mentioned this pull request Mar 23, 2021
@etspaceman etspaceman deleted the supervisorBackpressure branch March 24, 2021 14:09
@kubukoz
Copy link
Member

kubukoz commented Jul 26, 2021

Mmm. I'll make a note about this in The Thing That Just Won't Come Out Until Last Minute.

Narrator: he didn't. This isn't in in the migration guide 😅

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.

4 participants