Feature #11299
generic 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)
History
#1 Updated by Sage Weil almost 9 years ago
- Description updated (diff)
- Source changed from other to Development
#3 Updated by Sage Weil almost 9 years ago
- Target version changed from v0.95 to v9.0.2
#4 Updated by Samuel Just almost 9 years ago
- Target version changed from v9.0.2 to v9.0.3
#5 Updated by Samuel Just almost 9 years ago
- Target version changed from v9.0.3 to v9.0.4
#6 Updated by Sage Weil almost 9 years ago
- Status changed from New to In Progress
#7 Updated by Samuel Just almost 9 years ago
- Target version changed from v9.0.4 to v9.0.6
#8 Updated by Samuel Just over 8 years ago
- Target version changed from v9.0.6 to v9.0.7
#9 Updated by Samuel Just over 8 years ago
- Status changed from In Progress to 12
#10 Updated by Samuel Just over 8 years ago
- Target version deleted (
v9.0.7)
#11 Updated by Patrick Donnelly over 4 years ago
- Status changed from 12 to New