-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] Activity computed attributes #17
Conversation
90396f6
to
8732d85
Compare
I haven't dug into the code itself yet (need to find some time), but here are some quick thoughts on the open questions:
Incidentally, I recall this being more of a stretch goal / future feature than core requirement. Did that change?
Is this lack of return value manifest at the schema level, or could an activity in principle return
The methods exposed by
Is this a DDD-type question? What bounded context boundaries do you have in view? I suspect my note adjacently above is part of what you're asking.
Activity output values should be handled the same as activity input values, IMHO -- they should have an associated mapper that the driver uses to get schema information from statically, and to serialize the actual return value in the same way we serialize effective arguments.
It is very strange, yes, and one of the refactors I tried to embark upon a few months ago was to make this not be that way anymore. IMHO, I'd recommend following how arguments are handled just to reduce the cognitive load of what all is happening in the engine. I might take a look at refactoring this once my grad school applications are done.
IMHO (as you know), I think I think many use-cases involving
I think this is related to my questions above about |
Also, if an exception is thrown by a task, we will likely want to propagate the exception up the decomposition tree, rather than only looking at the parent task. The "delegation" philosophy of decomposition -- that is, that tasks delegate their responsibilities to subordinates -- would suggest that if a child activity fails, and the parent doesn't handle that exception, the parent should also fail, as it was unable to perform one of its (incidentally, delegated) responsibilities. This raises the question of what sibling/cousin task should do when their ancestors fault. I'd argue that, by default, the entire subtree under a faulting task should be considered to terminate in fault; it's the duty of an ancestor to catch exceptions if failure is expected and can be tolerated. This is a generalization of the existing behavior (where the entire sim faults on exception). Mechanisms for adjusting this behavior can be considered later, in the presence of concrete use-cases. |
8732d85
to
80362c1
Compare
80362c1
to
a34f51a
Compare
Archiving this Draft PR and splitting it into three tickets:
|
Description
This draft PR includes all the pieces I think are necessary to allow activity instances to have return values. "Having return values" involves two things:
The commits in this PR fall into one of the following phases
Some open questions remain:
getTaskReturnValue
method?Unrelated to this, but an additional question I have:
getSimulationResults
api response?I've also added a commit tagging events with activity ids, but that'll need some more scrutiny as well (especially with decomposing activities... I'm not sure if child activities have "directives").
Verification
I've done some simple manual testing by giving BiteBanana a non-void return type and viewing it via hasura.
Documentation
This work is part of the Activity Computed Attributes working group: https://wiki.jpl.nasa.gov/display/MPSA/Working+Group%3A+Activity+Computed+Attributes
Future work