Rich_Morin

Rich_Morin

Submillisecond LiveView” is written in Rust. I wonder where its approach and behavior differ from that of Elixir-based LiveView (eg, in state maintenance). Anyone have a clue to offer?

-r

First 3 of 3 Posts Switch mode

Eiji

Eiji

Well … without checking this project I would say we have a better community. :smiling_imp:

Ok, now more seriously … Regardless of LiveView implementation there’s still a key differences between languages that simply can’t be skipped … Also the initial commit was pushed 2 months ago, it does not links to any documentation, does not have any releases as well as tags and it still have lots of features missing like components (see created issue).

I think it’s way too early to start a real analyze/comparison of this project.

rjk

rjk

Yes it’s super early days for this project but nice to see other languages and frameworks be inspired by the Phoenix Liveview ideas! AFAICS this project aims to write rust that runs both in the browser (using WASM) and server but is not just ordinary Rust but using a specific runtime behind it.

I’m following that runtime project behind it for a while now. This framework is not ‘just’ written in Rust but in some “dialect” if you would call it that. The idea is to write it in rust and use WASM as target and then run it inside a specially crafted runtime that behaves in a way like the BEAM VM (also being inspired by it). Every instruction that a process is running on it will have a cost, and it will pre-emptively run all processes evenly just like the BEAM VM and also with massive concurrency as goal. (for a better explanation see: https://lunatic.solutions/ )

The dialect part is explained in a blog post here: Rust without the async (hard) part | Lunatic
It’s “removing” the async/await keywords and handling this inside of the (WASM) runtime.

bkolobara

bkolobara

I’m one of the authors of submillisecond.

Like @rjk already mentioned, I think the biggest difference is not Rust, but the fact that we target the lunatic vm. The Rust code gets compiled to WebAssembly modules. The modules are then turned into WebAssembly instances and those instances are similar to Erlang processes, we even call them processes. They are lightweight, fast to spawn and completely separate (get their own heap and stack). So you are able to build systems in Rust (or any language that compiles to Wasm) that have similar characteristics to Erlang systems.

The WebAssembly aspect of it also opens a bunch of other possibilities. Things that would be impossible to do in Elixir. For example, WebAssembly can run in the browser. So we are working on moving some parts of the view into the browser. You still write all of the logic in Rust, but rarely need to actually send data to the backend because the code just runs in the browser. We are also thinking of just moving the whole backend into the browser for offline-first apps (SQLite can already run in the browser).

It’s still super early days and we need to solve many difficult technical problems (syncing state between offline apps and backend, splitting code into different .wasm compilation units, …), but we see a lot of potential here and will keep iterating on it. :crossed_fingers:

15
Post #3
— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
AstonJ
Just a general thread to post chat/news/info relating to AI/ML stuff that may be relevant for Nx now or in the future. Got anything to sh...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
mudasobwa
While I am working on the Language Agnostic Code Audit SaaS, which uses MetaAST (spoiler: I am expecting it to be in a good shape for ann...
New

We're in Beta

About us Mission Statement