-
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
Add a high level overview of the Kibana platform and plugin development. #87560
Add a high level overview of the Kibana platform and plugin development. #87560
Conversation
31c8e89
to
5571ce2
Compare
@elasticmachine merge upstream |
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.
There's some overlap between this new doc and the existing Kibana Plugin API doc.
I think there's good content in both and we should consider combining or remixing this a bit. For instance, I think the section in the existing doc about lifecycles and the basic shape of a plugin class would be helpful context for the section in this new doc about setup
, start
, and plugin parameters. That said, I think the high-level description in this doc is helpful before jumping into the code like the other doc does.
Thinking about the linear flow here, I think a chronology like this would make sense:
- What is the platform
- What is (and isn't) a plugin
- Anatomy of a plugin
- How plugins interact with each other and Core
- How client-side code interacts with server-side code.
48134de
to
553826d
Compare
In reality, however, it's a grey area. | ||
</DocCallOut> | ||
|
||
The functionality that is exposed by plugins, for other plugins to use, is considered to be part of the Kibana platform! |
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.
I don't think it's correct for us to consider all exports or plugin contracts to be part of the platform. There are solution-specific plugins that expose public interfaces that I don't think should be considered part of the platform. When discussing this as part of #71566 we only talked about a subset of plugins and core being moved to be under the platform/
folder.
In my opinion, our code structure needs to be reorganized to properly reflect what we've discussed as being part of the platform because there isn't a clear way to differentiate what we consider to be a platform shared-service from the other solution-specific plugins.
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.
I don't think it's correct for us to consider all exports or plugin contracts to be part of the platform.
I'm okay with brainstorming better messaging. How would you distinguish between platform code and the entirety of all "shared services"(?), before we have that folder structure that you linked to?
We could say it depends on which team owns the plugin but a) I don't think developers should have to know/care about our team structure (which changes frequently), and b) I don't think that will end up always being true.
Trying to define three types of shared code is more difficult than defining two, and requires more overhead to understand. What is the benefit to a developer in distinguishing between "non-core platform code" and other shared services? Or "core platform" vs "non-core platform" code?
Our plugin structure makes a difference between core and all other shared services by splitting them up into two parameters (core, dependencies)
. Is it helpful for a developer to distinguish between the services available in the second parameter?
Ideal future brainstorm
Taking a moment to ignore all technical complexities, and think of the ideal situation, I would want to have platform code as the first parameter (generic code that is relevant to every solution) and non-generic, solution/plugin specific shared services in the second. Non-platform shared services can be disabled, while platform services can't.
The technical problem is x-pack platform code can't be part of the first param because it's built as a plugin, but let's pretend we can get around that.
Then let's think about the folder structure. There wouldn't need to be a platform/core
folder, just platform
.
Then the terminology we could use is:
- platform services
- plugin services
- all shared services (platform + plugins)
If we think this is a good long term direction, I could switch this terminology around to refer to "core platform services" as "platform services", and call "non-core platform services", "plugin services". Perhaps with a caveat that some plugin services are very "platform-y", and will over time, be migrated into the core system. That we use plugin services to test out potential platform services while their APIs are still under frequent iteration, so when we do move them, officially, into the platform, they are somewhat stable.
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.
Took a stab at giving a more accurate, though slightly more confusing, description of the eco system today.
Co-authored-by: Brandon Kobel <[email protected]>
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.
I really like the way that you've approached this. I think think the best thing we can do right now is to clearly acknowledge the current state and its deficiencies so we can work on resolving them.
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Adding backport skip tag, I backported this doc when I fixed the bad link |
Add some very high-level documentation about what the Kibana platform is and how plugins are built on top of it.
Will have a separate PR to add to the nav.