Zesky665

Zesky665

Is this a good use case for elixir?

Hi,

I need to run an js script 500 times at once and collect the outputs from each execution. Is this something that can easily be done with elixir, at least in comparison to other languages?

I’m also interested (if the above is true) if It is possible to have a separate process track the execution of each of the scripts and update the results on a drab page like in the async tasks example?

Just in case it is important the script that I plan to run is a automated e2e test using selenium.

Thanks in advance

Marked As Solved

grych

grych

Creator of Drab

I have never measured it, but I believe RAM would be a bottleneck for 500 chromes. You may want to run it on the multiple machines, and yes - this is a case for Elixir.

Also, be prepared to have a small number of random bugs occasionally. I am using chromedriver with hound in Drab’s tests, and from time to time it just fails with the different browser errors. Re-running the same test fixes the issue.

Also Liked

mgwidmann

mgwidmann

Use Task.async_stream/3 and toy with the limit until you get a maximum that fits the hardware you’re on. Once you get that functioning your test will run (which is valuable in itself). Then if that number is unacceptable and runtime is too long, get a bigger box and see what it will give you. Selenium is slow and uses a lot of CPU as well. So its best to get something working as is first before springing to another box so you’ll have something to compare against when you do decide to increase the hardware (not to mention being able to justify or not justify the cost of doing so).

mgwidmann

mgwidmann

Also, consider starting with number of cores. Don’t try 100 or something crazy like that at first because it will never complete. Start with something with few resource constraints and inefficient and move up to efficient and max resources because once you go past that its just likely to waste your time.

grych

grych

Creator of Drab

Will you run this 500 js in the same browser? I assume you want to use the browser, as you’re refering to Drab.

Yes, exactly like in the async example - run the separate task for each process and collect results as it finishes.

Where Next?

Popular in Questions Top

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
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call t...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43657 311
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36432 110
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127536 1222
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement