pillaiindu

pillaiindu

Let's discuss actix in general, and if we can bring it to Elixir as a NIF?

Actix is a rust actor system and web framework. Let’s discuss it in general (if someone in the community have used it and have more knowledge about it), and also if it can be brought to Elixir as a NIF to replace or assist the BEAM’s actor model to boost performance.

Most Liked

al2o3cr

al2o3cr

I suspect it wouldn’t be easy to integrate - Actix uses the Tokio reactor, which is (roughly) equivalent to the BEAM scheduler. Both generally assume they are “THE event loop”.

You’d also have to keep in mind the issues with long-running NIFs, described here

A fairly advanced option would be to build a custom tokio::reactor::Reactor implementation that uses the BEAM scheduler to dispatch Rust futures.

OR

Another option: use the C Node bindings to make an “Actix node” where Rust actors live and communicate with other BEAM nodes.

lud

lud

The BEAM does not implement an actor model, and is highly optimized for concurrency. I doubt you would gain significant performance while keeping all the current features of Erlang processes.

Also worth reading.

sribe

sribe

I’m working with Actix some now, and I honestly don’t see the usefulness of integrating it with Elixir. What would be the point of having a cooperative scheduler running inside the BEAM’s scheduler???

Now, coding performance-sensitive bits in Rust makes sense. Maybe even using async I/O & futures to help structure potentially long-running calls.

Where Next?

Popular in Discussions Top

Qqwy
I would like to spark a discussion about the static access operator: .. For whom does not know: it is used in Elixir to access fields of...
New
pillaiindu
In django there is a cache framework backed by memcached. Rails also puts a lot of emphasis on caching, and even the idea of russian-doll...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
pdgonzalez872
If this has been asked here before, please point me to where it was asked as I didn’t find it when I searched the forum. Maybe a mailing ...
New
chulkilee
Here are the list of HTTP client libraries/wrappers, and some thoughts on HTTP client in general. I’d like to hear from others how they w...
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14027 124
New
Ankhers
Just a little information upfront. Generally speaking, if I feel like I need to either break a pipe chain or use an anonymous function in...
New
100phlecs
Are there any downsides, like perf issues, to putting all functional components in CoreComponents as long as you prefix it with the conte...
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
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
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
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

Latest on Elixir Forum

We're in Beta

About us Mission Statement