Flux - stream processing toolkit
version 1.03
use Flux::Simple qw( array_in array_out mapper ); my $in = array_in([ 5, 6, 7 ]); $in = $in | mapper { shift() * 2 }; my @result; my $out = array_out(\@result); $out = mapper { shift() * 3 } | mapper { shift() . "x" } | $out; $out->write($in->read); $out->write($in->read); say for @result; # Output: # 30x # 36x
Flux is the stream processing framework.
Flux::* module namespace includes:
Flux::*
groundwork for interoperable input and output stream classes;
various implementations of input and output streams and storages: in-memory, file-based, db-based and others;
tools for making these streams work together nicely: mappers, data formatters, overloading syntax sugar, etc;
Flux::Catalog module for the simple access to your collection of streams.
Flux::Catalog
Flux is a framework, but you can use lower-level parts of it without higher-level parts. For example, you can read and write files with Flux::File without declaring it in the Flux catalog.
This distribution and other Flux-* distributions on CPAN are the result of the refactoring of our in-house framework.
Flux-*
It should be stable. We used it in production for years. But remember that:
1) I'm rewriting this in Moo/Moose, and there can be bugs.
2) I can refactor some API aspects in the process.
3) Not all of the code is uploaded yet.
Message::Passing is similar to Flux.
Unlike Flux, it's asynchronous (Flux can be made asynchronous by using Coro, but its basic APIs are blocking).
IO::Pipeline syntax is similar to Flux mappers.
I'm sure there're many others. Stream processing is reinvented often.
Vyacheslav Matyukhin <me@berekuk.ru>
This software is copyright (c) 2013 by Yandex LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Flux, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Flux
CPAN shell
perl -MCPAN -e shell install Flux
For more information on module installation, please visit the detailed CPAN module installation guide.