Elixir for process intensive tasks

I am a newbie to Elixir, FP and trying to evaluate Elixir/Phoenix backend for a Machine Learning based application. My original idea was to use Elixir<->Rust<->Tensorflow on the backend server.

On doing some initial search, I found references claiming that Elixir is not suitable for process intensive tasks.

So my question would be, what/why is the limitation present? Where to draw the line for elixir in terms of which task is process intensive?

Thanks

Afaik one of the downsides in computationally expensive tasks is because of immutable data. For certain problems there simply are more performant algorithms around for mutable data then you have for immutable data. Sometimes you can mimic those by using ets, which is an in memory database within the beam (so mutable), but I’m not sure what the determining factors are for when this works or not.

6 Likes

CPU intensive tasks in Elixir will have the problems @LostKobrakai mentioned, however if you will use NIF or any other interoperability approach offered by BEAM then this will not be much of the problem (your example with Elixir <-> Rust is great example of that). So if you want that approach then go for it, just shift CPU-intensive work to the Rust (or any other language) and keep Elixir as a frontend for IO-intensive work.

2 Likes