Closed PaulTalbot-INL closed 2 years ago
Discussion Summary of several discussions ending March 19, 2021:
Glossary:
The question is whether Entities should follow an “inheritance” approach or a “interfacing” approach.
Either way,
The summary of pro-con for strategies we discussed, as I recall from my notes:
INHERITANCE
INTERFACING:
Current Entities that use Inheritance:
Current Entities that use Interfacing:
Comments from Andrea via email:
I think we need to be in the middle of the two approaches. Inheritance to the base class of the “Plugin” (and not the base raven entity) with a clear light API and interface to the different algorithms. The basic Plugin base class should have the minimum required methods:
This decision using interfaces suggests an inheritance structure, for example:
BaseType
EntityType(BaseType) StrategyType(BaseType) or InterfaceType(BaseType)
SamplerHandler(EntityType) MonteCarlo(StrategyType/InterfaceType)
etc
EntityBase.pptx Here is a PPT showing the current and proposed structures for this discussion.
As of discussion on March 22, 2021, we have the following "going forward" approach for my development work:
Things the BaseType currently knows about, and how they might be redistributed:
BaseType(MessageUser)
Assembler(MessageUser)
Proposed redistribution of these features:
MessageUser()
InputDataUser()
Assembler(MessageUser)
BaseType(MessageUser) -> add InputDataUser inheritance once everyone is using it
BaseEntity(BaseType, Assembler) -> not everyone is an InputDataUser
BaseInterface(BaseType) -> not everyone is an InputDataUser
Other
On second glance, I don't think the Entity really reads any input; it's a handler that passes input to the Interfaces. This functionally seems to suggest there is no functionality for a BaseType; rather, everything is either BaseEntity or BaseInterface.
I would archive this issue, since we have implemented the plugin structure for most entities. Specific issue can be created if there is new request.
Under Discussion Topic
Discussion Plugin Entities (Entities in Plugins that are meant to be available as RAVEN Entities such as Sampler, ROMs, PostProcessors, etc) can potentially be done a lot of ways philosophically.
Design decision March 15, 2021 Option 2, Each
<Entity>PluginBase
should inherit directly from theEntity
base, preserving flexibility over simplicity. The discussion pointed out that if we used interfaces (option 1), as we steadily add more and more features to the interface, it will eventually converge on the actual base class, only duplicated in two places. We elected to preserve utility over simplicity.NOTE this decision was reversed later that week, see comments below.
Discussion Given this decision, the question becomes what objects should be base Entities for plugins. Nominally, the base entities in
Simulation.entityModules
seems like a good start, as this is where the factories live; however, this includesModels
as a single entity, which is in reality an umbrella for ROMs, PostProcessors, Codes, and ExternalModels. Also note that (with the exception of ongoing development in the PostProcessors) none of the actual algorithms used in these models inherits from the baseModel
; for example, theModel.ROM
has aSupervisedLearningEngine
member that does not inherit fromModel
but its own base class.Does this mean that there should be a
SupervisedLearning
base class instead? If so, the factory forSupervisedLearning
needs to be available to thePluginHandler
alongside the other more "basic" entities.For Change Control Board: Issue Review
This review should occur before any development is performed as a response to this issue.
For Change Control Board: Issue Closure
This review should occur when the issue is imminently going to be closed.
task
issue?