Iex.new
From PHP to Elixir?
Hello!,
I just started this week to discover Elixir.
I’m a PHP-Programmer and did some sutff in Go too.
The more I read about Elixir the more I’m intressting and exited about the possibilites that offert this language and it’s libraries (Phoenix, Oban, Ecto … ).
I use a Cli-App in php to import data and for each rows I do some operations on it.
A Job-Scheduler is also used to start this app regularly.
I’m thinking about to write the app in Elixir. Does Elexir feet well for my use case or this use case is more a for Go?
I have 60.000 / Job executions per days which are started by a Scheduler.
Thank you!
Most Liked
dimitarvp
60k per day is nothing. I import 1 million records in about ~18 seconds with my Elixir tools. Although I don’t know how much a single task would take in your case.
Elixir per se is not the ideal candidate for CLI tools because the VM starts up slower compared to dedicated statically compiled languages like Go and Rust. But it still works quite fast.
What’s your expected usage of Elixir? A background jobs processor?
entone
FYI, Elixir/Erlang provides a remote shell with some extremely powerful inspection tools across your whole application. So you may be able to get rid of your CLI tools, and just use the built-in remote shell.
Specifically Fred’s tool https://github.com/ferd/recon is pretty great.
And his book Erlang in Anger is worth a read as well.
kokolegorille
You have a console with Elixir, when You run in a project
$ iex -S mix
You have direct access to your application, and You can debug, recompile in it… It would be like Linux for application, You don’t need to reboot, You just recompile.
Elixir is a language that simplify concurrency, it’s built in.
Nothing stop You to start 60 000 processes, each one responsible for a job.
60_000 is not a high number for processes, but You need to master how to manage them.
OTP is done for this, it’s all about managing correctly processes. You did not mention it, You just mentionned libraries. But it’s included in the BEAM.
If You come from PHP, You will be surprised at the dev tooling offered by Elixir 
You can build script with Elixir.







