       )))
 
 (def default-routing-table
-  {[:session/updated] {:handler update-session}
-   [:ss/tx-requested] {:handler handle-transaction}
-   [:ss/r-qes-by]     {:handler r-qes-by}
-   [:ss/r-pull]       {:handler r-pull}
-   [:ss/bootstrap]    {:handler bootstrap-user}})
+  {[:session/updated] {:handler #'update-session}
+   [:ss/tx-requested] {:handler #'handle-transaction}
+   [:ss/r-q]          {:handler #'r-q}
+   [:ss/r-qes-by]     {:handler #'r-qes-by}
+   [:ss/r-pull]       {:handler #'r-pull}
+   [:ss/bootstrap]    {:handler #'bootstrap-user}})
 
 (defn new-routing-table [table]
   (merge default-routing-table table))

             :ss      ss
             :schema  (datomic-db->datomic-schema db)})))

(defn update-session [my-session [_ data] context]
  ;; XXX update-in is dangerous here, we're allowing any key the user
  ;; encodes in transit to be inserted here and to get broadcast out
  ;; to other users. Should apply a whitelist approach.

      (let [ch (get-in session [:live :ch])]
        (async/send! ch payload)))))

(defn r-q [session _ incoming]
  (println "r-q" (pr-str incoming))
  (let [q-name        (:name incoming)
        datalog-query (:q incoming)
        query-args    (:args incoming)
        data          (apply d/q datalog-query
                             (session-db (dato-session session))
                             query-args)]
    (ss-msg (keyword "server" (str (name q-name) "-succeeded"))
            {:results data})))

(defn r-pull [session _ incoming]
  (println "R-pull! " (pr-str incoming))
  (let [p-name  (:name incoming)
        pattern (incoming/ensure-pull-required-fields (:pull incoming))
        data    (d/pull (session-db (dato-session session))
