Rich_Morin

Rich_Morin

FYI - (Rust-based) "Submillisecond LiveView"

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

Most Liked

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 #4
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.

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.

Where Next?

Popular in Discussions Top

jeramyRR
This is an interesting article to read. Elixir’s performance, like usual, is excellent. However, it seems like the high CPU usage is co...
New
Qqwy
Looking at the stacks that existing large companies have used, WhatsApp internally uses Mnesia to store the messages, while Discord uses ...
New
axelson
Decided against including more info in the title, but the gist is that Plataformatec sponsored projects will continue with the assets bei...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New
crispinb
On reading dhh’s latest The One Person Framework it strikes me that Phoenix with LiveView is already pretty much this. However, never hav...
New
AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
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
AstonJ
If so I (and hopefully others!) might have some tips for you :slight_smile: But first, please say which area you’re finding most challen...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement