
RIP eventrace

Mirroring module.
     ____________________________________________________________________________________________________
   
  Use Case:
  
    1. The object storer thread waits until there are objects to store.
    2. The list populator thread first checks that the list isn't "too" full.
    3. The list populator queries the Perl whoisd for the serials.
    4. The objects are put in the object list.
       (With attention payed to converting a "DELETE", "ADD" sequence to an "UPDATE".)
       (guarded operation).
    5. The list populator thread waits until there are more objects needed.
    6. The object storer thread checks that there are objects to be got.
    7. The object storer thread gets an object.
       (guarded operation).
    8. The object storer thread conducts a series sql queries to store the object.
   9a. If the object was successfully stored the object is dequeued from the object list.
       (guarded operation).
   9b. Else the object is requeued to the end of the list.
       (guarded operation).
   _______________________________________________________________________________________________________
   
  Event Trace:                    +--------------- Mirroring module : mi ---------------+
                                  |                                                     |
                                  | producer thread                     consumer thread |
    +--------+                       +-----------+        +--------+        +--------+            +------+
    | whoisd |             tcp       | list      |        | object |        | object |            |  sq  |
    | (perl) |              ;        | populator |        | list   |        | storer |            |      |
    +---+----+              :        +-----+-----+        +---+----+        +----+---+            +---+--+
 1.     $                   :              $                  |                  $ sleep()            |   
        $                   :              $                  |                  $---------+          |   
 2.     $                   ;              $       get_size() |                  $         |          |   
        $                   ;              |-----------------}$                  $         |          |   
 3.     $  whois -g RIPE:current-LAST      $                  |                  $         |          |   
        ${---------------------------------|                  |                  $         |          |   
 4.     $                   :              $   queue_object() |                  $         |          |   
        $                   :              |-----------------}$                  $         |          |   
 5.     $                   :              $ sleep()          |                  $         |          |   
        $                   :              $---------+        |                  ${--------+          |   
 6.     $                   :              $         |        | get_size()       $                    |   
        $                   :              $         |        ${-----------------|                    |   
 7.     $                   :              $         |        | get_object()     $                    |   
        $                   :              $         |        ${-----------------|                    |   
 8.     $                   :              $         |        |                  $ SQ_execute_query() |   
        $                   :              $         |        |                  |-------------------}$   
9a.     $                   :              $         |        | dequeue_object() $                    |   
        $                   :              $         |        ${-----------------|                    |   
9b.     $                   :              $         |        | requeue_object() $                    |   
        $                   :              $         |        ${-----------------|                    |   
        $                   :              $         |        |                  $                    |   
        $                   :              ${--------+        |                  $                    |   
        $                   :              $                  |                  $                    |   
