wanton7

wanton7

Lunatic: Actor based WebAssembly runtime for the backend

Found interesting actor-model project.

https://github.com/lunatic-lang/lunatic

Most Liked

bkolobara

bkolobara

Hi! I’m the author of Lunatic and a huge Elixir fan :heart:.

I started working on Lunatic when I moved to Rust and missed the features from the BEAM world. Especially being able to just spawn a lightweight process that is self isolated. It’s impossible to do this in Rust using just libraries because all the code shares the same memory space.

I came up with the idea to use WebAssembly instances as process replacements. Contrary to Lumen, LAM and other implementations, Lunatic doesn’t run inside one WebAssembly instance, but runs thousands of instances as lightweight processes.

This gives Lunatic also a bit more powerful per process isolation than you get on the BEAM. E.g:

  1. You can spawn a process that can only use a limited amount of memory or CPU.
  2. You can use C bindings without fear. Once everything is compiled to WebAssembly, long running code will still be preempted and crashes don’t escape the process boundary.
  3. You can limit syscalls on a per process level, e.g. spawn this process but don’t let any code running in it open a network connection.
  4. Redirect syscallls, e.g. if this process writes to a log file redirect the stream over the network to an Elastic cluster.
  5. You can use it from you favourite language if it compiles to WebAssembly. Currently we only provide libraries for Rust and AssemblyScript.

The project is still in its early stage and not all features are implemented yet, but we got initial funding from YC and are working full time on it.

16
Post #2
bkolobara

bkolobara

At the moment we don’t provide any APIs for GUIs (or wrappers) and solely focus on backend applications, but it could be an addition in the future.

The runtime works on Windows, MacOs and Linux (x64 & arm64).

michaelvigor

michaelvigor

This has an updated website now: https://lunatic.solutions/

Similar to Lumen, but instead of Erlang compiling to WebAssembly, this is just inspired by Erlang, and written in Rust.

Last Post!

Rich_Morin

Rich_Morin

This seems like an interesting notion. They write code in Rust, compile it into WebAssembly, and then call on some infrastructure that emulates the Erlang/OTP environment.

Functional Futures: Lunatic with Bernard Kolobara

-r

Where Next?

Popular in Discussions Top

CharlesO
Erlang :list.nth simple, but 1 - based nth(1, [H|_]) -> H; nth(N, [_|T]) when N > 1 -> nth(N - 1, T). Elixir Enum.at … coo...
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19814 150
New
rower687
Hi all, I’ve been reading a lot about the “let it crash” term and how supervising processes and the whole messaging passing make an elixi...
New
thojanssens1
It would be nice to be able to define a redirect from one route to another from the router.ex file. E.g.: redirect "/", UserController, ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement