Supervisor/Processes and API Clients

returns to the pool anyway

Because poolboy works with a limited number of workers, when they finish their job, they “return to the pool”. It helps working with a limited set of resources, like db access, api call etc. Think of it as a funnel.

aggregate multiple API calls with the same args as a single pool

What is hard In Erlang/Elixir is to think concurrently. For each task that could run indenpendantly You should try to run them in parallel, with a collector in charge of aggregating the results. So one worker of the pool can spawn multiple processes, usually Task

I have got an exemple in this post using poolboy for scraping

1 Like