CptnKirk

CptnKirk

GenStage eye for the Akka Streams guy?

I’m coming from a Scala and Akka Streams background. Elixir GenStage and Flow seem familiar and attractive. What I seem to be missing is the GenStage ecosystem and some off the shelf sources.

For example, I’d like to write a streaming socket duplicator. Take a TCP producer and broadcast binaries to multiple consumer pipelines.

Where is the high-quality TCP/UDP GenStage Producer (I see File IO support, but not network)?

Is there an explicit implementation of a “buffer” stage that supports various overflow strategies similar to (http://doc.akka.io/docs/akka/2.5.3/scala/stream/stream-rate.html#buffers-in-akka-streams)?

Is there a connector ecosystem similar to http://developer.lightbend.com/docs/alpakka/current/?

Thanks for any help/tips/pointers.

First Post! Switch mode

aseigo

aseigo

I don’t believe such a thing has kicked off, no. While there are more libraries using GenStage and Flow over time, a coordinated collection of useful GenStage modules does not exist, at least afaik.

It would be awesome to start it though! :slight_smile:

Most Liked

CptnKirk

CptnKirk

I agree with that. I’ve been on the JVM for a long time. But for my next project, the JVM is going to be too heavyweight. So I’m looking at BEAM. OTP and Erlang inspired so much within Scala and Akka that I’m hoping to feel at home here. So far, so good, and the community is amazing.

Elixir has been inspired by the reactive-streams processing model. GenStages seem to be a decent analog to RS Publisher/Subscriber. What Elixir is missing are the higher-level toolkits akin to RxJava2, Akka Streams, etc. Flow exists but isn’t as mature as Akka Streams.

The question is how to mature reactive streams within the Elixir community? Do we attempt to mature Flow? Have a few companies/projects roll their own abstractions on top of GenStage? Anything would be better than nothing. I’m just trying to decide where to focus my energies.

On the JVM, a leading web framework has been leveraging Akka Streams as its base processing architecture for a while and has recently transitioned to Akka HTTP for request handling. Whether you pick Akka Streams or a different reactive-streams compliant library you end up with a solid processing model and interoperability between libs built on top of the RS SPI. Elixir could have that too.

CptnKirk

CptnKirk

Bummer that more foundational stages don’t exist yet. An Elixir provided TCP producer stage seems like something that ought to be standard with this concept.

I’d be willing to contribute to a coordinated collection or an umbrella project that seeks to unify quality stage implementations, high-level flow API as well as eventually a graph API. But I don’t have the time to lead such an effort. Is that something the Elixir guys could coordinate?

The community has been amazing thus far. It even seems that the Witchcraft folks are working on a graph DSL, albeit not for GenStages explicitly. I’ve no doubt that the community can collect some amazing building blocks if they were coordinated.

You’ll need a:

  • Site dedicated to “Reactive Elixir” or whatever buzzword you want.
  • Codebase for developers to submit PRs against.
  • Collection of foundational stages.
  • Higher level stage abstractions, like Flow and Graph. (include the ability to delegate the constructing of physical stages from Flow/Graph descriptions – this will allow for optimizations such as stage fusion where a single stage handles a process chain, avoiding message passing overhead)
  • Tutorials showing many examples and cookbooks for solving common problems.

Elixir has already borrowed concepts from Reactive Streams and the Akka community. Borrow this too. It will take proper stream-based programming on Elixir to the next level. It may even drive language adoption. Since there would be a clear path for those looking to move from the JVM to BEAM using familiar methodologies.

mkunikow

mkunikow

I can be brutal but I would say that you don’t find anything more mature in any language than Java Reactive Streams implementations http://www.reactive-streams.org/
like RxJava2, Akka Streams … and what is great that RxJava2 can talk to Akka Streams as they both implements reactive streams.

Where Next?

Trending in Questions Top

jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
saveman71
Hello ! We want new/edit form pages to POST/PUT to their own URL rather than the resources REST defaults (post /things, put /things/:id)...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement