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

Remove WebSockets from Canvas expressions interpreter #29792

Merged
merged 20 commits into from
Feb 5, 2019

Conversation

chrisdavies
Copy link
Contributor

@chrisdavies chrisdavies commented Feb 1, 2019

This PR removes WebSockets from the interpreter, and uses an RPC-like function calling mechanism to run functions on the server.

This does not do any optimizations, and there is likely some leftover stuff in the server layer that needs tidying up (such as the workers / threading logic).

There is an optimization PR which builds on top of this one: #29847

Relates to #29118

@chrisdavies chrisdavies requested a review from a team as a code owner February 1, 2019 01:13
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@chrisdavies
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@chrisdavies chrisdavies changed the title [WIP] Remove WebSockets from Canvas expressions interpreter Remove WebSockets from Canvas expressions interpreter Feb 1, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@chrisdavies chrisdavies requested a review from monfera February 1, 2019 18:21
@chrisdavies chrisdavies added v7.0.0 Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Feb 1, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@chrisdavies
Copy link
Contributor Author

@stacey-gammon and @w33ble, this should be reviewable again, just FYI.

Copy link
Contributor

@monfera monfera left a comment

Choose a reason for hiding this comment

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

Loading a canvas workpad I got this warning, not yet sure if it's related to the PR:

> Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'nonce-8rZ8dFCSvlkMhWbM'". Either the 'unsafe-inline' keyword, a hash ('sha256-SHHSeLc0bp6xt4BoVVyUy+3IbVqp3ujLaR+s+kSP5UI='), or a nonce ('nonce-...') is required to enable inline execution. ^ A single error about an inline script not firing due to content security policy is expected!

Crossed out as it's also appearing in master but found the TypeError: Cannot read property 'args' of undefined from interpret.js:226 exception

yarn.lock Show resolved Hide resolved
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

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

Reviewed the code, pulled down and just verified sample data sets loaded on canvas.

Copy link
Contributor

@monfera monfera left a comment

Choose a reason for hiding this comment

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

Looks great! Stress testing - copying both pages of the eCommerce example 5 times, for a 10-page workpad with lots of queries on all pages showed a relatively modest update time increase (5 seconds to 4.5 seconds) - without batching.

I could load and work with workbooks, including some custom plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v6.7.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants