All of lore.kernel.org
 help / color / mirror / Atom feed
* Plugins unification
@ 2016-07-29 12:40 Adam Kupczyk
  2016-07-29 13:42 ` Loic Dachary
  2016-07-29 15:22 ` Ken Dreyer
  0 siblings, 2 replies; 3+ messages in thread
From: Adam Kupczyk @ 2016-07-29 12:40 UTC (permalink / raw)
  To: Ceph Development

Hi cephers,

I plan to unify ceph plugins.

Currently we have 2 plugin trees:
1) erasure-code/ErasureCodePluginRegistry
type of plugin: class ErasureCodePlugin
instances:      class ErasureCodePluginJerasure
                class ErasureCodePluginSelectJerasure
                class ErasureCodePluginLrc
                class ErasureCodePluginSelectShec
                class ErasureCodePluginShec
2) common/PluginRegistry
type of plugin: class Plugin
specialization: class CompressionPlugin
instances:        class CompressionPluginSnappy
                class CompressionPluginZlib
future:
specialization: class CryptoPlugin
instances:        class CryptoPluginISAL

The plan:
1) Get rid of EraseCodePluginRegistry.
2) Make EraseCodePlugin a specialization of class Plugin.
3) PluginRegistry will use ceph configuration for places to search for plugins.
4) PluginRegistry.load(...) will no longer get directory to search.
5) PluginRegistry will only return std::shared_ptr<Plugin> references.
6) PluginRegistry.remove(...) will only delete internal std::shared_ptr<Plugin>.
   Actual dlclose() will be delayed until all references are deleted.
7) static EraseCodePlugin::factory(...), the replacement of
EraseCodePluginRegistry::factory(...)
   will return std::dynamic_pointer_cast<EraseCodePlugin>(located_plugin)
8) Extend class Plugin to force instances to provide "type" and "name".


I would really enjoy comments if such unification is beneficial, and
comments what should be done better.

Best Regards,
Adam Kupczyk

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-29 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-29 12:40 Plugins unification Adam Kupczyk
2016-07-29 13:42 ` Loic Dachary
2016-07-29 15:22 ` Ken Dreyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.