         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))

  (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 {})})))))




            )
        )
    )










