Closed mattkime closed 1 month ago
@ppisljar I'm curious about your thoughts about this issue.
Roughly speaking, I think there’s two ways to create APIs. There’s the current way data views is implemented - a thin layer abstracts the saved object layer - vs creating a RESTful api thats consumed by the client. This is probably a topic that can be worked through separate from any thing data view specific.
Saved object layer wrapper
RESTful
I don't understand really how this is blocking the index patterns everywhere project.
From my perspective:
I would like to better understand how needed this is ? I think there should be a way to transition gradually. Most of the data view APIs are already the same on client and on server. For some of the functionallity REST apis already exist. We could start rewriting the client to not use common code but use REST endpoints. But i would need to understand why we are doing this in the first place.
our plan regarding server/client side index patterns goes mostly like this:
- all calls to
elasticsearch
should be made from server side- as much as possible of actual code/logic should exist only on the server
- server should expose public API (to be consumed by other plugins) as well as REST API (to be consumed by client side and other software outside of kibana when necesarry)
- client side API should be just a wrapper around REST API mimicking the same interface we have on public interface on the server
+1, I like the plan.
I cannot answer the "need" questions, but I could try explaining why it is a bad idea to use Saved Objects Service on the browser.
But i would need to understand why we are doing this in the first place.
/internal
.)/common
folder where some common types for Saved Object Service would be defined. In fact, the server and browser Saved Object Services are quite different.P.S. I understand that connecting directly to database could be a nice modern solution when done well, think Firebase. But in Kibana I think it would be better to keep Saved Objects Service only on the server.
@vadimkibana At this point I put most of those benefits under 'marginal improvements' - they would be good to have but the current situation isn't blocking anything from happening.
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)
Closing this because it's not planned to be resolved in the foreseeable future. It will be tracked in our Icebox and will be re-opened if our priorities change. Feel free to re-open if you think it should be melted sooner.
Original issue - https://github.com/elastic/kibana/issues/90076
The
IndexPatternsService
is currently being called both client side and server side.IndexPatternsService
should not be called by the index pattern server routesIndexPatternsService
methods should be updated to be like thegetFieldsForWildcard
, which makes a server-side call to do the work. All the logic fromIndexPatternsService
should be moved to server-side fileIndexPatternsFetcher
.IndexPatternsService
should be changed to reference the new methods in server-sideIndexPatternsFetcher
our plan regarding server/client side index patterns goes mostly like this:
elasticsearch
should be made from server side