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

Improved buffering #477

Merged
merged 20 commits into from
Sep 30, 2024
Merged

Improved buffering #477

merged 20 commits into from
Sep 30, 2024

Conversation

akhenry
Copy link
Owner

@akhenry akhenry commented Sep 11, 2024

NOTE: nasa/openmct#7837 will need be merged before this.

  1. Merge Improve telemetry buffering implementation nasa/openmct#7837
  2. Update package.json to point it to npm latest

Adapts the openmct-yamcs plugin for the API changes in nasa/openmct#7838

Describe your changes:

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

@akhenry akhenry marked this pull request as ready for review September 11, 2024 18:58
@@ -249,6 +251,101 @@ test.describe('Realtime telemetry displays', () => {
}
});

test.only('Open MCT does not drop telemetry when a burst of telemetry arrives', async ({ page }) => {
Copy link
Collaborator

@unlikelyzero unlikelyzero Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test('Does not drop telemetry when a burst of telemetry greater than the sharedbuffer arrives')

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, will do.

Copy link
Collaborator

@shefalijoshi shefalijoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine overall, however, the staleness and remote clock changes should be moved out into separate PRs.

@shefalijoshi shefalijoshi self-requested a review September 25, 2024 19:35
Copy link
Collaborator

@shefalijoshi shefalijoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to test staleness successfully, but we can do this once it's deployed to banner or shehulk. Looks good to me.

@akhenry
Copy link
Owner Author

akhenry commented Sep 29, 2024

Test was failing due to genuine bug introduced in this refactor of telemetry batching. Previously housekeeping WebSocket messages bypassed the throttling / batching process altogether, which meant that important housekeeping messages (such as those that go back and forth when setting up a telemetry subscription) were never dropped.

With this refactor the WebSocket buffering code was greatly simplified, removing the special handling for housekeeping messages. One of the automated tests triggered an edge case where throttling is induced during the initial handshaking that takes place when initializing a subscription, causing some subscriptions to never get established properly. Luckily our tests caught this.

I made a small change to the telemetry throttling implementation so that instead of throttling all messages when the UI thread is overloaded, a regex can optionally be supplied that is used to decided whether a given message should be throttled. This allows us to avoid culling housekeeping messages.

Copy link
Collaborator

@shefalijoshi shefalijoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@akhenry akhenry removed the request for review from unlikelyzero September 30, 2024 21:52
@akhenry akhenry merged commit ac4b0f3 into master Sep 30, 2024
9 checks passed
@akhenry akhenry mentioned this pull request Oct 1, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants