Project

datapipes

0.01
No commit activity in last 3 years
No release in over 3 years
To handle multi steamings easily.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
~> 0.7
>= 0
>= 0
>= 0
~> 0.8

Runtime

~> 1.0
 Project Readme

datapipes Gem Version

datapipes is an asynchronous multi streaming library.

Build Status Coverage Status Code Climate Dependency Status Inline docs

About

datapipes encourages to handle multi streamings asynchronously. datapipes has a few objects sparated by its responsibility.

  • Source Produces resources and emits the resource to pipe.
  • Tube Effector for resources. Processes resource in the middle of pipe.
  • Sink Consumer for resources. Do something with processed resources.
  • Pipe Resources pass through the pipe. Handles resources asynchronously.
 Source
   |   ↓ data flow
   |
  Tube
   |    pipe is '|'
   |
  Sink

To handle multi streamings, datapipes offers composability. Source, Tube and Sink are composable individually. So the diagram above will be:

 Composed Source works concurrently.

  [Source Source Source]
            |
            |  pipe handles asynchronous.
            |
           Tube
           Tube  Composed Tube has individual tube in series.
           Tube
           Tube
            |
            |
            |
     [Sink Sink Sink]

 Composed Sink works concurrently.

You can see how to compose objects in examples/composing.rb.

Installation

datapipes requires Ruby >= 2.0.

Add this line to your application's Gemfile:

gem 'datapipes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install datapipes

Usage

You have to define your own Source, Tube and Sink. See more in examples.

Composing objects

See more in examples/composing.rb.

Contributing

  1. Fork it ( http://github.com/taiki45/datapipes/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request