datapipes is an asynchronous multi streaming library.
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
datapipes requires Ruby >= 2.0.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install datapipes
You have to define your own Source, Tube and Sink. See more in
See more in
- Fork it ( http://github.com/taiki45/datapipes/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request