Many applications involve dealing with large flows of data. Examples are processing files in ETL jobs, reading results from a database or getting a big response from http calls. Handling large amounts of data often means sacrificing either readability or performance.
With streams, you can get the best of both worlds:
- Data is processed using a constant amount of memory, even if the total amount of data is very large
- The processing is built declaratively as if you were dealing with regular Lists or Sequences, with high level methods such as map, filter and flatMap
Many applications involve dealing with large flows of data. Examples are processing files in ETL jobs, reading results from a database or getting a big response from http calls. Handling large amounts of data often means sacrificing either readability or performance.
With streams, you can get the best of both worlds:
- Data is processed using a constant amount of memory, even if the total amount of data is very large
- The processing is built declaratively as if you were dealing with regular Lists or Sequences, with high level methods such as map, filter and flatMap
Furthermore, streams in FS2 are effect-aware. They work in the context of an effect monad like IO, which enables them to do all sorts of useful stuff such as processing elements in parallel, throttling, retrying on failure and many more.
In this course we will turn streams inside out and learn things like:
- Create and combine pure streams
- Add effects to our streams and learn how to compose them
- Handle errors & resources safely
- Apply patterns involving time, such as retries, throttling and debouncing.
- Build our own stream transformations with Pulls and Pipes
- Handle concurrency using many different patterns
- Communicate between streams using primitives such as Signals, Channels, Topics and Queues
Join me in this journey and add yet another amazing tool to your functional programming toolkit.
Let's review some of the pros and cons of the different solutions presented in this section!
Let's see how much you remember about creating and combining pure streams!
A few questions about how to create and combine effectful streams!
Let's see a few questions on Transforming Streams!
Let's go for a few questions on Concurrency!
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.