[WIP] Collaboration: Migrate real-time storage from post meta to custom tables#11229
Draft
josephfusco wants to merge 12 commits intoWordPress:trunkfrom
Draft
[WIP] Collaboration: Migrate real-time storage from post meta to custom tables#11229josephfusco wants to merge 12 commits intoWordPress:trunkfrom
josephfusco wants to merge 12 commits intoWordPress:trunkfrom
Conversation
Create wp_collaboration and wp_awareness tables for storing real-time collaboration data. Register new table properties on wpdb and bump wp_db_version to trigger the upgrade routine.
Introduce WP_Collaboration_Storage interface and WP_Collaboration_Table_Storage implementation that persists collaboration and awareness data to the custom database tables.
Introduce WP_HTTP_Polling_Collaboration_Server REST controller that handles document syncing and presence awareness via HTTP long-polling.
Remove the old WP_Sync_Post_Meta_Storage, WP_HTTP_Polling_Sync_Server, and WP_Sync_Storage interface, replaced by the new collaboration-namespaced classes in previous commits.
Add wp_is_collaboration_enabled() gate that checks both the option and db_version. Add wp_delete_old_collaboration_data() cron handler. Update wp-settings.php require paths, rest-api.php instantiation, and default-filters.php hooks to use the new collaboration classes. Remove the wp_sync_storage post type and fix get_post() guard.
Add comprehensive PHPUnit tests for WP_HTTP_Polling_Collaboration_Server covering updates, awareness, permissions, and schema validation. Remove the old sync server tests. Update autosaves and schema-setup tests for the collaboration feature gate changes.
Add end-to-end tests covering document sync, presence awareness, and undo/redo behavior for real-time collaboration.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
…ion-data-refactor
…ion-data-refactor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the post meta-based storage backend for real-time collaboration with dedicated
wp_collaborationandwp_awarenessdatabase tables, improving query performance and eliminating post meta pollution.wp_collaborationandwp_awarenesstables with aupgrade_700()schema migrationWP_Collaboration_Storageinterface andWP_Collaboration_Table_StorageimplementationWP_HTTP_Polling_Sync_ServerwithWP_HTTP_Polling_Collaboration_Serverwp_is_collaboration_enabled()feature gate (checks both option and db_version)wp_sync_storagepost type and legacy sync classes