All Projects → mtwilliams → bourne

mtwilliams / bourne

Licence: Unlicense license
🚤 Better streaming for Ecto.

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to bourne

broadway kafka
A Broadway connector for Kafka
Stars: ✭ 164 (+130.99%)
Mutual labels:  genstage
pulsar-adapters
Apache Pulsar Adapters
Stars: ✭ 18 (-74.65%)
Mutual labels:  streaming
wink-statistics
Fast & numerically stable statistical analysis
Stars: ✭ 36 (-49.3%)
Mutual labels:  streaming
RTP-Audio-and-Video-for-the-Internet-Chinese-Version
No description or website provided.
Stars: ✭ 30 (-57.75%)
Mutual labels:  streaming
sseserver
🏄 High-performance Server-Sent Events endpoint for Go
Stars: ✭ 88 (+23.94%)
Mutual labels:  streaming
streaming-pt
Live TV 📺 and Radio 📻 shell scripts from Portugal 🇵🇹.
Stars: ✭ 52 (-26.76%)
Mutual labels:  streaming
theWorldInSafety
Surveillance System Against Violence
Stars: ✭ 31 (-56.34%)
Mutual labels:  streaming
CSV2RDF
Streaming, transforming, SPARQL-based CSV to RDF converter. Apache license.
Stars: ✭ 48 (-32.39%)
Mutual labels:  streaming
penumbra
Encrypt/decrypt anything in the browser using streams on background threads.
Stars: ✭ 100 (+40.85%)
Mutual labels:  streaming
mastodon.js
Javascript Mastodon API for Web Browsers with streaming support
Stars: ✭ 32 (-54.93%)
Mutual labels:  streaming
blrec
Bilibili Live Streaming Recorder 哔哩哔哩直播录制
Stars: ✭ 124 (+74.65%)
Mutual labels:  streaming
GameHer
Gameher is a French association aspiring to develop gender diversity in the fields of video games, esport and streaming. We want to give players the tools they need to flourish and evolve in the fields of video games, esport and streaming.
Stars: ✭ 35 (-50.7%)
Mutual labels:  streaming
nginx-obs-automatic-low-bitrate-switching
Simple app to automatically switch scenes in OBS based on the current bitrate fetched from the NGINX stats page.
Stars: ✭ 167 (+135.21%)
Mutual labels:  streaming
rtsp-simple-proxy
DEPRECATED - please use https://github.com/aler9/rtsp-simple-server
Stars: ✭ 41 (-42.25%)
Mutual labels:  streaming
app
studio link - app - mirror repo only -> issues now https://gitlab.com/studio.link/app
Stars: ✭ 56 (-21.13%)
Mutual labels:  streaming
rdfa-streaming-parser.js
A fast and lightweight streaming RDFa parser for JavaScript
Stars: ✭ 15 (-78.87%)
Mutual labels:  streaming
fs2-es
Event sourcing utilities for FS2
Stars: ✭ 75 (+5.63%)
Mutual labels:  streaming
OtakuWorld
Anime Watcher, Manga Reader, and Novel Reader as three separate apps, same UI
Stars: ✭ 123 (+73.24%)
Mutual labels:  streaming
platform-sdk-js
Webtor.io platform SDK for online torrent streaming
Stars: ✭ 38 (-46.48%)
Mutual labels:  streaming
traffic
Massively real-time traffic streaming application
Stars: ✭ 25 (-64.79%)
Mutual labels:  streaming

Bourne

Continuous Integration Code Coverage Documentation Package

Bourne provides more powerful streaming mechanisms than those offered by Ecto or Tributary. Notably, it provides both cursor and keyset pagination methods, as well as the ability to create a GenStage producer with similar semantics to GenStage.from_enumerable.

Example

defmodule My.Repo do
  use Ecto.Repo, otp_app: :mine
  use Bourne
end

import Ecto.Query
q = from(actor in Actor, where: actor.born <= 1980)

# You can stream through an `Enumerable`:
My.Repo.stream(q) |> Stream.each(&IO.inspect) |> Stream.run

# Alternatively, you can stream through a GenStage producer:
defmodule InspectorConsumer do
  use GenStage

  def start_link do
    GenStage.start_link(InspectorConsumer, [])
  end

  def init([]) do
    {:consumer, :ok}
  end

  def handle_events(rows, _from, state) do
    Enum.each(rows, &IO.inspect/1)
    {:noreply, [], state}
  end
end

method = Enum.take_random(~W{cursor keyset}a, 1)
{:ok, producer} = My.Repo.streamer(q, method: method)
{:ok, consumer} = InspectorConsumer.start_link
GenStage.sync_subscribe(consumer, to: producer)

Installation

  1. Add bourne to your list of dependencies in mix.exs:
def deps do
  [{:bourne, "~> 1.0"}]
end
  1. Fetch and compile your new dependency:
mix do deps.get bourne, deps.compile
  1. Drink your 🍵

  2. That's it!

Usage

Refer to the documentation.

License

Bourne is free and unencumbered software released into the public domain, with fallback provisions for jurisdictions that don't recognize the public domain.

For details, see LICENSE.md.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].