streamly: Beautiful Streaming, Concurrent and Reactive Composition
Streamly, short for streaming concurrently, provides monadic streams, with a simple API, almost identical to standard lists, and an in-built support for concurrency. By using stream-style combinators on stream composition, streams can be generated, merged, chained, mapped, zipped, and consumed concurrently – providing a generalized high level programming framework unifying streaming and concurrency. Controlled concurrency allows even infinite streams to be evaluated concurrently. Concurrency is auto scaled based on feedback from the stream consumer. The programmer does not have to be aware of threads, locking or synchronization to write scalable concurrent programs.
The basic streaming functionality of streamly is equivalent to that provided by
streaming libraries like
In addition to providing streaming functionality, streamly subsumes the
functionality of list transformer libraries like
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
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.
Why use streamly?
Simplicity: Simple list like streaming API, if you know how to use lists then you know how to use streamly. This library is built with simplicity and ease of use as a primary design goal.
Concurrency: Simple, powerful, and scalable concurrency. Concurrency is built-in, and not intrusive, concurrent programs are written exactly the same way as non-concurrent ones.
Generality: Unifies functionality provided by several disparate packages (streaming, concurrency, list transformer, logic programming, reactive programming) in a concise API.
Performance: Streamly is designed for high performance. It employs stream fusion optimizations for best possible performance. Serial peformance is equivalent to the venerable
vectorlibrary in most cases and even better in some cases. Concurrent performance is unbeatable. See streaming-benchmarks for a comparison of popular streaming libraries on micro-benchmarks.
Where to find more information:
READMEshipped with the package for a quick overview
Streamly.Tutorial module in the haddock documentation for a detailed introduction
examplesdirectory in the package for some simple practical examples
[Skip to Readme]
|Versions [faq]||0.1.0, 0.1.1, 0.1.2, 0.2.0, 0.2.1, 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.5.2, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2|
|Dependencies||atomic-primops (==0.8.*), base (>=4.8 && <5), containers (==0.5.*), exceptions (>=0.8 && <0.11), ghc-prim (>=0.2 && <0.6), heaps (==0.3.*), lockfree-queue (>=0.2.3 && <0.3), monad-control (>=1.0 && <2), mtl (>=2.2 && <3), semigroups (==0.18.*), transformers (>=0.4 && <0.6), transformers-base (==0.4.*) [details]|
|Copyright||2017 Harendra Kumar|
|Category||Control, Concurrency, Streaming, Reactivity|
|Source repo||head: git clone https://github.com/composewell/streamly|
|Uploaded||by harendra at 2018-07-11T15:17:01Z|
|Distributions||LTSHaskell:0.5.2, NixOS:0.7.2, Stackage:0.6.1|
|Executables||CirclingSquare, AcidRain, MergeSort, ListDir, SearchQuery, chart-nested, chart-linear|
|Downloads||7877 total (79 in the last 30 days)|
|Rating||2.5 (votes: 5) [estimated by Bayesian average]|
Docs available [build log]
Last success reported on 2018-07-11 [all 1 reports]
Disable rewrite rules
Use CPS style streams when possible
Build including examples
Build including SDL examples
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
For package maintainers and hackage trustees