TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Lunatic – Actor System for Rust/WebAssembly

141 pointsby bkolobaraover 4 years ago

11 comments

the_dukeover 4 years ago
Erlang&#x2F;OTP inspired actor systems that run Webassembly code are a brilliant (and potentially way superior) alternative to microservice madness.<p>Until now adopting Erlang or Akka meant restricting yourself to a single language ecosystem, but Webassembly maturing and more and more languages gaining support means that you can still use a heterogeneous ecosystem while benefiting from easy sandboxing and isolation, almost instant startup, actor snapshotting&#x2F;migrations, a unified way of inter-service communication ...<p>All while avoiding the complexities of grpc, building Docker images, Kubernetes, service meshes, &quot;serverless&quot; frameworks, ...<p>WASM running in the browser pushes languages to adopt it. Even Microsoft is really investing into dotnet support via Blazor [5].<p>Also check out wascc [1] [2], which is similar, also written in Rust, quite a bit further along , has some very cool concepts around security and code signing, and supports multi-node systems. (not affiliated)<p>There is also a spec for distributing WASM via OCI (aka Docker) images, which is useful here. [3]<p>Some Webassembly proposals like interface types [4] will really help out in this context as well. Sadly wasm has not quite been evolving at the pace I would have hoped for since 1.0. Progress is there, but from the perspective of an enthusiastic early adopter it can seem glacially slow.<p>[1] <a href="https:&#x2F;&#x2F;wascc.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wascc.dev&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=vqBtoPJoQOE" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=vqBtoPJoQOE</a><p>[3] <a href="https:&#x2F;&#x2F;github.com&#x2F;solo-io&#x2F;wasm-image-spec" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;solo-io&#x2F;wasm-image-spec</a><p>[4] <a href="https:&#x2F;&#x2F;hacks.mozilla.org&#x2F;2019&#x2F;08&#x2F;webassembly-interface-types&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hacks.mozilla.org&#x2F;2019&#x2F;08&#x2F;webassembly-interface-type...</a><p>[5] <a href="https:&#x2F;&#x2F;dotnet.microsoft.com&#x2F;apps&#x2F;aspnet&#x2F;web-apps&#x2F;blazor" rel="nofollow">https:&#x2F;&#x2F;dotnet.microsoft.com&#x2F;apps&#x2F;aspnet&#x2F;web-apps&#x2F;blazor</a>
评论 #25161640 未加载
评论 #25163788 未加载
评论 #25161067 未加载
评论 #25162479 未加载
评论 #25164127 未加载
bkolobaraover 4 years ago
Hi! Author here. I wrote more about the motivation behind Lunatic if you are interested, check it out: <a href="https:&#x2F;&#x2F;kolobara.com&#x2F;lunatic&#x2F;index.html#motivation" rel="nofollow">https:&#x2F;&#x2F;kolobara.com&#x2F;lunatic&#x2F;index.html#motivation</a>
评论 #25161754 未加载
评论 #25169040 未加载
评论 #25162978 未加载
评论 #25163523 未加载
nahuel0xover 4 years ago
This is the way forward. A wasm-instance-per-actor architecture enables:<p>- Actor prioritization<p>- Actor pausing<p>- Killing actors at arbitrary points<p>- Actor serialization &#x2F; migration<p>- per Actor GC (internal to them)<p>- Multiple languages<p>- Inter-actor&#x2F;host protected shared memory in addition to message passing<p>Has the potential to be better than Erlang and much, much better than Go.
评论 #25162317 未加载
whalesaladover 4 years ago
I have neen trying to think of a way to leverage Cloudflare&#x27;s workers&#x2F;durable objects as a poor man&#x27;s Erlang cluster... I think this might be it!
Snitch-Thursdayover 4 years ago
I&#x27;ve been pushing away potential suitors to learn Actor-based systems, contenting myself with researching patterns to use with F# MailboxProcessor while I wait for Gleam (the proglang that is basically statically typed Erlang) to mature enough for this newbie to be able to jump in.<p>But the concept of rust-based Actor frameworks (that compile to WASM!?) is very, very tempting.
评论 #25161535 未加载
ignoramousover 4 years ago
See also, Bastion: Highly-available distributed fault-tolerant runtime in Rust <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22403713" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22403713</a>
cercatrovaover 4 years ago
Any comparison with actix(-web)? I know the latest version of actix-web doesn&#x27;t use the actor model, but actix itself still does.
bird_monsterover 4 years ago
It seems I&#x27;ve been in my &quot;ignore all new tech stuff&quot; hole for too long when I open a project link and don&#x27;t understand most of the value&#x2F;code. It seems very interesting though, I am not knocking the project at all.<p>So, I write code that compiles to WASM, and then pass that code as a process to Lunatic? Is this pattern intended to be a generation beyond microservices&#x2F;containers, where rather than writing a &quot;service&quot; that gets put into a container and then managed by a container orchestrator, you&#x27;re creating processes that get managed by a process manager? To get rid of the container overhead? If that&#x27;s true, isn&#x27;t it just all turtles because Lunatic will have to run out of containers (and presumably those will have to be managed&#x2F;orchestrated)?
评论 #25164728 未加载
评论 #25169084 未加载
staticassertionover 4 years ago
Pretty slick, reminds me of Erlang in that Actors are just functions. I&#x27;ve always thought this made stateful actors a bit weird since they have to recurse. I like the wasm approach though.
dmarlowover 4 years ago
I would love nothing more than for dotnet to adopt something like Erlang&#x27;s actor system as well AOT compilation to native. I don&#x27;t think I&#x27;d ever leave my house again.
评论 #25167162 未加载
评论 #25162217 未加载
nsonhaover 4 years ago
how does this compare to other &quot;green thread&quot; approaches? Like go channel?