Skip to content

Sync Protocol #797

Open
Open

Description

@adamziel

Let's use this core trac issue for discussion:

https://core.trac.wordpress.org/ticket/60375


Let's formalize a protocol for two Playgrounds (and, later on, WordPresses) to exchange updates with each other.

Technically, this would involve:

  • Using disjoint numerical space for autoincrement IDs to avoid conflicts
  • A network transport
  • A local transport (for apps using "Headless Playground" as a storage backend)
  • Bits from the Transfer Protocol:
    • Replacing host-specific data like site URLs with placeholders
    • Providing “export” and “import” extension points for plugins
    • Restoring the site URL and other host specific data from placeholders
    • Communicate any issues like missing PHP extensions, mismatched PHP version etc
  • A hosting connector to publish the changes
  • ...more, for sure

Related issues

Open questions

  • How to reconcile two plugins writing serialized data to the same database record?

Related reading

cc @dmsnell

Activity

  1. changed the title [-]Sync Protocol[/-] [+]Shape Sync Protocol[/+] on Feb 29, 2024
  2. adamziel commented on Mar 11, 2024

    @adamziel
    CollaboratorAuthor

    @bgrgicak came up with an idea to try https://pouchdb.com/:

    The backend can run in the browser and in Node. Technically we should be able to sync two browsers, it uses local storage and some node storage so it’s persistent. This would also resolve some offline support issues. Because when Playground would get back online. Sync would start and all instances would get updates.

  3. eliot-akira commented on Mar 15, 2024

    @eliot-akira
    Collaborator

    For reference, here's an in-depth article about how WP Migrate handles syncing data across sites.

    Syncing WordPress Database Changes Between Environments

    They discuss the challenge of merging data and conflict resolution, in particular with custom post types and tables created by third-party plugins such as ACF, EDD, WooCommerce.

  4. moved this to Project: Up Soon in Playground Boardon Jun 30, 2024
  5. moved this from Project: Triage to Project: Not now in Playground Boardon Jul 1, 2024
  6. changed the title [-]Shape Sync Protocol[/-] [+]Sync Protocol[/+] on Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions