[NCLUG] Some developments in Rust.

Bob Proulx bob at proulx.com
Wed Jun 3 20:11:45 MDT 2020


Brian Sturgill wrote:
> Containers and WASM programs are actually very similar. Containers use
> hardware and WASM uses software to provide isolation and an abstract
> interface to an OS and hardware. WASM translates to native code, but is
> carefully checked to avoid things like buffer overruns, etc. WASM has an
> extra layer to get to allowed access to OS and Hardware. It is therefore
> slower for some types of programs.

It's the new JVM!

> But consider the case of small services, or micro services. Even 10
> containers uses quite a chunk of a system. You could easily run 1000 under
> WASM.

So...  I always thought of WebAssembly as something that runs in a web
browser.  And a web browser as something that runs interactively on a
desktop.  Which means that it isn't the same as a containerized micro
service.  I think of containerized micro services as something that
runs on the server side of things.  They start automatically at boot
or upon demand.  Other clients use them.

But web assembly is something running in a web browser.  Which means
the user must start up the web browser.  Then must have the web
browser load a URL.  And that URL might run some web assembly.  That's
not really a micro service model.

Although if I am reading about COVID19 and someone has an interesting
graphical model of the spread of disease.  It might be somewhat
compute intensive.  Therefore distributing that to my web client as
Javascript makes a lot of sense.  I am seeing the moving graphic.  It
makes sense that it is my cpu being used to render the graphic.  Right
now they are mostly Javascript.  But they could more efficiently be
WebAssembly.  I click on the mouse and the page runs the downloaded
code on my cpu in a sandbox.  As long as it can't escape the sandbox
then it is safe.  It's using my cpu so it can be fairly intensive but
scales to a lot of users.  This all makes sense to me.

> Admin load is much smaller too... networking with several containers over
> multiple physical interfaces gets complicated fast. Such problems just
> don't exist under WASM.

I am probably terribly misunderstanding it but I think that is because
different web browsers are sandboxed off intentionally so that they
can't talk to each other.  So of course not being able to do it is one
way of keeping things simpler.

> WASM also let's you more easily control what sorts of things the services
> have access to.
> 
> One will likely see a lot of edge computing solutions using WASM. The
> approach is more amenable to embedded processors.
> 
> No doubt both are needed, but WASM is welcome relief to someone that just
> needs to run isolated services. In time it should be simple enough for
> normal users to do it.

I think I am not understanding something fundamental here.  I would
enjoy it if you gave a talk or a summary or an exposé article on it.
Because I think I am missing out.

Bob


More information about the NCLUG mailing list