O'Reilly logo

Clojure Reactive Programming by Leonardo Borges

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rewriting the stock market application with core.async

By using an example we are familiar with, we are able to focus on the differences between all approaches discussed so far, without getting side tracked with new, specific domain rules.

Before we dive into the implementation, let's quickly do an overview of how our solution should work.

Just like in our previous implementations, we have a service from which we can query share prices. Where our approach differs, however, is a direct consequence of how core.async channels work.

On a given schedule, we would like to write the current price to a core.async channel. This might look like so:

Rewriting the stock market application with core.async

This process ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required