LegitStack
Can an actor framework for Python be implemented by using Elixir erlport?
I have this weird idea. I want to use elixir as a messaging service between python functions across a network.
Luckily, I found this post which explains how to use erlport to call python functions from elixir.
One use case for this sort of thing is as a worker-scheduler type system. But more generally it seems like a cool way to implement an actor system for python - just use an actor language.
My question to you guys is: what’s wrong with this idea? Is it doable? is it doable but difficult?
Keep in mind I’ve never really used erlang or elixir, but I love ideas behind the language. So what might I be missing?
Just so we’re on the same page let me give you a concrete example of how a framework like this could be used:
Say you have a network with 5 computers. 4 powerful machines we’ll call the ‘cluster’ and 1 laptop, we’ll call the ‘scheduler.’
You could start up a genserver (or something, I barely know what that is) so that there are workers on the clusters waiting to pull tasks from some elixir process on the scheduler. The idea is that the users (who only knows python, because lets say they are datascientists) would send a list of python functions to the scheduler using erlpoint, then the workers would pull those functions and execute the python call using erlport until all the tasks were depleted.
Of course, this is not the only use case, but its a simple, functional one.
What do you think?
Most Liked
peerreynders
I think the fundamental question is: what real world problem is being solved by your idea?
Python evolved to solve certain problems in a certain manner in a given environment.
The BEAM with it’s process based nature approaches real world problems in a very different way - a way which is fundamentally at odds with the way libraries implemented in Python (and the lower level C code) operate.
Another Python integration technology which hasn’t been mentioned yet: Pyrlang
kpanic
Not sure what you want to do but GitHub - celery/kombu: Messaging library for Python. · GitHub powers celery, you might want to have a look into it to build your own “custom” workers
Since you are curious about erlang/elixir, you might want to try also GitHub - Pyrlang/Pyrlang: Erlang node implemented in Python 3.5+ (Asyncio-based) · GitHub
NOTE that Ask Solem, the author of celery inspired herself from erlang to create celery/kombu.
That’s one of the reasons that pushed me to try/learn erlang/elixir
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








