Browse Source

[2775] Diagram of how resolution works

Michal 'vorner' Vaner 12 years ago
parent
commit
e9799d37bb
1 changed files with 41 additions and 0 deletions
  1. 41 0
      doc/design/resolver/01-scaling-across-cores

+ 41 - 0
doc/design/resolver/01-scaling-across-cores

@@ -19,3 +19,44 @@ d. Thread variations of the above
 
 
 All of these may be complicated by NUMA architectures (with
 All of these may be complicated by NUMA architectures (with
 faster/slower access to specific RAM).
 faster/slower access to specific RAM).
+
+How does resolution look like:
+
+                               Receive the query. @# <------------------------\
+                                       |                                      |
+                                       |                                      |
+                                       v                                      |
+                                 Parse it, etc. $                             |
+                                       |                                      |
+                                       |                                      |
+                                       v                                      |
+                              Look into the cache. $#                         |
+       Cry  <---- No <---------- Is it there? -----------> Yes ---------\     |
+        |                            ^                                  |     |
+ Prepare upstream query $            |                                  |     |
+        |                            |                                  |     |
+        v                            |                                  |     |
+  Send an upstream query (#)         |                                  |     |
+        |                            |                                  |     |
+        |                            |                                  |     |
+        v                            |                                  |     |
+    Wait for answer @(#)             |                                  |     |
+        |                            |                                  |     |
+        v                            |                                  |     |
+       Parse $                       |                                  |     |
+        |                            |                                  |     |
+        v                            |                                  |     |
+   Is it enough? $ ----> No ---------/                                  |     |
+        |                                                               |     |
+       Yes                                                              |     |
+        |                                                               |     |
+        \-----------------------> Build answer $ <----------------------/     |
+                                        |                                     |
+                                        |                                     |
+                                        v                                     |
+                                   Send answer # -----------------------------/
+
+Legend:
+ * $ - CPU intensive
+ * @ - Waiting for external event
+ * # - Possible interaction with other tasks