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

Editing a bounce should break connections using that bounce #470

@themaxhero

Description

@themaxhero

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions