-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Streaming rendering and server buffering 8.0 #30504
Comments
@guardrex I wanted to add a few comments for you to consider when writing up the documents. I was putting together a blazor streaming rendering demo and decided to have it obtain data to display on the page from a separate minimal API that streamed back data using IAsyncEnumerable. It worked perfectly locally, but when deployed to an Azure Web App, even my minimal API appeared to not be streaming. I was not sure the exact backend architecture of Azure (YARP respone caching, etc), but noticed if I added this after each items was yield returned (within the IAsyncEnumerable): It would be interesting if this customer did the same thing in his streaming blazor project to see if it streamed correctly for his particular hosting provider when flushing the buffer after each async update to his page (when streaming rendering the response). But if you are writing up the documents, maybe just include some general comments and suggestions including configuring the web server, but also flushing the response as shown above. |
@guardrex I think in RC2, the HttpContext will be registered globally as a CascadingParameter. At that point, I would be interesting to document this as a potential solution to caching (compared to the default template). First the component would need to inject the HttpContext using the new technique (which will not work until RC2):
In the demo project template, where there is a delay awaited, to add flushing the buffer like this:
It would be interesting to check if this worked, and include this in the docs for Azure (etc) if it does work. |
Thanks ... I'll take a look in detail when I reach this. It could take a little while tho ... I'm buried in higher priority .NET 8 doc work right now 🗻⛏️😅. I'll reach this prior to RTM. |
That PR addressed one aspect of this. I'll circle around in a bit to deal with the additional items. |
Per dotnet/aspnetcore#50915 (comment)
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: