Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VSs > VSs__Test_App__LangDev
diff Design_Notes.txt @ 0:7a85919442f2
Initial add -- test application for use while developing VSs features
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Wed, 01 Aug 2012 01:08:02 -0700 |
| parents | |
| children | c87e1925f7b2 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Design_Notes.txt Wed Aug 01 01:08:02 2012 -0700 1.3 @@ -0,0 +1,51 @@ 1.4 + 1.5 +This test app has to exercise all the aspects of the request handling 1.6 +and the assigner code. 1.7 + 1.8 +The assigner has two different Qs, plus a set of currentTaskSlvs check for tasks and also check for explicit VPs. 1.9 + 1.10 +So, in the app, make tasks, and also explicit VPs.. create such that they 1.11 +interleave, cause assigner to switch between. 1.12 + 1.13 +So, when start, make some tasks, then make some explicit VPs, then some 1.14 +tasks, back and forth.. second batch of tasks have inter-dependencies, so 1.15 +some of the VPs should jump into the middle of them.. 1.16 + 1.17 +Then, make it so that the last two tasks talk to each other, suspending 1.18 +each other in turn, (which should cause the extra VPs to dissipate) and 1.19 +after that they create a bunch more tasks. 1.20 + 1.21 +Okay.. what needs to be exercised? 1.22 +-] create new slave when task suspends 1.23 +-] dissipate extra slave when have a task one, and no free tasks 1.24 +-] suspend a task -> no tasks in taskQ -> empty task slave in slaveQ -> 1.25 + dissipate that task slave -> explicit slave next in slaveQ, animate that. 1.26 + Means: To get an empty task slave in slaveQ -> create a task that will 1.27 + suspend, then create a normal task, which will cause an extra task 1.28 + slave to be created 1.29 + 1.30 +=================== 1.31 +To have explicit VPs as well tasks.. add a field to semantic data holds type 1.32 +of VP: whether it's for running tasks, vs an explicit VP. when an 1.33 +explicit dissipates, then switch it to a task VP that has no suspended 1.34 +tasks.. 1.35 + 1.36 +So, in the semantic data, have: 1.37 +-> taskVP vs explicitVP 1.38 +-> has suspended task vs idle 1.39 + 1.40 +Then fix the assigner logic: 1.41 +When task suspends, get next readyVP, 1.42 + check if it's an explicit 1.43 + and if yes, resume it, 1.44 + if no, then it's a taskVP, so get next task from taskQ and do it. 1.45 + Check whether taskQ empty 1.46 + if yes, then in the state: suspended taskVP, have empty taskVP, no tasks 1.47 + so, 1.48 + 1.49 +If taskQ empty, and VP Q empty, return NULL, which will trigger the 1.50 + back-to-back Master backoff. 1.51 + 1.52 +If assigner called and no suspended slaves and taskQ empty.. does it have 1.53 +a "current task slave"? If not, create one in the semantic Env. 1.54 +==================================
