On 09/15/10 01:29 PM, Karen Tung wrote:
Hi Jean,
Comments inline.
On 09/15/10 09:22, jean.mccormack wrote:
I was just talking with Ginnie about the interface between the
checkpoints and their DOC software nodes. The design specifies that
the checkpoint name must be the same as the software node name that
contains it's input. Unfortunately, this interface is subject to user
error and right now that mistake doesn't get discovered until we're
actually executing the checkpoint which is annoying and not very user
friendly. It would be nice to move this check to prior to checkpoint
execution however, not all checkpoints get input from a DOC software
node.
The application is the only entity that will insert these
checkpoint-name-based DOC software node
into the DOC, right?
No. The manifest is another way to insert items into the doc. This
method would be a way of doing the checking on that.
So, if the node should be there and it is not, then, it is the
application that have a bug, and this type
of mistakes can only happen during development time, not when the
actual end-user is using our products.
If a checkpoint is written in such a way that it checks for the
existence of these nodes first thing
in execute() before doing anything, and fails immediately if it
doesn't exist, I feel that should be
sufficient. During development, the application developer can always
utilize the resume feature
in the engine to start over from where it fails previously. I think
that is user friendly enough, and the
pre-execution validation like you proposed is not really necessary.
So in our discussion we came up with a potential solution that I
wanted to pass by people.
- Part of the requirement for checkpoint class would be the inclusion
of an attribute indicating whether or not it gets input from a DOC
software node and should be validated. I'll call that attribute
validate_software_name.
- The engine currently generates a list of checkpoints to be
executed. Prior to the call to execute_checkpoints the engine would
perform a check that would cycle through all the checkpoints on the
execution list and if validate_software_name is True would check to
make sure the DOC has a software node with the same name as the
checkpoint.
If we were to do this, I prefer Alok's suggestion. I will add a
not-required to be implemented function
in the checkpoint class with a default implementation of doing
nothing. Any checkpoint that requires some
sort of pre-execution validation can overwrite and implement their own
logic there.
In execute_checkpoints(), the engine will first instantiate all the
checkpoints to be executed, call this
pre-execution validation function, then, call get_progress_estimate(),
and if all goes well,
call execute().
cool. Thanks.
Jean
Thanks,
--Karen
- If there is not a match, print out a really nice error message
indicating what mistake the user has made and stop execution.
Thoughts?
Jean
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss