[
https://issues.apache.org/jira/browse/MESOS-1384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14078477#comment-14078477
]
Craig Hansen-Sturm edited comment on MESOS-1384 at 7/29/14 10:14 PM:
---------------------------------------------------------------------
I definately like the compactness, clearness, and understandability of this
solution, but is it general enough ? I believe this depends on what the
requirements are (perhaps everyone is assuming these are clear from previous
discussions).
One example: Are mesos modules expected to behave like plugins ? If so, one
might expect modules to be runtime-discoverable/enumerable, and loadable
without requiring statically linking in any init/create stub-code. I believe
much of the design hinges on whether support for this is important or not.
>From a pure design perspective, the module abstraction exists, primarily, to
>expose the init method, load the binary, call the c-linkage entry "constructor
>function", and then return a pointer to the object. This is completely
>generic - even type independent (which is a good thing) and, it serves as
>basically "boostrapping" code which doesn't need to be associated with the
>underlying object for all time. Given this, an external factory pattern might
>be more appropriate, as MI ties the bootstrapping code to the object which is
>being created.
In summary, kudos to Nik for having a parsimonious and clear design, but will
it scale to handle object+interface versioning, plugins, ... ? Depends on
that requirement list.
was (Author: craig-mesos):
I definately like the compactness, clearness, and understandability of this
solution, but is it general enough ? I believe this depends on what the
requirements are (perhaps everyone is assuming these are clear from previous
discussions).
One example: Are mesos modules expected to behave like plugins ? If so, one
might expect modules to be runtime-discoverable/enumerable, and loadable
without actually statically linking in the init/create stub-code. Much of
the design hinges on whether support for this is important or not.
>From a pure design perspective, the module abstraction exists, primarily, to
>expose the init method, load the binary, call the c-linkage entry "constructor
>function", and then return a pointer to the object. This is completely
>generic - even type independent (which is a good thing) and, it serves as
>basically "boostrapping" code which doesn't need to be associated with the
>underlying object for all time. Given this, an external factory pattern might
>be more appropriate, as MI ties the bootstrapping code to the object which is
>being created.
> 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.2#6252)