manifold.deferred/->source
, and then take the first message from it. This is entirely equivalent to the previous implementation."--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/peJXvE0nBZs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks, and I put the blog post on my reading list.Although I can't avoid thinking that we already have asynchronous idioms in the core language itself, like agents. I think the crux for server-side is more about the convenient piping, rather than the mere asynchronism itself, but I might be wrong in any of this.
On Mon, Sep 19, 2016 at 9:14 AM, Mond Ray <mondr...@gmail.com> wrote:
Pushing asynchrony further into the stack is useful for reliability and fault tolerance. We can also use it as a basis for Complex Event Processing using time series windows.I wrote up a few examples in my blog if you have the time to check out a longer explanation with code.I recently wrote a small set of functions to enable HTML5 Server Sent Events from any Kafka topic which also uses core.async (with an example using Aleph and Compojure). You might like to check that repo out too.Ray
On Sunday, 18 September 2016 08:37:38 UTC+2, Matan Safriel wrote:Hi,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?Thanks,Matan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/peJXvE0nBZs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
So when to use agents? I've looked through Clojure repos on Github, looking for uses of agents, and I found very few. (I was writing a blog post about concurrency in Clojure, and I found that agents are among the least used tools for concurrency). I found a lot of uses of futures and promises and channels and core.async, and certainly atoms, but I didn't find many uses of agents. When are agents best used?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
My particular case was server-side gRPC StreamObservers for long lived client connections.
These are either usable, closed, or errored and an exception is thrown if you try to send on a closed or errored observer.
Using the agent state to model the life cycle, and the natural queueing of agent actions gave me thread-safe fire-and-forget semantics (which was appropriate for the messages involved).
To be honest it was the first time I've found a good use for agents, but they fit really well.
-Gordon