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.

Isolates, microVMs, and WebAssembly

123 pointsby charliermarshover 2 years ago

14 comments

tptacekover 2 years ago
I&#x27;m a little fuzzy on the multitenant security promise of WebAssembly. I haven&#x27;t dug deeply into it. It seems though that it can be asymptotically as secure as the host system wrapper you build around it: that is, the bugs won&#x27;t be in the WebAssembly but in the bridge between WebAssembly and the host OS. This is approximately the same situation as with v8 isolates, except that we have reasons to believe that WASM has a more trustworthy and coherent design than v8 isolates, so we&#x27;re not worried about things like memory corruption breaking boundaries between cotenant WASM programs running in the same process.<p>At the end of the day, if your runtime relies on a whole shared OS kernel, you have to be concerned about the bugs <i>in the kernel</i>. That&#x27;s true of VMs as well, but to a much more limited extent: KVM is (by definition) much smaller than the whole kernel, and KVM bugs are rare.<p>I&#x27;m writing this mostly as a provocation; I don&#x27;t have a clear enough understanding of backend WASM multitenant security to have strongly-held opinions about it.
评论 #32990967 未加载
评论 #32991286 未加载
评论 #32992336 未加载
评论 #32990766 未加载
hardwaregeekover 2 years ago
So far in my experience WebAssembly has been great for when I want to import a *little* bit of native code into my browser. I&#x27;ve yet to see it work well as a full on container based solution. I could certainly see a future where that is true, but it&#x27;d need the following:<p>- A way way better tooling story. Emscripten is an incredibly fiddly tool that requires a lot of flags and config. wasm-pack is decent for Rust but seems to be focused on the browser.<p>- Better interoperability. WASM works great if you write everything in Rust, or everything in C or everything in Zig. Not so much with multiple languages.<p>- Memory64 and WASI need to land. We need more than 4 gigs and we need proper syscalls.<p>- Near native needs to be, well, near native. I find it weird that people keep on saying WebAssembly is fast while in the same text decrying &quot;a low-double-digits percentage hit&quot; in performance. I&#x27;m fairly certain WebAssembly&#x27;s &quot;near native&quot; is using near to mean &quot;same order of magnitude&quot;, not &quot;within 10%&quot;.<p>I&#x27;m also just confused as to what WebAssembly will look like for something that&#x27;s more than a lambda conceptually. Like if we&#x27;re running a classic back-end server with a database, are we going to run the database in wasm? Are we running it in a different wasm process? How do you share memory? Is wasm going to reinvent the operating system?<p>I like WebAssembly as an idea but I&#x27;m very unclear on how it&#x27;ll get to the &quot;replace Docker&quot; level.
评论 #32992040 未加载
评论 #33026091 未加载
评论 #32993199 未加载
muriculaover 2 years ago
The article says whether a language runtime like v8 is a stronger security boundary than a hypervisor is a matter of debate, however v8 has boatloads of CVEs and the further isolation of browser sandboxes has been a driving factor in OS development for nearly two decades. Meanwhile, multiple Fortune 500 companies bet their multi-billion dollar cloud businesses on the security of their hypervisors.<p>So when the author links to a confused HN thread about whether the v8 runtime is a security boundary and says &quot;looks like there&#x27;s debate&quot;, it makes the article look like a joke.
评论 #32990237 未加载
评论 #32990036 未加载
评论 #32990575 未加载
pjmlpover 2 years ago
It is so tragically funny whatching everyone re-inventing mainframe language environments, JVM application servers and the CLR.<p>&gt; &gt; One of the exciting things in Visual Studio .NET is its language agnosticism. If a vendor has written a .NET-compliant language, you can use it in Visual Studio .NET. It&#x27;ll work just as well as C# or C++ or Visual Basic. This isn&#x27;t just a future feature-in-planning. There are already nearly two dozen languages being developed for Visual Studio .NET: Visual Basic, C#, C++, JScript, APL, Cobol, Eiffel, Fortran, Pascal, Perl, Python, RPG, Smalltalk, Oberon, Component Pascal, Haskell&#x2F;Mondrian, Scheme, Mercury, Alice, and even the Java language.<p>-- February 2002 issue of MSDN Magazine<p><a href="https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;archive&#x2F;msdn-magazine&#x2F;2002&#x2F;february&#x2F;editor-s-note-welcome-visual-studio-net" rel="nofollow">https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;archive&#x2F;msdn-magazine&#x2F;2002...</a><p>It is as if a newer generation never bothered to learn about what came before.
评论 #32994471 未加载
评论 #32992205 未加载
评论 #32993250 未加载
simonwover 2 years ago
This article says of Fly: &quot;but they don’t scale down to zero&quot;.<p>This isn&#x27;t entirely true. A little known aspect of Fly Machines is that you can stop them and they will be automatically restarted by the Fly router (with a very short cold-start pause) when the next request arrives. So you can scale them to zero if you do a bit of extra work.<p><a href="https:&#x2F;&#x2F;fly.io&#x2F;docs&#x2F;reference&#x2F;machines&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fly.io&#x2F;docs&#x2F;reference&#x2F;machines&#x2F;</a> hints at this:<p>&gt; Machines are also the spawning ground for new platform features like wake-on-request (also known as scale-to-zero). You can stop a running machine to save on compute costs. It then may be started automatically when a request arrives at the Fly proxy.
评论 #32991435 未加载
pclmulqdqover 2 years ago
I suspect that WebAssembly is actually the wrong abstraction here, and you might want something a little closer to BPF for non-process-isolated serverless compute, but also not BPF because BPF can do arbitrary memory reads. WebAssembly appears to be too permissive for this case, and BPF too restrictive to be useful.<p>Ideally, if you could have a language-level VM that guarantees that you only ever read or write data inside memory allocated to you and calls a limited set of syscalls (which you intercept&#x2F;rewrite at compile time), you probably don&#x27;t need any other protection.
评论 #32992369 未加载
评论 #32992359 未加载
评论 #32992564 未加载
rektideover 2 years ago
On Micro-VM&#x27;s specifically, shout out to Wyrcan[1], which is open source software similar-ish to Fly.io in taking a container image &amp; booting into it. There&#x27;s no platform here, but it&#x27;s an advanced &amp; secure bootloader for a container images that looks like the core critical capability furthest under the hood.<p>Back to isolates, I&#x27;d really love to see v8 isolates gain some more whatever it takes for people to be less critical about it&#x27;s multitenancy. I havent really understood what the criticism is but it&#x27;s fairly active. Since the process has to do it&#x27;s owm scheduling of work, just having something like cgroups &amp; resource priority seems like a fairly obvious absense: make sure everyone gets a turn. This scheduling seems semi obvious. But I think the security-minded folk are paniced over a lot more, and likely with legitacy, but the name isolates is afaik somewhat reasonably truthful, that data is fairly secure across isolates in the same process.<p>Throwing in a bonus ask, it&#x27;d be sweet if isolates could migrated. Perhaps snapshotting can already maybe do this? Being able to load manage is important! Even if v8 doesnt want to have vast multi-tenant scheduling capabilities my trivial dumb feel is that just moving aggro processes elsewhere would be a great start to handle aggressive tenant sub-proceeses.<p>I wish I had links on hand, but one of the things that most opened my horizons on wasm &amp; it&#x27;s role was considerations that browsers should be able to have multiple instances of a module. Like, if someone depends on a module, does everyone always get the one singleton instance? Can the browser start creating multiple instances if there&#x27;s a lot of consumers? Very clear browserside question that really opened the floodgates that, oh, there&#x27;s a lot of ways we could go forward with this!<p>[1] <a href="https:&#x2F;&#x2F;gitlab.com&#x2F;wyrcan&#x2F;wyrcan" rel="nofollow">https:&#x2F;&#x2F;gitlab.com&#x2F;wyrcan&#x2F;wyrcan</a>
torginusover 2 years ago
What is it with these companies who have untold resources, and scores of the smartest engineers, yet what they do is repurpose some existing tech that kinda works instead of building stuff properly? Like selling:<p>- The browser scripting engine as a PaaS engine<p>- The VM language&#x2F;runtime meant for running binaries in the browser as a PaaS engine<p>- The tooling meant to isolate Linux processes as a VM platform<p>Can&#x27;t they build tech properly, for their own purposes?<p>Not to mention, the whole exercise seems like monkey-patching over the failures of modern OS design. A proper operating system should be able to run <i>processes</i> with zero trust and resource sandboxing.
评论 #32995639 未加载
hardwaresoftonover 2 years ago
Towards the end of the article it sounds like the author was looking for this: <a href="https:&#x2F;&#x2F;github.com&#x2F;deislabs&#x2F;wagi" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;deislabs&#x2F;wagi</a>
评论 #32991319 未加载
syrusakbaryover 2 years ago
&gt; Most other companies (like Wasmer) seem to be focused on runtimes<p>Stay tuned. Exciting things coming on the Wasmer horizon :)
hestefiskover 2 years ago
The JS &#x2F; wasm ecosystem is slowly becoming Java &#x2F; JVM. Wasm has a virtual machine that can run wasm code, which different languages can target with a specialised compiler. It also abstracts away things like memory, storage and networking, just like EJB did.
ex3ndrover 2 years ago
We can have a better js vm like quickjs or Hermes (from react native).
combyn8torover 2 years ago
Does anyone know what Firebase uses for their functions service?
评论 #32993331 未加载
pyrolisticalover 2 years ago
The future is here, people just haven’t noticed yet