adammokan
Off Broadway Redis - An opinionated Redis list connector for Broadway
I published a simple (but opinionated) Redis producer for Broadway that I have been using in a production system I’m wrapping up. If anyone wants to check it out and beat on it, it can be found in hex and docs are published.
Edit: see update/name change info in this post.
https://github.com/amokan/broadway_redis
TLDR - If you have things in Redis lists and want to try to process them with Broadway, it may be a fit for you. There are for sure caveats and things that can be improved, but seems to work real well so far.
Glance at the README for more info.
Most Liked
adammokan
FWIW - I recently changed the library over to match the community guidelines for Broadway by renaming to off_broadway_redis.
Note the namespace changes. Outside of that, its a drop-in replacement for the OG version.
adammokan
Just to add a little more detail on the guts of this - for those that don’t want to dig through the README.
- My implementation follows the ‘Reliable Queue’ pattern outlined in the Redis documentation (RPOPLPUSH | Docs). This means it relies on an
RPOPLPUSHcommand to atomically move the item from the source list to a target ‘working’ or ‘processing’ list before returning said item to the producer. So be sure you push items to the left side of the Redis list you are working from (usingLPUSH) - this assumes you doing FIFO work. - I handle the acknowledgement aspect of Broadway by batching Redis
LREMcommands to the working list. - Both Redis commands (
RPOPLPUSHandLREM) are pipelined with sensible default batch sizes and limits.
Biggest caveat now is that you must supply the supervised Redis connection atom to the producer when starting. Maybe not a big deal, but I didn’t want to manage that in the initial release and keep it as simple as possible.
adammokan
I’m no longer crawling/scraping the web, but I do use the Broadway library for enterprise data integrations now. Although it is not all that different - except customers pay to access an endpoint they provide.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









