Skip to content
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

Sync worker: kickoff #1056

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Commits on Mar 7, 2023

  1. Configuration menu
    Copy the full SHA
    3a6e835 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2023

  1. Load features in platform init instead of main

    So that features are available through the Platform. I think logically it makes sense to have the Platform load the features, as where features are coming from depends on the Platform. On Web they come from localStorage, on other platforms they might come from elsewhere.
    
    This will allow us to inject the FeatureSet into a SyncFactory class in next commits.
    psrpinto committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    ced4d25 View commit details
    Browse the repository at this point in the history
  2. Extract interface from Sync

    psrpinto committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    fb5a4e2 View commit details
    Browse the repository at this point in the history
  3. Make the start() method async

    When sync is running in a worker, the start() method will need to be async, as we will need to send messages to the worker to start the sync.
    psrpinto committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    fb7d4e0 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. Use a SyncFactory to make instances of Sync

    I think it makes sense to not have the logic of whether sync runs in a worker in Client, as that is platform-specific, so that logic should not be in the matrix layer.
    psrpinto committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    6c78eef View commit details
    Browse the repository at this point in the history
  2. Add SyncProxy

    Will proxy calls to a worker. Doesn't do anything yet.
    psrpinto committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    da09121 View commit details
    Browse the repository at this point in the history
  3. Return a SyncProxy when feature flag is enabled

    ... and the browser supports SharedWorkers.
    psrpinto committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    5c6343c View commit details
    Browse the repository at this point in the history
  4. Spawn sync worker

    Doesn't do anything yet.
    psrpinto committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    7074984 View commit details
    Browse the repository at this point in the history
  5. Don't precache sync worker in service worker

    Without this the build fails.
    psrpinto committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    952eccd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    67153dd View commit details
    Browse the repository at this point in the history
  7. Disable typescript checks on the sync worker

    Will address this in a follow-up PR as it's not trivial to fix.
    psrpinto committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    9a2674a View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Configuration menu
    Copy the full SHA
    721543a View commit details
    Browse the repository at this point in the history
  2. Add copyright notices

    psrpinto committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    2b64cd5 View commit details
    Browse the repository at this point in the history