Baldinof / roadrunner-bundle

A RoadRunner worker integrated in your Symfony app
MIT License
255 stars 46 forks source link

Feat: support RR[>=2023.3] streamed responses #130

Open FluffyDiscord opened 7 months ago

FluffyDiscord commented 7 months ago

Fix #101

Added support for streaming for:

In this PR the StreamedResponse still loads eveything in memory if the provided callback is not a generator. The only solution to be fully compatible would be to save the content to temp file and then stream that file. Of course, now the issue could running out of space on storage, the read -> save -> read -> send overhead and waiting basically until the original callback finished and getting only half of the streamed response feature set.

More info here: https://roadrunner.dev/docs/http-resp-streaming/current/en

This is a breaking change for anyone using old RR, as they need to update the binary. Nothing else should be needed.

FluffyDiscord commented 7 months ago

@Baldinof are you still fully maitaining this repository? or you moved to different projects and now this is in maintenance-only mode?

Baldinof commented 7 months ago

Hello @FluffyDiscord I'm still maintaining it, sorry if I've been late to respond!

I'll have look on all PRs this week.

Thanks for your contributions :)

FluffyDiscord commented 7 months ago

I think we should also add Spiral\RoadRunner\Http\Exception\StreamStoppedException to the list of default ignored exceptions as this can cause false reports. It should be handled by the generators that are added in this PR though.

Baldinof commented 5 months ago

Any news here @FluffyDiscord Do you want me to take this PR over?

FluffyDiscord commented 5 months ago

Any news here @FluffyDiscord Do you want me to take this PR over?

Hi and sorry, I kind of forgot about this since I am using my fork. I think this should be it, for the changes. Now only tests should be missing. Let me know if theres anything else to do before the tests.

L3tum commented 4 months ago

Hey @FluffyDiscord / @Baldinof , any news on this?

FluffyDiscord commented 4 months ago

Hey @FluffyDiscord / @Baldinof , any news on this?

I have abandoned this package and made one myself. This PR can be either closed or finished by @Baldinof if he wants to.

L3tum commented 4 months ago

@FluffyDiscord Alright, I'll probably be looking into this in a few weeks in case you don't wanna take over @Baldinof . I can't promise anything yet, though