GithubHelp home page GithubHelp logo

isabella232 / flow-5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gameanalytics/flow

0.0 0.0 0.0 208 KB

Computational parallel flows on top of GenStage

Home Page: https://hexdocs.pm/flow

Elixir 100.00%

flow-5's Introduction

Flow Build Status

Flow allows developers to express computations on collections, similar to the Enum and Stream modules, although computations will be executed in parallel using multiple GenStages.

Here is a quick example on how to count words in a document in parallel with Flow:

File.stream!("path/to/some/file")
|> Flow.from_enumerable()
|> Flow.flat_map(&String.split(&1, " "))
|> Flow.partition()
|> Flow.reduce(fn -> %{} end, fn word, acc ->
  Map.update(acc, word, 1, & &1 + 1)
end)
|> Enum.to_list()

See documentation for Flow or José Valim's keynote at ElixirConf 2016 introducing the main concepts behind GenStage and Flow.

Installation

Flow requires Elixir v1.3. Add :flow to your list of dependencies in mix.exs:

def deps do
  [{:flow, "~> 0.14"}]
end

License

See license for Elixir.

flow-5's People

Contributors

anthonyfalzetti avatar arkgil avatar arkham avatar asummers avatar axelson avatar cloud8421 avatar costaraphael avatar danxexe avatar davich avatar davidsulc avatar emilsoman avatar gj avatar husseinmorsy avatar isaacsanders avatar josevalim avatar kagux avatar lackac avatar lexmag avatar lmarlow avatar mhinz avatar neilw avatar optikfluffel avatar sunaku avatar supersimple avatar whatyouhide avatar wpcarro avatar zeeshanlakhani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.