jordelver
I’ve got a potential project that I think Broadway is well matched for, but I wanted to ask here for a sanity check ![]()
The basic workflow is:
- Periodically fetch data from a JSON HTTP API
- Store / cache the data
- Convert data / munge data into another format
- Provide data over XML HTTP API
To begin with there will only be one endpoint, but in the future there will be many different sources. Each may have different schedules for fetching data.
If I was doing this in Ruby (my background) I would probably use some sort of background job to fetch and convert the data, and then serve the data via Rails.
One reason Broadway is attractive to me is because it has features like rate limiting, which I can see being useful as this scales.
Would you use Broadway for this?
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m aware of 2 such projects, are there others?
git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
Hi all,
I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
How do I tell Hologram not to escape HTML when substituting into templates?
{Textile.render(@product.long_description)}
escapes the HTM...
New
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New
Hi,
we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
When I use Mix.install with a git dependency, using git@github.com:... how do I change the SSH identity used?
I’ve got two Github accoun...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
Hi everyone :waving_hand:
I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #elixirconf-us
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #security
- #elixirconf-eu
- #api
- #forms
- #performance










Showing Posts 11 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
jordelver
Thanks @chasers and @sorentwo for this interesting discussion. At the moment, I feel like I’d be more comfortable implementing a solution using Oban mainly because I understand the approach more clearly.
One thing that I like about the Oban is approach is observability. It seems to me that I can look at the state in the database and have a better idea of what is happening. I know Broadway has Telemetry hooks but I’m not sure about how to use those at the moment - that sounds like a totally new topic
jordelver
Your top article is the one I quoted above
Thanks for writing it. I haven’t read your others yet, but will.
To be completely honest, I don’t know the answers to your questions yet - this project is in the very early stages. It’s great to be aware of multiple strategies that may fit, so thanks for contributing to this post
jordelver
Thanks. I’ll have a read of those docs
akoutmos
I have written a few article/tutorials on Broadway and perhaps those can help inform your decision:
https://akoutmos.com/post/using-broadway/
https://akoutmos.com/post/broadway-rabbitmq-and-the-rise-of-elixir/
https://akoutmos.com/post/broadway-rabbitmq-and-the-rise-of-elixir-two/
I think some more information may be required to better answer your question:
On the simple side of the spectrum, you could have a simple GenServer with a send_after to do everything that you outlined and just start that process up in your application.ex supervision tree. On the complex side of things, you could run RabbitMQ and Broadway to do your processing, but that depends on the answers to the Qs above
. Like others have mentioned, Oban is also a good tool for the requirements that you outlined.
sorentwo
There is definitely a difference in throughput between batch ingesting SQS events and pulling from a transactional database. However, I think you’ll be limited by the actual job processing before the job processor’s throughput comes into play.
In my benchmarking Oban can process 15k no-op jobs per second on a single node—and batch processing is currently in the works which will increase that throughput significantly.
chasers
I’ve used Broadway extensively. Have not used Oban.
You can use Broadway to poll you just put stuff in your own producer. So you can totally use Broadway here and it would be great.
With Broadway, you do need to understand the lifecycle of a process and your app if you want to make sure you get every event.
Oban is backed by a database so your state is always there. You don’t have to worry about deploys affecting processes, etc. You sacrifice some throughout for this.
So those are mostly your high level trade offs.
If you’re not super comfortable with gen servers I’d say use Oban. If you need all the throughput use Broadway.
Edit: I should maybe clarify. Broadway won’t do the polling for you. Make your poller and put the results in a queue somewhere (ETS probably) and the have your producer pull from that.
svilen
Disclaimer: I haven’t used Oban
I don’t see a reason not to use Broadway, but I haven’t used it extensively myself either. You can give it a go by creating a custom producer as shown in the official guide:
It’s easy to make it do work periodically using
Process.send_after/4.It’s true that Broadway is great for data-ingestion pipelines because you can implement events acknowledgement when dealing with SQS. But if you don’t need that, you can still roll out your producer without acknowledgements and use the rest that Broadway provides.
jordelver
That’s actually part of the reason I was asking the question - the README does focus on usage with event streams as you say. However, this article uses fetching JSON as an example, but not quite in the same way as I was planning, which confused my thinking.
Thanks for your response

jordelver
Oban was actually on my list for consideration
I discovered it last week and haven’t had time to play with it yet but it looks really good 
sorentwo
I’m extremely biased, but I would use oban. It has periodic jobs, scheduled jobs, retries, resiliency, etc. Broadway is tailored for ingesting high throughout event streams.