Iex.new

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

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

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

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 :slight_smile:

You can build script with Elixir.

cmkarlsson

cmkarlsson

I knew the ssh server was there but I had never tried it. It was surprisingly easy to setup and gets you straight into the node. I wonder if I should just add that in as a standard for my releases from now on.

Iex.new

Iex.new

Thank you for your answer,

60K was the number of job exeuctions / days ) it could be the same or a diffrent).
Execution could be an import/export or an update (Flows)
A Cli-App is helpfull to check on the output during development process the result of the exeuction.
It give also the flexibility to set some parameter and see (into a scheduler sofware) quickly how the application was started.

How Elixir Applications are started ? Are they started once and run “forever” ?
Does your application look into a specific directory that a file has to be proceed ?

I often deploy a new “version” of the cli-application, that may have correction,improvment ot extension of a buisness logic

I think an usage of Elixir as a background job processor is the way that is close to what I use now.

Where Next?

Popular in Chat/Questions Top

KSingh1980
How to run the random query and get the result in JSON format and send it as a response. The query will be in the following form DB Name...
New
ericdouglas
I think that would be really interesting to have official books created by the community about all kinds of development we can do with El...
New
jace
I wanted to write a library for interacting with a Web API as a practical way of learning Elixir. However, there seem to be a lot of diff...
New
xgilarb
Hi there, I’m interested in using Elixir because of the rumors about the reliability of the Phoenix framework, and surprisingly, Elixir’...
New
Emily
Preface: I’m not sure if thise is the right place, because this is not direclty Elixir related… but I’ve always got some of the best advi...
New
zeroexcuses
Besides Basic types - The Elixir programming language are there any other well recommended “elixir by example” style resources / books ? ...
New
Fl4m3Ph03n1x
GenStage and Flow resources? I have been hearing about GenStage and Flow, a tool built upon it, for quite some time. I understand it allo...
New
lgmfred
Hello, I want to get started with elixir today. Having learnt the basics of Erlang (my first ever language) and seen what it’s can do, I’...
New
SavagePixie
I was wondering if there are any beginner-friendly, exercise-based resources for learning Elixir out there. I’m looking for something lik...
New
shansiddiqui94
Greetings Elixir Developers, My name is Daniel, and I am taking my first step to learn all about the Elixir language. Currently I have a...
New

Other popular topics Top

belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New

We're in Beta

About us Mission Statement