title: SSE subscribers - distributed across multiple servers?
body: <p>Looking at the <a href="https://github.com/cldwalker/sse-chat" rel="nofollow">sse-chat</a> demo of the <a href="http://pedestal.io/" rel="nofollow">Clojure Pedestal</a> Framework - which relies on the <a href="http://pedestal.io/documentation/service-sse/" rel="nofollow">SSE features</a> in Pedestal - I noticed <a href="https://github.com/cldwalker/sse-chat/blob/master/src/sse_chat/service.clj" rel="nofollow">the following code</a>:</p>
  
  <pre><code>(defn publish
    [request]
    (doseq [sse-context @subscribers]
      (try
        (sse/send-event sse-context "message" (-&gt; request :form-params (get "msg")))
        (catch java.io.IOException e
          (remove-subscriber sse-context))))
    {:status 204})
  </code></pre>
  
  <p>Basically this keeps a map of subscribers (a map of EventSource clients) and sends chat events to them. </p>
  
  <p>My question is - suppose you wanted to scale this application across multiple servers. What is an idomatic pattern in which to do this? (hopefully in Clojure Pedestal - but could be a solution from across the Java spectrum)</p>