swsnu / swppspr2015

Repository for discussing common issues that are not project-specific, SNU SWPP Spring 2015
https://sites.google.com/site/snuswppspr2015/
0 stars 0 forks source link

some questions about Assignment2 #20

Open kuna opened 9 years ago

kuna commented 9 years ago
  1. we're implementing [failure handling Services] for this assignment. is that means that we should use ServiceConfiguration for allocating evaluator?
  2. I can't get what is failed task. there's even not enough documentation. is that mean 'FailedTask'? or, catching error during calling runCommand?

Thank you.

jsjason commented 9 years ago
  1. Yes, you must use ServiceConfiguration, although you should be using it AFTER an Evaluator is allocated (if there is no Evaluator to work with, then obviously there is no place to inject a Service).
  2. I'm pretty sure you already know the answer to your question. You used the term failed task; not failed context, or failed evaluator. Is there anything a failed Task refers to other than a Task that failed?
kuna commented 9 years ago

I think you prefer using 'FailedTask', but there's no way to access to get service from context/task as far as I learn. also not found in documentation. is there any way to do, or am I thinking something wrong?

jsjason commented 9 years ago

There is a way to access Services from a Context or Task, and I'm quite sure I talked about it during last practice session (I explained about using the PrimeParameter or RandomGenerator class in the constructor of a Task). A small hint: not all Handlers must go in to the same Driver java class.

kuna commented 9 years ago

I mean, getting service from 'FailedTask'. and I think we haven't learnt how to get service from context.

jsjason commented 9 years ago

There is no direct way to access a Service class from a FailedTask instance. Although this feature may be added in the future, Services are intended to be used by Tasks or other Services that are running (not failed) and thus it is rather awkward to access a Service using a FailedTask instance. Try to think of other solutions.

kuna commented 9 years ago

I got it. thank you for replying.