alfert / reaxive

Reactive Extensions for Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IO Generators

alfert opened this issue · comments

We need generators that are based on IO operations:

  • an event for each TCP/UDP package
  • an event for each HTTP request
  • an event for each line or character in a file

File IO can easily be handled via the stream! function on a File and Rx.generate:

File.stream!("hallo.txt") |> Rx.generate |> Rx.take(10)

Network operations are much more complex and depend on the particular use cases and libraries. Any bridge between gen_tcp, gen_udp or any HTTP-Server (such as cowboy) needs to be setup specifically. Towards the events sequence, the bridge behaves similar to Rx.generate