madecoste / swarming

Automatically exported from code.google.com/p/swarming
Apache License 2.0
0 stars 1 forks source link

Add a query to server to figure out if there are known bots with a specific dimension set #158

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Goal:
- Give the recipe the power to query the swarming server if it has a chance to 
run the task in a definite amount of time.

Interpretation:
- There's 2 ways to see this: it can either be a true/false result, where the 
bot knows if at least one bot could run the task or it can be an ETA estimate.

To generate an ETA, tags would be necessary (issue:133) so the server has 
similar tasks to weight the duration against, especially w.r.t. the number of 
pending tasks, throughput and expectancy of being able to run an hypothetical 
task.

So having a true/false would be a start, it just needs to use an extensible 
format so an ETA could eventually be given.

Original issue reported on code.google.com by maruel@chromium.org on 18 Sep 2014 at 7:22

GoogleCodeExporter commented 9 years ago
If we can generate ETAs (probably an ETA to /begin/ the job), then that would 
be enough. ETA to complete the job is probably incomputable :). In the recipe, 
I would probably just see if the job could be accepted within 5 minutes, and if 
not, do it locally.  Even ETA to begin the job would be hard to compute, unless 
we had:
  * homogenous tasks within a dimension set
  * a huge number of workers within a dimension set

Additionally, we also plan to use this to avoid hard-coding which tasks should 
be done on swarming and which ones should not. In particular, we would need 
this to return 'infinity' for requests for Vista task capacity, so the recipe 
would decide to do them locally (until we added Vista capacity).

The other way to implement this would be to put it in the task request 
protocol, e.g.:

START_TASK({dimensions}, min_start_eta=300seconds, ...) -> 40x Cannot Start 
Task In Time

Original comment by iannucci@chromium.org on 18 Sep 2014 at 9:13