Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Editing a bounce should break connections using that bounce #470

Open
themaxhero opened this issue Mar 5, 2018 · 1 comment
Open

Editing a bounce should break connections using that bounce #470

themaxhero opened this issue Mar 5, 2018 · 1 comment

Comments

@themaxhero
Copy link
Member

themaxhero commented Mar 5, 2018

While discussing with @kress95 we had some thoughts about its implementation:

How should we check if a bounce is being used?

There are three options for that:

  1. Reference counting, anytime something uses a bounce it would do a dispatch that increments the reference count (and the reverse is also true):
  • This method is simple in theory but complex in practice, forgetting to dispatch would lead to incorrect behaviour.
  • Dispatches should happen after events, so tabs can keep correct reference counts.
  • I'm not a fan of this method, it's simple but error prone.
  • This method is the fastest to run.
  1. Checking tunnels. but they aren't properly implemented yet:
  • This method is complex and slow but fast enough for single check.
  • The code is complex depending on Tunnels implementation, if tunnels are owned by servers, the function would have to fold every server.
  1. A request would tell us if a bounce is being used or not:
  • This method is the slower to run but faster to code.
  • Using this method is a PITA, it requires two messages to perform one thing: one to ask to edit a Bounce, another to check the request response.

Should we break all active channels that use this bounce?

We're assuming that editing a bounce kills every active connection using it, but does it apply to channels? A channel using that bounce should also be killed?


@PedroHLC @renatomassaro

@chrisfls
Copy link
Member

chrisfls commented Mar 5, 2018

I'm leaning toward the 2nd method, but my opinion might change depending on the outcome of the later problem (or even other not discussed yet problem).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants