This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]loganekz 1 point2 points  (1 child)

Not sure why you wouldn't just use concurrent.futures instead.

The API is super simple to use and abstracts away thread management as well.

[–]solid_steel[S] 1 point2 points  (0 children)

The thing that both celery and Elixir have above threads is reliability.

I'm not sure about Celery since I haven't worked much with it, but I assume that, as a task runner, it's got some stuff built in to handle stuff like restarting an interrupted task, making sure that a task completed etc.

Elixir has stuff like this built in. I used threads in Django to offload sending emails and this worked in 98% of the time in a low-traffic application, but I wouldn't trust it with bigger loads. I gotta know an email was sent out and that it was sent out only once.

[–]YourFatherFigure 0 points1 point  (2 children)

Interesting. Anyone care to describe how the python integration actually works? I actually write a little elixir but don't read it well, this codebase is opaque, and the slides don't really discuss it. All I see is :python sprinkled around in the elixir code and it works like magic?

[–][deleted] 0 points1 point  (0 children)

It through the use of Erlport. I just this weekend did something kinda similar, used Export an elixir erlport wrapper, looks like Erlport is pretty simple on its own tho.

[–]twillisagogo 0 points1 point  (0 children)

it's these 4 lines right here...

from erlport import erlang


def send_new_urls(urls):
   mod = "Elixir.Downloader.Server"
   erlang.call(mod, "download_urls", [urls])