 
 (def master-initial-behavior
   (behavior
-    [{:keys [n-workers n-reservations] :as options}]
+    [{:keys [n-workers n-secondary-workers n-reservations] :as options}]
     [_start]
     (let [{:keys [reservations cars flights rooms] :as data}
             (initialize-data options)
-          worker-actors
-            (map #(spawn worker-behavior % *actor* data options)
-              (range n-workers))]
+          ; It is important to wrap the two maps below in doall, so that they
+          ; are executed here, where *actor* refers to the master actor, and not
+          ; in another place. Stupid lazy Clojure.
+          secondary-workers
+            (doall (map #(spawn reserve-relation-behavior % *actor*)
+                        (range n-secondary-workers)))
+          reservation-workers
+            (doall (map #(spawn reservation-behavior
+                          % *actor* secondary-workers data options)
+                        (range n-workers)))]
       #_(log-data data)
-      (doseq [[worker reservation] (zip (cycle worker-actors) reservations)]
+      (doseq [[worker reservation] (zip (cycle reservation-workers) reservations)]
         (send worker reservation))
-      (become master-waiting-behavior n-reservations))))
+      (become master-waiting-behavior (* n-reservations 4)))))
 
 ; MAIN
 

        :pnr    pnr)))
  (log "finished reservation" (:id @reservation)))

; BEHAVIORS

; In vacation, this corresponds to a client.
(def worker-behavior
  (behavior
    [worker-id master data options]
    [reservation]
    ; Note: as opposed to the vacation benchmark, we only support making
    ; reservations, not deleting customers or updating tables.
    (log "start reservation" (:id @reservation) "by worker" worker-id)
    (process-reservation reservation data options)
    (send master :done (:id @reservation))))

(def done? (promise))

(def master-waiting-behavior
  (behavior
    [n]
    [_done _reservation-id]
    (if (= n 1)
      (do
        (log "done")

                              timestamp])]
    (base64/str->base64 data)))

(defn process-reservation-seq
  [reservation
   {:keys [cars flights rooms]}
   {:keys [n-queries]}]
