Skip to content

[Blazor] Disconnect alternative proposal #39409

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

Closed
javiercn opened this issue Jan 10, 2022 · 5 comments
Closed

[Blazor] Disconnect alternative proposal #39409

javiercn opened this issue Jan 10, 2022 · 5 comments
Labels
area-blazor Includes: Blazor, Razor Components design-proposal This issue represents a design proposal for a different issue, linked in the description enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-server Pillar: Technical Debt Priority:2 Work that is important, but not critical for the release

Comments

@javiercn
Copy link
Member

Based on #39370

We currently do this within the unload event because that's when we know the page is going to be terminated. As @TanayParikh points out this event isn't raised in some scenarios (closing a tab, mobile user switches apps, etc.) and the circuit remains disconnected for the default reconnection grace period instead of being fully terminated.

We could potentially do better in this scenario by changing the approach into a "soft" disconnect. The way this works is as follows:

  • When we detect an unload event, we register a handler that calls /disconnect(false) on the server.
  • In that case, the server registers a timestamp of when this happened.
  • If a disconnection happens within a grace period after the "disconnect" call happens (lets say 10 seconds) the server terminates the circuit right away instead of adding it to the disconnected registry.
  • If the grace period has passed after the signal was sent, we assume that the original signal was dismissed and we put the circuit on the disconnected registry instead.

This gives us a bit more flexibility as normally, given the unload event is unreliable, we at least get to be notified in other cases. As @TanayParikh mentions, visibilitychange might be another option. (For example, if the visibility changes right before loosing the connection)

@javiercn javiercn added area-blazor Includes: Blazor, Razor Components design-proposal This issue represents a design proposal for a different issue, linked in the description feature-blazor-server labels Jan 10, 2022
@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label Jan 10, 2022
@mkArtakMSFT mkArtakMSFT added this to the Backlog milestone Jan 10, 2022
@ghost
Copy link

ghost commented Jan 10, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mkArtakMSFT mkArtakMSFT modified the milestones: Backlog, .NET 7 Planning Jan 10, 2022
@ghost
Copy link

ghost commented Jan 10, 2022

Thanks for contacting us.

We're moving this issue to the .NET 7 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@ghost
Copy link

ghost commented Jun 29, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mkArtakMSFT mkArtakMSFT modified the milestones: Backlog, BlazorPlanning Nov 5, 2023
@mkArtakMSFT
Copy link
Member

@javiercn are you still interested in us pursuing this proposal?

@mkArtakMSFT
Copy link
Member

I'm closing assuming the answer is "no". If you disagree, please reopen and move to the .NET 9 PLanning milestone.

@mkArtakMSFT mkArtakMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
@ghost ghost locked as resolved and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components design-proposal This issue represents a design proposal for a different issue, linked in the description enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-server Pillar: Technical Debt Priority:2 Work that is important, but not critical for the release
Projects
None yet
Development

No branches or pull requests

6 participants