-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Shareable embeddables as output of "run query in background" (Make it slow) #53066
Comments
Pinging @elastic/kibana-app-arch (Team:AppArch) |
The current line of thinking is that the Other than that, this is actually very crystallizing to me. My initial thought is that this makes a lot of sense to implement this way. Obviously there are still a lot of details we will need to hammer out. Other thoughts: Since a dashboard itself is an embeddable, its |
Whaaa, really? When was this discussed? Isn't it a security issue since two users in the same space may have access to different data indices? I thought that's why ES was handling all the complicated security for background search api, making sure one user can't use another users search id to get their data.
Yep, although with the make it slow, I think the initiator would be the child, that then calls
Not sure we'd actually need a special |
... on the other hand, maybe having this data be per space would actually be more usable. After all, multiple people would probably want to view the results if the query took a really long time to complete. Maybe we just need to make it clear that the results will be visible to everyone in that space (maybe we even need a feature control for this so only some people can create shareable snapshots that make aggregated data visible to everyone in a space). |
How would this work for an "in-progress" (or partial) dashboard? It was my assumption that when a user sends to background, they may still want to return to that specific snapshot before it's completed and see the progress. |
Good question. If we want to support that then we probably can't reuse the shareable snapshot approach where there is no concept of viewing a snapshot that is in the process of being created. Maybe we do need embeddables with three types of inputs:
|
Closing this, we will move forward with #53335 |
I've been starting to wonder if we can combine this effort with some of the make it slow efforts to solve some of those issues.
The goal for the Make it slow project is to have embeddables that are taking a really long time requesting data, to allow the user to make this request in the background. Once the results are ready the embeddables need to know to not do the live query again but to switch to the saved queries. Having this logic everywhere, especially in the interpreter (live query vs search id), could be complicated. But if we already have this concept of a shareable embeddable that never hits Kibana or ES servers, then we could use that.
We would need this shareable generation to be available in the background though, so it'd have to be server side, and the results would be stored in a saved object for later retrieval (like reporting).
The UI side of things though, would solve all the same issues we have with the make it slow project. We don't want the user to be able to generate another live query by doing things like using an input control or changing the time range. So if we had an internal page that was a shareable "viewer", this could be the same UI we use when user's background queries are complete.
So here is what I'm thinking the flow could be something like:
createShareable
. The result of that function should be a new saved object that has the original embeddable's id, the new embeddable type, and the new embeddable's input parameters. This new embeddable will be "shareable" so for example, instead of having input that is{ timeRange, filters }
, it'll be{ data }
(might actually still need time and filters for UI purposes but changing it wouldn't affect the data that is shown).** Actually... this might not work because of security. We can't store one user's search results in the
.kibana
index that another user could potentially see.createSnapshot
functionality. Parent container will have to wait till all of its children are done creating their snapshots, then use that output to create its final shareable version of input.Anyway, still need to think through this one more, but I think this might help us move forward faster with both features.
cc @lukasolson @streamich
The text was updated successfully, but these errors were encountered: