[ 
https://issues.apache.org/jira/browse/MESOS-3072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexander Rojas updated MESOS-3072:
-----------------------------------
    Affects Version/s: 0.23.0
                       0.22.0
                       0.22.1
               Labels: mesosphere  (was: )
          Component/s: modules

> Unify initialization of modularized components
> ----------------------------------------------
>
>                 Key: MESOS-3072
>                 URL: https://issues.apache.org/jira/browse/MESOS-3072
>             Project: Mesos
>          Issue Type: Improvement
>          Components: modules
>    Affects Versions: 0.22.0, 0.22.1, 0.23.0
>            Reporter: Alexander Rojas
>              Labels: mesosphere
>
> Some default components of Mesos, e.g. the Authorization mechanism, can be 
> replaced by user supplied ones through modules. The modules would be 
> initialized through the 
> [{{ModuleManager}}|https://github.com/apache/mesos/blob/98039c99b0a2e0a36a7d4c22e672ecd817923bb4/src/module/manager.cpp#L250]
>  class which takes care of passing the correct parameters to the modules.
> On the other hand, default implementations bypass the whole modules 
> mechanisms for the instantiations. However, for testing reasons, components 
> which allow for modularization require a default constructor, which lead to 
> the interfaces of the module to have public overridable abstract methods 
> which are only necessary for the default implementation, polluting the API, 
> e.g. the authorizer interface looks like this:
> {code}
> class Authenticator
> {
> public:
>   Authenticator() {}
>   virtual ~Authenticator() {}
>   virtual Try<Nothing> initialize(const Option<Credentials>& credentials) = 0;
>   virtual process::Future<Option<std::string>> authenticate(
>       const process::UPID& pid) = 0;
> };
> {code}
> Where the 
> [{{initialize(credentials)}}|https://github.com/apache/mesos/blob/b5d6dfdb680b98ed640e4d34dc6c140d70cc19c8/include/mesos/authentication/authenticator.hpp#L43]
>  method is only necessary to pass the parameters to the default interface.
> It would be in the best interest to provide a way of instantiating the 
> default implementations of modularized components which doesn't require 
> polluting the public interfaces.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to