O'Reilly logo

Clojure for Finance by Timothy Washington

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

Devising a persistence strategy

Considering the structure of data and how it will be used later, may inform us about how we write it now. We know that we have an infinite sequence of data that we need to write. In the software profession, these are known as data streams. They can be in the form of video feeds from CCTV cameras or social media content, or in our case, a continuously updating stock price. This means that we will never be able to collect all the data in memory and then write it out. Knowing this, we need to devise a strategy to collect and save our data in a manageable way.

In fact, input and output streams are conceptual ways of handling an infinite stream of data. Clojure leverages Java's streaming API in the clojure.java.io namespace ...

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