Skip to content

RFC: Cross-Tab Synchronization Exchange #1062

@kitten

Description

@kitten

Summary

Especially with Graphcache we've discussed cases where a sufficiently complex app may want to synchronize what's happening across apps. As part of this one may have multiple tabs of a Graphcache application opened.

We can make the assumption that it doesn't matter whether the cache itself is 100% in sync, but we hypothesize that two tabs of Graphcache can already coexist (Needs Testing)

A cross-tab synchronization exchange can therefore focus on distributing results across all apps.

Proposed Solution

Create an exchange that deduplicates fetching results and distributes results to other tabs, maybe using the BroadcastChannel API.

  • Multiple exchanges of cross-tabs sync should be aware of one another
  • Only one tab (the latest active one?) should execute an operation
  • The results from that tab should be distributed to other tabs
  • Check whether Graphcache's persistence conflicts when multiple tabs are open

Related Conversations

Metadata

Metadata

Assignees

No one assigned

    Labels

    future 🔮An enhancement or feature proposal that will be addressed after the next release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions