Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VSs > VSs__Test_App__LangDev
comparison Design_Notes.txt @ 3:022f45f9703c
Merge
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Fri, 17 Aug 2012 17:19:35 -0700 |
| parents | |
| children | c87e1925f7b2 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:18c244c06766 |
|---|---|
| 1 | |
| 2 This test app has to exercise all the aspects of the request handling | |
| 3 and the assigner code. | |
| 4 | |
| 5 The assigner has two different Qs, plus a set of currentTaskSlvs check for tasks and also check for explicit VPs. | |
| 6 | |
| 7 So, in the app, make tasks, and also explicit VPs.. create such that they | |
| 8 interleave, cause assigner to switch between. | |
| 9 | |
| 10 So, when start, make some tasks, then make some explicit VPs, then some | |
| 11 tasks, back and forth.. second batch of tasks have inter-dependencies, so | |
| 12 some of the VPs should jump into the middle of them.. | |
| 13 | |
| 14 Then, make it so that the last two tasks talk to each other, suspending | |
| 15 each other in turn, (which should cause the extra VPs to dissipate) and | |
| 16 after that they create a bunch more tasks. | |
| 17 | |
| 18 Okay.. what needs to be exercised? | |
| 19 -] create new slave when task suspends | |
| 20 -] dissipate extra slave when have a task one, and no free tasks | |
| 21 -] suspend a task -> no tasks in taskQ -> empty task slave in slaveQ -> | |
| 22 dissipate that task slave -> explicit slave next in slaveQ, animate that. | |
| 23 Means: To get an empty task slave in slaveQ -> create a task that will | |
| 24 suspend, then create a normal task, which will cause an extra task | |
| 25 slave to be created | |
| 26 | |
| 27 =================== | |
| 28 To have explicit VPs as well tasks.. add a field to semantic data holds type | |
| 29 of VP: whether it's for running tasks, vs an explicit VP. when an | |
| 30 explicit dissipates, then switch it to a task VP that has no suspended | |
| 31 tasks.. | |
| 32 | |
| 33 So, in the semantic data, have: | |
| 34 -> taskVP vs explicitVP | |
| 35 -> has suspended task vs idle | |
| 36 | |
| 37 Then fix the assigner logic: | |
| 38 When task suspends, get next readyVP, | |
| 39 check if it's an explicit | |
| 40 and if yes, resume it, | |
| 41 if no, then it's a taskVP, so get next task from taskQ and do it. | |
| 42 Check whether taskQ empty | |
| 43 if yes, then in the state: suspended taskVP, have empty taskVP, no tasks | |
| 44 so, | |
| 45 | |
| 46 If taskQ empty, and VP Q empty, return NULL, which will trigger the | |
| 47 back-to-back Master backoff. | |
| 48 | |
| 49 If assigner called and no suspended slaves and taskQ empty.. does it have | |
| 50 a "current task slave"? If not, create one in the semantic Env. | |
| 51 ================================== |
