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

Rethink plugin modules and services #13059

Closed
rjernst opened this issue Aug 22, 2015 · 1 comment
Closed

Rethink plugin modules and services #13059

rjernst opened this issue Aug 22, 2015 · 1 comment
Labels
:Core/Infra/Plugins Plugin API and infrastructure discuss

Comments

@rjernst
Copy link
Member

rjernst commented Aug 22, 2015

We currently allow creating modules per node, per index, and per shard. It is unclear if any plugins actually use this, or conceivably need it (see #13034 (comment)).

There are two reasons for modules:

  • Some extension points require constructing a class which gets an injected existing service to add custom functionality (for example, adding custom mapping types). This is being fixed by moving all extension points to be handled through existing modules.
  • To create a new service, the new service must be bound in a module, and then returned with nodeServices(), indexServices() or shardServices().

We should simplify the latter, and in general think how we could provide the ability to add services without injection. IMO this would mean clearly defining what services each type of extension has access to. For example, discovery plugins probably need access to NetworkService, but do they really need to be allowed to grab RepositoryService in their ctor?

@rjernst rjernst added discuss :Core/Infra/Plugins Plugin API and infrastructure labels Aug 22, 2015
@rjernst
Copy link
Member Author

rjernst commented Oct 6, 2016

We have a good handle now on how plugin extension points are designed in 5.0, so I am closing this issue.

@rjernst rjernst closed this as completed Oct 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Plugins Plugin API and infrastructure discuss
Projects
None yet
Development

No branches or pull requests

1 participant