"Alternately, we can use a core.async
<https://github.com/clojure/core.async> goroutine to create our response,
and convert the channel it returns using manifold.deferred/->source, and
then take the first message from it. This is entirely equivalent to the
"Returns a streamed HTTP response, consisting of newline-delimited numbers
every 100 milliseconds. While this would typically be represented by a lazy
sequence, instead we use a Manifold stream. Similar to the use of the
deferred above, *this means we don't need to allocate a thread per-request.*
I have tried the examples, it all works. Haven't done any benchmarks
against using thread per-request though - you should think if your use-case
can really benefit from this approach.
On Saturday, September 17, 2016 at 11:37:38 PM UTC-7, Matan Safriel wrote:
> It's very easy to see how core.async solves callback hell for front-end
> development with clojurescript.
> In what use cases would you use it for server-side? we already have
> non-blocking IO from Java, and we have clojure agents. So what's a bunch of
> salient use cases?
> Are there prominent clojure http server implementations which rely on it
> for transcending the threaded web service paradigm?
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to firstname.lastname@example.org
Note that posts from new members are moderated - please be patient with your
To unsubscribe from this group, send email to
For more options, visit this group at
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.