              [:h2 "Channel"]
              [:p "Channel type: " (type ch)]
              [:p "Buffer type: " (.-buf ch)]
-             [:p "Channel value: " (pr-str (.-buf (.-buf ch)))]])}))
+             [:p "Channel count: " (count (.-buf ch))]
+             [:p "Channel value: " (pr-str (.-buf (.-buf ch)))]
+             [:form {:action "/drop" :method :post}
+            [:input {:type :submit :value "Drop"}]]])}))
+
+(defn drop-from-channel [ch]
+  (fn [req]
+    (go (<! ch))
+    (redirect-after-post "/channel.html")))
 
 ;; Components are defined using defrecord.
 
 (defrecord Website []
   Lifecycle
   (start [component]
-    (let [ch (chan 10)]
+    (let [ch (chan (buffer 10))]
       ;; Let's load the channel up with some random data
-      (go (dotimes [_ 20] (>! ch (rand-int 20))))
+      (go (dotimes [n 26] (>! ch (char (+ (int \A) n)))))
       (assoc component :channel ch)))
   (stop [component] component)
 

   [com.stuartsierra.component :refer (Lifecycle using)]
   [hiccup.core :as hiccup]
   [modular.bidi :refer (WebService)]
   [ring.util.response :refer (response)]))

(defn index [req]
  {:status 200

  (routes [_] ["/" {"index.html" ::index
                    "" (redirect ::index)
                    "system.html" ::show-system
                    "channel.html" ::show-channel
                    "drop" ::drop}])

  ;; A WebService can be 'mounted' underneath a common uri context
  (uri-context [_] ""))
