GithubHelp home page GithubHelp logo

classicvalues / gen_stage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from discord/gen_stage

1.0 1.0 0.0 1.16 MB

Producer and consumer actors with back-pressure for Elixir

Home Page: http://hexdocs.pm/gen_stage

Elixir 100.00%

gen_stage's Introduction

GenStage

GenStage is a specification for exchanging events between producers and consumers.

This project currently provides the following functionality:

  • GenStage (docs) - a behaviour for implementing producer and consumer stages

  • ConsumerSupervisor (docs) - a supervisor designed for consuming events from GenStage and starting a child process per event

You may also be interested in two other projects built on top of GenStage:

Examples

Examples for using GenStage and ConsumerSupervisor can be found in the examples directory:

  • ProducerConsumer - a simple example of setting up a pipeline of A -> B -> C stages and having events flowing through it

  • ConsumerSupervisor - an example of how to use one or more ConsumerSupervisor as a consumer to a producer that works as a counter

  • GenEvent - an example of how to use GenStage to implement an alternative to GenEvent that leverages concurrency and provides more flexibility regarding buffer size and back-pressure

  • RateLimiter - an example of performing rate limiting in a GenStage pipeline

Installation

GenStage requires Elixir v1.5. Just add :gen_stage to your list of dependencies in mix.exs:

def deps do
  [{:gen_stage, "~> 1.0"}]
end

License

Same as Elixir.

gen_stage's People

Contributors

fishcakez avatar josevalim avatar whatyouhide avatar lmarlow avatar foo42 avatar seivan avatar jfis avatar gustf avatar maennchen avatar myronmarston avatar amatalai avatar aaronrenner avatar davidsulc avatar ericentin avatar gavinjoyce avatar zeeshanlakhani avatar amokan avatar aerosol avatar zampino avatar talklittle avatar asummers avatar austinsmorris avatar benissimo avatar lostkobrakai avatar cameronp avatar chrrasmussen avatar christopheradams avatar kraigie avatar guedes avatar xfumihiro avatar

Stargazers

Classic Values avatar

Watchers

 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.