You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Anupam (JIRA)" <ji...@apache.org> on 2016/04/27 21:33:13 UTC

[jira] [Updated] (REEF-1364) C# Evaluator should not fire and forget

     [ https://issues.apache.org/jira/browse/REEF-1364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anupam updated REEF-1364:
-------------------------
    Description: 
The C# Evaluator is structured as follows:
1. Main {{System.Threading.Tasks.Task}} runs a clock which triggers heartbeats periodically.
2. A {{System.Threading.Tasks.Task}} is fired and forgotten for the user's Task. It updates the status by setting a shared variable between the two {{System.Threading.Tasks.Task}}.

What should be done is the follows:
{{await}} two {{System.Threading.Tasks.Task}} using {{Task.WaitAny}} , one for the {{ContextManager}} which handles user's Tasks, the other for heartbeats . If either of those Tasks leaks an {{Exception}}, that means our {{Exception}} handling was not done properly in the {{System.Threading.Tasks.Task}} that threw the {{Exception}}, in which case we should fail the Evaluator.

The {{ContextManager}} {{System.Threading.Tasks.Task}} should contain the logic for performing Context and Task-related heartbeats.
The Evaluator {{System.Threading.Tasks.Task}} should contain the logic for performing periodic heartbeats that notify the Driver that the Evaluator is still running.

This will immensely simplify the Exception handling logic and provide a clearer structure to the C# Evaluator.

  was:
The C# Evaluator is structured as follows:
1. Main {{System.Threading.Tasks.Task}} runs a clock which triggers heartbeats periodically.
2. A {{System.Threading.Tasks.Task}} is fired and forgotten for the user's Task. It updates the status by setting a shared variable between the two {{System.Threading.Tasks.Task}}.

What should be done is the follows:
{{await}} two {{System.Threading.Tasks.Task}}s using {{Task.WaitAny}}, one for the {{ContextManager}} which handles user's Tasks, the other for heartbeats . If either of those Tasks leaks an {{Exception}}, that means our {{Exception}} handling was not done properly in the {{System.Threading.Tasks.Task}} that threw the {{Exception}}, in which case we should fail the Evaluator.

The {{ContextManager}} {{System.Threading.Tasks.Task}} should contain the logic for performing Context and Task-related heartbeats.
The Evaluator {{System.Threading.Tasks.Task}} should contain the logic for performing periodic heartbeats that notify the Driver that the Evaluator is still running.

This will immensely simplify the Exception handling logic and provide a clearer structure to the C# Evaluator.


> C# Evaluator should not fire and forget
> ---------------------------------------
>
>                 Key: REEF-1364
>                 URL: https://issues.apache.org/jira/browse/REEF-1364
>             Project: REEF
>          Issue Type: Improvement
>          Components: REEF.NET, REEF.NET Evaluator
>            Reporter: Andrew Chung
>
> The C# Evaluator is structured as follows:
> 1. Main {{System.Threading.Tasks.Task}} runs a clock which triggers heartbeats periodically.
> 2. A {{System.Threading.Tasks.Task}} is fired and forgotten for the user's Task. It updates the status by setting a shared variable between the two {{System.Threading.Tasks.Task}}.
> What should be done is the follows:
> {{await}} two {{System.Threading.Tasks.Task}} using {{Task.WaitAny}} , one for the {{ContextManager}} which handles user's Tasks, the other for heartbeats . If either of those Tasks leaks an {{Exception}}, that means our {{Exception}} handling was not done properly in the {{System.Threading.Tasks.Task}} that threw the {{Exception}}, in which case we should fail the Evaluator.
> The {{ContextManager}} {{System.Threading.Tasks.Task}} should contain the logic for performing Context and Task-related heartbeats.
> The Evaluator {{System.Threading.Tasks.Task}} should contain the logic for performing periodic heartbeats that notify the Driver that the Evaluator is still running.
> This will immensely simplify the Exception handling logic and provide a clearer structure to the C# Evaluator.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)