Feature #11299
opengeneric plugin loader framework
0%
Description
our abstract interfaces follow the same pattern:
- abstract pure virtual C++ class interface (e.g., Messenger)
- several implementations that are children of that interface
- each implementation has a simple (e.g., "simple", "async", "xio")
- a factory function that instantiates an instances (e.g., staic Messenger* Messenger::create(string type))
Create a generic framework that can load instances at runtime from .so's:
- a "class" name (like "msgr")
- a location where the .so's are found (default /usr/lib/ceph/$class/$name.so) ?
- .so init functions call a generic function to register themselves (ceph_register_plugin(class, name, create_fn_pointer))
- allow statically compiled instances as well. probably just add a final line to the existing factory function that asks the plugin driver to try to instantiate something (in case the existing ones could handle it).
- do strict version checks as we do with the EC plugins
- move the keyvaluedb, objectstore, and messenger interfaces over to this
- confirm that we can do the same with the ec plugins
Questions:
- sometimes constructors take some extra arguments. how do we pass that through to the plugins? use a void *, and for each interface define a struct that includes any initialization stuff? (the plugins will be compiled against a specific version of this interface anyway)
Updated by Sage Weil about 9 years ago
- Description updated (diff)
- Source changed from other to Development
Updated by Sage Weil about 9 years ago
- Target version changed from v0.95 to v9.0.2
Updated by Samuel Just almost 9 years ago
- Target version changed from v9.0.2 to v9.0.3
Updated by Samuel Just almost 9 years ago
- Target version changed from v9.0.3 to v9.0.4
Updated by Samuel Just almost 9 years ago
- Target version changed from v9.0.4 to v9.0.6
Updated by Samuel Just almost 9 years ago
- Target version changed from v9.0.6 to v9.0.7