@hackage streamly0.2.0

Beautiful Streaming, Concurrent and Reactive Composition

Streamly, short for streaming concurrently, is a simple yet powerful streaming library with concurrent merging and concurrent nested looping support. A stream is just like a list except that it is a list of monadic actions rather than pure values. Streamly streams can be generated, consumed, combined, or transformed serially or concurrently. We can loop over a stream serially or concurrently. We can also have serial or concurrent nesting of loops. For those familiar with list transformer concept streamly is a concurrent list transformer. Streamly uses standard composition abstractions. Concurrent composition is just the same as serial composition except that we use a simple combinator to request a concurrent composition instead of serial. The programmer does not have to be aware of threads, locking or synchronization to write scalable concurrent programs.

Streamly provides functionality that is equivalent to streaming libraries like pipes and conduit but with a simple list like API. The streaming API of streamly is close to the monadic streams API of the vector package and similar in concept to the streaming package. In addition to the streaming functionality, streamly subsumes the functionality of list transformer libraries like pipes or list-t and also the logic programming library logict. On the concurrency side, it subsumes the functionality of the async package. Because it supports streaming with concurrency we can write FRP applications similar in concept to Yampa or reflex.

Streamly has excellent performance, see streaming-benchmarks for a comparison of popular streaming libraries on micro-benchmarks. For file IO, currently the library provides only one API to stream the lines in the file as Strings. Future versions will provide better streaming file IO options. Streamly interworks with the popular streaming libraries, see the interworking section in Streamly.Tutorial.

Where to find more information:

  • README shipped with the package for a quick overview

  • Streamly.Tutorial module in the haddock documentation for a detailed introduction

  • examples directory in the package for some simple practical examples