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

Make Runtime Services Plugin-able #226

Open
cpennington opened this issue Jul 14, 2014 · 8 comments
Open

Make Runtime Services Plugin-able #226

cpennington opened this issue Jul 14, 2014 · 8 comments

Comments

@cpennington
Copy link
Contributor

Handwavey Sketch:

  1. Use stevadore to register/lookup installed plugin implementations (plugins for the 'i18n' service would be registered under the entry_point key 'xblock.service.i18n', and would be named for their function ['null', 'django', etc])
  2. XBlock runtime should look for services in the following order:
    1. Explicitly provided in the services kwarg
    2. Enabled entry_point plugins in the provided services configuration dictionary, configured by that same dictionary
    3. Default plugins registered with stevadore (maybe?)
@cpennington
Copy link
Contributor Author

@pmitros: Does that look like about what we'd talked about?

@pmitros
Copy link
Contributor

pmitros commented Jul 14, 2014

Sounds right. I'd also consider some mention of default plug-ins which come with the XBlock repo as lowest on the totem pole.

@pmitros
Copy link
Contributor

pmitros commented Jul 14, 2014

The stevedore thing is actually pretty important -- being able to pip install, as an XBlock, with no additional config work.

@cpennington
Copy link
Contributor Author

I guess my thought was just that the default services from XBlock would be provided via the same plugin mechanism.

@pmitros
Copy link
Contributor

pmitros commented Jul 14, 2014

Sounds right.

@nedbat
Copy link
Contributor

nedbat commented Jul 15, 2014

Can you fill me in on the conversation? Services are provided by runtimes. Will we require that any runtime use stevedore to extend the set of services? What API will the plugins use to connect to the rest of the runtime, and how do different runtimes support the same API? This seems like adding another level of indirection. What problem is it solving?

@pmitros
Copy link
Contributor

pmitros commented Jul 15, 2014

@nedbat We need a file system service in XBlocks for a few things I'm doing. We'll need more services in the future. We'd like to, as much as possible, build those services once, and use them in xblock-sdk, edx-platform, and any other runtimes that may appear in the future. Many of the services may also be desired in other parts of the platform.

Runtimes connect xblocks to services, but if all the services have to be independently created by every runtime, and any time a new service is added, the runtime has to be patched, that's a lot of work, overhead, and replication.

@pmitros
Copy link
Contributor

pmitros commented Jul 15, 2014

@cpennington One more point: I'll bring back an issue we tabled, just so we have it here:

  • One of us suggested that the runtime be able to have multiple implementations of the same service, and an XBlock be able to request a preferred implementation, if available.
  • The other one suggested that the XBlock should not be able to request a specific implementation, but rather that the runtime should pick the implementation.

We tabled this and did not get into a technical discussion as to use-cases and arguments both ways, so either of us could be right/wrong, but I'd like to leave this as an issue to discuss when and if we build this out.

(edit: removed names who suggested which version :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants