gen_stage VS rustic_result

Compare gen_stage vs rustic_result and see what are their differences.

gen_stage

Producer and consumer actors with back-pressure for Elixir (by elixir-lang)

rustic_result

Result monad for Elixir inspired by Rust Result type (by linkdd)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
gen_stage rustic_result
2 5
1,451 21
0.3% -
3.8 5.3
about 2 months ago 3 months ago
Elixir Elixir
- MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

gen_stage

Posts with mentions or reviews of gen_stage. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-09.
  • Switching to Elixir
    11 projects | news.ycombinator.com | 9 Nov 2023
    You can actually have "background jobs" in very different ways in Elixir.

    > I want background work to live on different compute capacity than http requests, both because they have very different resources usage

    In Elixir, because of the way the BEAM works (the unit of parallelism is much cheaper and consume a low amount of memory), "incoming http requests" and related "workers" are not as expensive (a lot less actually) compared to other stacks (for instance Ruby and Python), where it is quite critical to release "http workers" and not hold the connection (which is what lead to the creation of background job tools like Resque, DelayedJob, Sidekiq, Celery...).

    This means that you can actually hold incoming HTTP connections a lot longer without troubles.

    A consequence of this is that implementing "reverse proxies", or anything calling third party servers _right in the middle_ of your own HTTP call, is usually perfectly acceptable (something I've done more than a couple of times, the latest one powering the reverse proxy behind https://transport.data.gouv.fr - code available at https://github.com/etalab/transport-site/tree/master/apps/un...).

    As a consequence, what would be a bad pattern in Python or Ruby (holding the incoming HTTP connection) is not a problem with Elixir.

    > because I want to have state or queues in front of background work so there's a well-defined process for retry, error handling, and back-pressure.

    Unless you deal with immediate stuff like reverse proxying or cheap "one off async tasks" (like recording a metric), there also are solutions to have more "stateful" background works in Elixir, too.

    A popular background job queue is https://github.com/sorentwo/oban (roughly similar to Sidekiq at al), which uses Postgres.

    It handles retries, errors etc.

    But it's not the only solution, as you have other tools dedicated to processing, such as Broadway (https://github.com/dashbitco/broadway), which handles back-pressure, fault-tolerance, batching etc natively.

    You also have more simple options, such as flow (https://github.com/dashbitco/flow), gen_stage (https://github.com/elixir-lang/gen_stage), Task.async_stream (https://hexdocs.pm/elixir/1.12/Task.html#async_stream/5) etc.

    It allows to use the "right tool for the job" quite easily.

    It is also interesting to note there is no need to "go evented" if you need to fetch data from multiple HTTP servers: it can happen in the exact same process (even: in a background task attached to your HTTP server), as done here https://transport.data.gouv.fr/explore (if you zoom you will see vehicle moving in realtime, and ~80 data sources are being polled every 10 seconds & broadcasted to the visitors via pubsub & websockets).

  • I've made a simple Discord bot to learn Elixir, and would really like some feedback and tips
    4 projects | /r/elixir | 27 Feb 2021
    I think if the bot gets a lot of users or streams being tracked you might run into issues with how sync_streams works, you might want to look at something like GenStage or maybe Oban to send messages in batches. In a similar note you'd want to do the same thing for cases where you are doing Repo.all.

rustic_result

Posts with mentions or reviews of rustic_result. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-09.
  • Switching to Elixir
    11 projects | news.ycombinator.com | 9 Nov 2023
    Self promotion moment:

    If you enjoy the Result/Either type and API in Rust, I made this project just for this: https://github.com/linkdd/rustic_result

    I also made https://github.com/linkdd/rustic_maybe/tree/main for an Option/Maybe type.

    NB: Those are not types, but I'm waiting for set theoretic types to update those libs :)

  • Error Handling Patterns
    3 projects | news.ycombinator.com | 4 May 2023
    It's missing the Erlang/Elixir pattern of returning a tuple `{:ok, T}` or `{:error, E}`, where we can then use pattern matching, or `with` expressions, etc...

    To be fair, it is very similar to a `Result` type, which is why I made this library a while ago: https://github.com/linkdd/rustic_result

  • A new milestone for Letlang - Effect Handlers
    1 project | /r/ProgrammingLanguages | 13 Mar 2023
    I intend to add a pipeline operator similar to Elixir, to be used with an std::result module which will provide functions to ease writing such complex code. I may take inspiration on an Elixir library I wrote a while ago: https://github.com/linkdd/rustic_result
  • Elixir Railway Oriented Programming
    1 project | /r/elixir | 9 Mar 2023
    A while ago, I made this library https://github.com/linkdd/rustic_result
  • Go Replaces Interface{} with 'Any'
    10 projects | news.ycombinator.com | 14 Dec 2021
    I also made a library for working with `{:ok, value}` and `{:error, reason}` in Elixir: https://github.com/linkdd/rustic_result

    Thanks to the pipeline operator and pattern matching, it makes pretty easy to read pipelines. It does not completely replace the with statement (that was not the point) but it simplified a lot of code.

What are some alternatives?

When comparing gen_stage and rustic_result you can also consider the following projects:

botchini - Discord bot with Twitch integration

neverthrow - Type-Safe Errors for JS & TypeScript

transport-site - Rendre disponible, valoriser et améliorer les données transports

eqwalizer - A type-checker for Erlang

semver - Semantic Versioning Specification

flow - Computational parallel flows on top of GenStage

go - The Go programming language

rustic_maybe - Maybe monad for Elixir inspired by Rust Option type

broadway - Concurrent and multi-stage data ingestion and data processing with Elixir

gopherjs - A compiler from Go to JavaScript for running Go code in a browser