Personal tools

Pipes

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Announcements: pipes-network-0.4.0.0)
m
 
(13 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
[[Category:Packages]]
 
[[Category:Packages]]
   
Use pipes to create elegant streaming programs within Haskell. Build streaming components and connect them them together to process both events and data.
+
The pipes library is a clean and powerful stream processing library that lets you build and connect reusable streaming components.
   
 
== Libraries ==
 
== Libraries ==
Line 11: Line 11:
 
=== pipes ===
 
=== pipes ===
   
The [http://hackage.haskell.org/package/pipes pipes] package is the core library which emphasizes:
+
The [http://hackage.haskell.org/package/pipes pipes] package is the core library which provides reusable primitives for stream programming. Use these as building blocks for more sophisticated streaming abstractions.
   
* Elegance and Simplicity
+
Read the [http://hackage.haskell.org/packages/archive/pipes/4.0.0/doc/html/Pipes-Tutorial.html official pipes tutorial] to learn more.
* Speed
 
* Lightweight dependencies
 
 
The pipes library offers many unique features not available in other streaming libraries:
 
 
* Bidirectional streams
 
* Extension framework
 
* Elegant ListT interconversions
 
* Correctness proofs for the entire library
 
 
Read the [http://hackage.haskell.org/packages/archive/pipes/3.2.0/doc/html/Control-Proxy-Tutorial.html official pipes tutorial] to learn more.
 
   
 
Source code hosted on [https://github.com/Gabriel439/Haskell-Pipes-Library GitHub]
 
Source code hosted on [https://github.com/Gabriel439/Haskell-Pipes-Library GitHub]
Line 19: Line 19:
 
=== pipes-safe ===
 
=== pipes-safe ===
   
The [http://hackage.haskell.org/package/pipes-safe pipes-safe] package adds resource management and exception safety to the pipes ecosystem. pipes-safe offers many high-level features such as:
+
The [http://hackage.haskell.org/package/pipes-safe pipes-safe] package adds resource management and exception safety to the pipes ecosystem. Use pipes-safe to safely acquire and release resources deterministically within a pipeline.
 
* Complete exception safety, including asynchronous exceptions
 
* Termination safety
 
* Resources are freed in reverse order of acquisition
 
 
Additionally, pipes-safe is the only streaming library that provides truly native exception handling, allowing you to seamlessly handle exceptions and resume uninterrupted streaming.
 
 
Read the [http://hackage.haskell.org/packages/archive/pipes-safe/1.1.0/doc/html/Control-Proxy-Safe-Tutorial.html official pipes-safe tutorial] to learn more.
 
   
 
Source code hosted on [https://github.com/Gabriel439/Haskell-Pipes-Safe-Library GitHub]
 
Source code hosted on [https://github.com/Gabriel439/Haskell-Pipes-Safe-Library GitHub]
Line 25: Line 25:
 
=== pipes-concurrency ===
 
=== pipes-concurrency ===
   
The [http://hackage.haskell.org/package/pipes-concurrency pipes-concurrency] package adds powerful and light-weight concurrency primitives to the pipes ecosystem. Use these primitives to:
+
The [http://hackage.haskell.org/package/pipes-concurrency pipes-concurrency] package adds concurrency primitives to the pipes ecosystem with built-in deadlock safety. Use these primitives to:
   
 
* Build reactive event-driven programs
 
* Build reactive event-driven programs
* Merge and split streams
+
* Merge and broadcast streams
 
* Communicate between multiple concurrent pipelines
 
* Communicate between multiple concurrent pipelines
* Manage multiple resources simultaneously
 
   
The pipes-concurrency library offers several features unavailable in other streaming libraries such as:
+
Read the [http://hackage.haskell.org/packages/archive/pipes-concurrency/2.0.0/doc/html/Pipes-Concurrent-Tutorial.html official pipes-concurrency tutorial] to learn more.
   
* Deadlock safety
+
Source code hosted on [https://github.com/Gabriel439/Haskell-Pipes-Concurrency-Library GitHub]
* Cyclic communication graphs
 
* Dynamically changing graph topologies
 
   
Read the [http://hackage.haskell.org/packages/archive/pipes-concurrency/1.0.0/doc/html/Control-Proxy-Concurrent-Tutorial.html official pipes-concurrency tutorial] to learn more.
+
=== pipes-parse ===
   
Source code hosted on [https://github.com/Gabriel439/Haskell-Pipes-Concurrency-Library GitHub]
+
The [http://hackage.haskell.org/package/pipes-parse pipes-parse] package defines the generic machinery necessary for common parsing tasks. Use pipes-parse to:
  +
  +
* handle leftovers and end of input,
  +
* interrupt and resume streaming, and
  +
* sub-divide streams without collecting elements in memory.
  +
  +
Source code hosted on [https://github.com/Gabriel439/Haskell-Pipes-Parse-Library GitHub]
   
 
== Community-contributed libraries ==
 
== Community-contributed libraries ==
  +
  +
Listed in alphabetical order.
  +
  +
=== pipes-aeson ===
  +
  +
The [http://hackage.haskell.org/package/pipes-aeson pipes-aeson] library allows you to encode and decode JSON values flowing through streams, possibly
  +
interleaving other stream effects while doing it.
  +
  +
Source code is hosted on [https://github.com/k0001/pipes-aeson GitHub]
   
 
=== pipes-attoparsec ===
 
=== pipes-attoparsec ===
Line 47: Line 55:
   
 
Source code hosted on [https://github.com/k0001/pipes-attoparsec GitHub]
 
Source code hosted on [https://github.com/k0001/pipes-attoparsec GitHub]
  +
  +
=== pipes-binary ===
  +
  +
The [http://hackage.haskell.org/package/pipes-binary pipes-binary] library allows streams of binary data to be encoded and decoded using the <code>Binary</code> instances from the [http://hackage.haskell.org/package/binary binary] package.
  +
  +
Source code is hosted on [https://github.com/k0001/pipes-binary GitHub]
   
 
=== pipes-network ===
 
=== pipes-network ===
Line 53: Line 67:
   
 
Source code hosted on [https://github.com/k0001/pipes-network GitHub]
 
Source code hosted on [https://github.com/k0001/pipes-network GitHub]
  +
  +
=== pipes-network-tls ===
  +
  +
The [http://hackage.haskell.org/package/pipes-network-tls pipes-network-tls] allows streaming through TLS-secured network connections, exposing a similar API to the one exposed by [http://hackage.haskell.org/package/pipes-network pipes-network].
  +
  +
Source code hosted on [https://github.com/k0001/pipes-network-tls GitHub]
   
 
=== pipes-zlib ===
 
=== pipes-zlib ===
Line 59: Line 79:
   
 
Source code hosted on [https://github.com/k0001/pipes-zlib GitHub]
 
Source code hosted on [https://github.com/k0001/pipes-zlib GitHub]
  +
  +
== Community ==
  +
  +
Besides the usual Haskell community channels such as the [[Mailing_lists|official mailing lists]] or the [http://reddit.com/r/haskell Haskell subreddit], you can ask for help, suggest improvements, or discuss about the Pipes ecosystem at the [https://groups.google.com/group/haskell-pipes “haskell-pipes” mailing list at Google Groups].
   
 
== Announcements ==
 
== Announcements ==
   
In chronological order.
+
In chronological order:
   
 
* [http://www.reddit.com/r/haskell/comments/ohjg7/a_new_approach_to_iteratees/ pipes-1.0.0]: The original announcement, which first introduced the concept of unifying sources and sinks and transducers into a single [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Category.html Category].
 
* [http://www.reddit.com/r/haskell/comments/ohjg7/a_new_approach_to_iteratees/ pipes-1.0.0]: The original announcement, which first introduced the concept of unifying sources and sinks and transducers into a single [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Category.html Category].
Line 88: Line 112:
 
* [https://groups.google.com/forum/?fromgroups=#!topic/haskell-pipes/O4_5dZ7WwXE pipes-zlib-0.2.0.0]: Zlib compression/decompression support for pipes
 
* [https://groups.google.com/forum/?fromgroups=#!topic/haskell-pipes/O4_5dZ7WwXE pipes-zlib-0.2.0.0]: Zlib compression/decompression support for pipes
   
* [https://groups.google.com/forum/?fromgroups=#!topic/haskell-pipes/ywYvew2C-LY pipes-network-0.4.0.0]: Gracefully stop streaming on “Broken Pipe” errors.
+
* [https://groups.google.com/d/msg/haskell-pipes/XGb-8x5YWY0/41BUbJagnuEJ pipes-network-tls-0.1.0.0]: Stream through TLS-secured network connections.
  +
  +
* [http://www.haskellforall.com/2013/06/pipes-parse-100-pushback-delimited.html pipes-parse-1.0.0]: Pushback, delimited parsers, resumable parsing, and lenses
  +
  +
* [https://groups.google.com/d/msg/haskell-pipes/3A-RbzCUovw/9GEIDi5WRbwJ pipes-attoparsec-0.2.0.0]: New API, interleaved parsing support, built on top of pipes-parse.
  +
  +
* [https://groups.google.com/d/msg/haskell-pipes/2CQ9eiPUxjA/kBqcQboPdjoJ pipes-aeson-0.1.0.0]: Encode and decode JSON streams.
  +
  +
* [https://groups.google.com/d/msg/haskell-pipes/7I8KcMW3zHU/5Mi8PKbuv2sJ pipes-binary-0.1.0.0]: Encode and decode binary streams using the <code>binary</code> package.
  +
  +
* [http://www.haskellforall.com/2013/09/pipes-40-simpler-types-and-api.html pipes-4.0.0]: Simpler types and API
   
 
== Upcoming libraries ==
 
== Upcoming libraries ==
   
* pipes-parse: Parsing support for the pipes ecosystem
+
* pipes-bytestring: ByteString support. Source code is hosted at [https://github.com/Gabriel439/Haskell-Pipes-ByteString-Library GitHub]
  +
  +
* pipes-text: Text support
   
* pipes-string: Bytestring and Text support
+
== Videos ==
   
* pipes-free: Pipe suspension and single-stepping pipes
+
* [http://www.youtube.com/watch?v=2jdJGdA7AYs Pipes], by Oliver Charles. London Haskell user group, 18th September 2013.
   
* pipes-network-tls: TLS-secured alternative to pipes-network
+
== See also ==
   
* pipes-attoparsec: Improve the current pipes-attoparsec library by relying on the upcoming pipes-parse for interleaved parsing support.
+
* [http://www.yesodweb.com/blog/2013/10/core-flaw-pipes-conduit The core flaw of pipes and conduit] (blog article)

Latest revision as of 22:22, 23 October 2013


The pipes library is a clean and powerful stream processing library that lets you build and connect reusable streaming components.

Contents

[edit] 1 Libraries

Pipes is the official Hackage category for the pipes ecosystem.

[edit] 1.1 pipes

The pipes package is the core library which provides reusable primitives for stream programming. Use these as building blocks for more sophisticated streaming abstractions.

Read the official pipes tutorial to learn more.

Source code hosted on GitHub

[edit] 1.2 pipes-safe

The pipes-safe package adds resource management and exception safety to the pipes ecosystem. Use pipes-safe to safely acquire and release resources deterministically within a pipeline.

Source code hosted on GitHub

[edit] 1.3 pipes-concurrency

The pipes-concurrency package adds concurrency primitives to the pipes ecosystem with built-in deadlock safety. Use these primitives to:

  • Build reactive event-driven programs
  • Merge and broadcast streams
  • Communicate between multiple concurrent pipelines

Read the official pipes-concurrency tutorial to learn more.

Source code hosted on GitHub

[edit] 1.4 pipes-parse

The pipes-parse package defines the generic machinery necessary for common parsing tasks. Use pipes-parse to:

  • handle leftovers and end of input,
  • interrupt and resume streaming, and
  • sub-divide streams without collecting elements in memory.

Source code hosted on GitHub

[edit] 2 Community-contributed libraries

Listed in alphabetical order.

[edit] 2.1 pipes-aeson

The pipes-aeson library allows you to encode and decode JSON values flowing through streams, possibly interleaving other stream effects while doing it.

Source code is hosted on GitHub

[edit] 2.2 pipes-attoparsec

The pipes-attoparsec library converts attoparsec parsers to pipes for high-performance incremental parsing.

Source code hosted on GitHub

[edit] 2.3 pipes-binary

The pipes-binary library allows streams of binary data to be encoded and decoded using the Binary instances from the binary package.

Source code is hosted on GitHub

[edit] 2.4 pipes-network

The pipes-network library converts server and client sockets to pipes to seamlessly stream data over any network.

Source code hosted on GitHub

[edit] 2.5 pipes-network-tls

The pipes-network-tls allows streaming through TLS-secured network connections, exposing a similar API to the one exposed by pipes-network.

Source code hosted on GitHub

[edit] 2.6 pipes-zlib

The pipes-zlib enables compression and decompression of strict ByteString streams using the zlib codec.

Source code hosted on GitHub

[edit] 3 Community

Besides the usual Haskell community channels such as the official mailing lists or the Haskell subreddit, you can ask for help, suggest improvements, or discuss about the Pipes ecosystem at the “haskell-pipes” mailing list at Google Groups.

[edit] 4 Announcements

In chronological order:

  • pipes-1.0.0: The original announcement, which first introduced the concept of unifying sources and sinks and transducers into a single Category.
  • pipes-2.0.0: The introduction of Frames, later deprecated in favor of pipes-safe.
  • pipes-2.1.0: Transition of Frames to indexed monads, later deprecated in favor of pipes-safe.
  • pipes-2.3.0: The introduction of bidirectional Proxies, which evolved into modern pipes.
  • pipes-2.4.0: The release of the proxy transformer extension system.
  • pipes-3.0.0: Major API simplification and consolidation.
  • pipes-3.2.0: ListT integration, Codensity proxy transformer, and ArrowChoice primitives.

[edit] 5 Upcoming libraries

  • pipes-bytestring: ByteString support. Source code is hosted at GitHub
  • pipes-text: Text support

[edit] 6 Videos

  • Pipes, by Oliver Charles. London Haskell user group, 18th September 2013.

[edit] 7 See also