[
https://issues.apache.org/jira/browse/MESOS-1384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137535#comment-14137535
]
Bernd Mathiske commented on MESOS-1384:
---------------------------------------
[~benjaminhindman] What's the preferred place for a doc like this?
The naming convention for modules is up for grabs. I am not aware that we
implied Java package naming. We just came up with what is easy and quick (20
lines of code) to implement, because smaller patches are preferred by code
reviewers. There seemed to be a lot of precedent in Mesos for the command line
format we are using, and I would suggest to put JSON in files only since it is
relatively verbose. But if Mesos is switching to JSON on command lines in
general, then so should the module API.
The macros hide all the machinery with dlsym and version checking so the
developer can focus on the module code. Modules do not need to inherit anything
from the module system in this new design, so that their development is more
unencumbered. And you don't see any traces of the module API in Mesos code that
does not have anything to do with modules.
Here is an example version backward compatibility table in module_manage.cpp:
roleToVersion["TestModule"] = "0.21.0";
roleToVersion["Isolator"] = "0.21.0";
roleToVersion["Authenticator"] = "0.21.0";
roleToVersion["Allocator"] = "0.21.0";
Yes, we need to change the variable name "roleToVersion". I left it as is so
you can find it in our prototype branch that [~karya] will post shortly :-)
We don't need RTTI, but it provides an extra safety check.
Yes, "role" should be renamed, but "type" would be incorrect. Each "role" can
have many types that represent it.
> Add support for loadable MesosModule
> ------------------------------------
>
> Key: MESOS-1384
> URL: https://issues.apache.org/jira/browse/MESOS-1384
> Project: Mesos
> Issue Type: Improvement
> Affects Versions: 0.19.0
> Reporter: Timothy St. Clair
> Assignee: Niklas Quarfot Nielsen
>
> I think we should break this into multiple phases.
> -(1) Let's get the dynamic library loading via a "stout-ified" version of
> https://github.com/timothysc/tests/blob/master/plugin_modules/DynamicLibrary.h.
> -
> *DONE*
> (2) Use (1) to instantiate some classes in Mesos (like an Authenticator
> and/or isolator) from a dynamic library. This will give us some more
> experience with how we want to name the underlying library symbol, how we
> want to specify flags for finding the library, what types of validation we
> want when loading a library.
> *TARGET*
> (3) After doing (2) for one or two classes in Mesos I think we can formalize
> the approach in a "mesos-ified" version of
> https://github.com/timothysc/tests/blob/master/plugin_modules/MesosModule.h.
> *NEXT*
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)