Integrating Baidu Downloader into Erlang Project

Hi everyone,

I’m working on a project where I need to pull files from Baidu Cloud and manage the downloads through an Erlang system. The main idea is to take advantage of Erlang’s concurrency and supervision features to keep things reliable when dealing with large or multiple downloads.

I’ve checked out some downloader tools written in Python and Go like https://baidu.erranium.com/ , but I’m still not sure what the cleanest way to integrate them into an Erlang setup would be.

A few approaches I’m considering are:

  • Using a port or NIF to call into a downloader library directly.

  • Running the downloader as a separate service and talking to it through Erlang ports or gen_tcp.

  • Wrapping an existing CLI downloader and using Erlang to capture/stream its output.

Has anyone here tried something similar? Even if not with Baidu specifically, I’d be interested in hearing what worked well for integrating external downloaders into Erlang/OTP projects.

Thanks in advance!