   (let [client-cache     (get @realtime-clients  client-realtime-id)
         ]
     (if (nil? client-cache)
-      (swap! realtime-clients assoc client-realtime-id (atom {:queries (atom {})    :records (atom {})})))))
+      (swap! realtime-clients assoc client-realtime-id (atom {:queries (atom {})    :records (atom {})    :update-request (atom {})})))))
+
+
+
+
+
 
 
 




(defn add-client-to-query [query  client-id]
  (let [
        existing-query     (get @cached-queries   query)

        this-query         (get @client-queries query)
        ]
    (do
      ; if the query does not know about the client then tell it
      (swap! existing-clients conj client-id)

      ; if the client does not know about this query then tell it
      (if (not this-query)
        (swap! client-queries   assoc  query {}))

      (println "")
      (println "  add-client-to-query")
      (println (str "    " @realtime-clients))
