-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
FEATURE (performance): compress SetSerializedNodeProperties together; allow experiments in codebase #4263
Draft
skurfuerst
wants to merge
6
commits into
9.0
Choose a base branch
from
90-command-compression
base: 9.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
FEATURE (performance): compress SetSerializedNodeProperties together; allow experiments in codebase #4263
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3fccedb
FEATURE (performance): compress SetSerializedNodeProperties together
skurfuerst db04cf6
Merge remote-tracking branch 'origin/9.0' into 90-command-compression
skurfuerst e8eac46
FEATURE: Content Repository Experimentsf for trying out highly experi…
skurfuerst f52d738
Merge remote-tracking branch 'origin/9.0' into 90-command-compression
skurfuerst f7072ee
FEATURE: Testcases for experimental command compression
skurfuerst b741db9
fix phpcs / phpstan
skurfuerst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
186 changes: 186 additions & 0 deletions
186
...eatures/WorkspacePublishing/WorkspacePublishingWithExperimentalCommandCompression.feature
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
@contentrepository @adapters=DoctrineDBAL | ||
Feature: Workspace publishing with experimental command compression | ||
|
||
If people write texts, the Neos UI will send many SetSerializedNodeProperties commands touching the same node. | ||
This change compacts this to a single SetSerializedNodeProperties command, so that projection rebase is sped up. | ||
|
||
Background: | ||
Given I have no content dimensions | ||
And I have the following NodeTypes configuration: | ||
""" | ||
'Neos.ContentRepository:Root': {} | ||
'Neos.ContentRepository.Testing:Content': | ||
properties: | ||
text: | ||
type: string | ||
""" | ||
And the command CreateRootWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "live" | | ||
| newContentStreamId | "cs-identifier" | | ||
And the graph projection is fully up to date | ||
And the command CreateRootNodeAggregateWithNode is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "cs-identifier" | | ||
| nodeAggregateId | "lady-eleonode-rootford" | | ||
| nodeTypeName | "Neos.ContentRepository:Root" | | ||
|
||
And the event NodeAggregateWithNodeWasCreated was published with payload: | ||
| Key | Value | | ||
| contentStreamId | "cs-identifier" | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| nodeTypeName | "Neos.ContentRepository.Testing:Content" | | ||
| originDimensionSpacePoint | {} | | ||
| coveredDimensionSpacePoints | [{}] | | ||
| parentNodeAggregateId | "lady-eleonode-rootford" | | ||
| nodeName | "child" | | ||
| nodeAggregateClassification | "regular" | | ||
And the event NodeAggregateWithNodeWasCreated was published with payload: | ||
| Key | Value | | ||
| contentStreamId | "cs-identifier" | | ||
| nodeAggregateId | "hamish-mc-stonehill" | | ||
| nodeTypeName | "Neos.ContentRepository.Testing:Content" | | ||
| originDimensionSpacePoint | {} | | ||
| coveredDimensionSpacePoints | [{}] | | ||
| parentNodeAggregateId | "lady-eleonode-rootford" | | ||
| nodeName | "child" | | ||
| nodeAggregateClassification | "regular" | | ||
|
||
And the graph projection is fully up to date | ||
|
||
And the command SetNodeProperties is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "cs-identifier" | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| originDimensionSpacePoint | {} | | ||
| propertyValues | {"text": "content 1"} | | ||
And the command SetNodeProperties is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "cs-identifier" | | ||
| nodeAggregateId | "hamish-mc-stonehill" | | ||
| originDimensionSpacePoint | {} | | ||
| propertyValues | {"text": "content stonehill"} | | ||
# we need to ensure that the projections are up to date now; otherwise a content stream is forked with an out- | ||
# of-date base version. This means the content stream can never be merged back, but must always be rebased. | ||
And the graph projection is fully up to date | ||
And the command CreateWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-test" | | ||
| baseWorkspaceName | "live" | | ||
| newContentStreamId | "user-cs-identifier" | | ||
| workspaceOwner | "owner-identifier" | | ||
And the graph projection is fully up to date | ||
# we need to trigger a rebase for compaction to happen; so we need one more event on the original content stream | ||
And the command SetNodeProperties is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "cs-identifier" | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| originDimensionSpacePoint | {} | | ||
| propertyValues | {"text": "c-orig"} | | ||
|
||
And the command SetNodeProperties is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "user-cs-identifier" | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| originDimensionSpacePoint | {} | | ||
| propertyValues | {"text": "content 2"} | | ||
And the command SetNodeProperties is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "user-cs-identifier" | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| originDimensionSpacePoint | {} | | ||
| propertyValues | {"text": "content 3"} | | ||
And the graph projection is fully up to date | ||
|
||
Scenario: publishing without compression | ||
When the command RebaseWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-test" | | ||
And the graph projection is fully up to date | ||
When the command PublishWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-test" | | ||
And the graph projection is fully up to date | ||
|
||
When I am in the active content stream of workspace "live" and dimension space point {} | ||
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{} | ||
And I expect this node to have the following properties: | ||
| Key | Value | | ||
| text | "content 3" | | ||
|
||
Then I expect exactly 9 events to be published on stream "ContentStream:cs-identifier" | ||
|
||
|
||
Scenario: publishing with simple compression | ||
# compaction of the two write-events into one -> we expect one less event than above. | ||
When the content repository experiment "compactCommands" has value "compress-simple" | ||
When the command RebaseWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-test" | | ||
And the graph projection is fully up to date | ||
When the command PublishWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-test" | | ||
And the graph projection is fully up to date | ||
|
||
When I am in the active content stream of workspace "live" and dimension space point {} | ||
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{} | ||
And I expect this node to have the following properties: | ||
| Key | Value | | ||
| text | "content 3" | | ||
|
||
# THIS IS THE MODIFICATION | ||
Then I expect exactly 8 events to be published on stream "ContentStream:cs-identifier" | ||
|
||
|
||
Scenario: simple compression only happens up to a modification of ANOTHER node | ||
# node1 <-\ | ||
# node1 <-- COMPRESSED | ||
# node2 | ||
# node1 <-\ | ||
# node1 <-- COMPRESSED | ||
And the command SetNodeProperties is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "user-cs-identifier" | | ||
| nodeAggregateId | "hamish-mc-stonehill" | | ||
| originDimensionSpacePoint | {} | | ||
| propertyValues | {"text": "other"} | | ||
|
||
And the command SetNodeProperties is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "user-cs-identifier" | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| originDimensionSpacePoint | {} | | ||
| propertyValues | {"text": "content 2"} | | ||
And the command SetNodeProperties is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "user-cs-identifier" | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| originDimensionSpacePoint | {} | | ||
| propertyValues | {"text": "content 3"} | | ||
And the command SetNodeProperties is executed with payload: | ||
| Key | Value | | ||
| contentStreamId | "user-cs-identifier" | | ||
| nodeAggregateId | "nody-mc-nodeface" | | ||
| originDimensionSpacePoint | {} | | ||
| propertyValues | {"text": "content 4"} | | ||
|
||
When the content repository experiment "compactCommands" has value "compress-simple" | ||
When the command RebaseWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-test" | | ||
And the graph projection is fully up to date | ||
When the command PublishWorkspace is executed with payload: | ||
| Key | Value | | ||
| workspaceName | "user-test" | | ||
And the graph projection is fully up to date | ||
|
||
When I am in the active content stream of workspace "live" and dimension space point {} | ||
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{} | ||
And I expect this node to have the following properties: | ||
| Key | Value | | ||
| text | "content 4" | | ||
|
||
# 10 instead of 13 events | ||
Then I expect exactly 10 events to be published on stream "ContentStream:cs-identifier" | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clever way to test this and great job with the comments!