Reaching the Unix philosophy's logical extreme with WebAssembly
1–10 of 142 posts
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#2Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#3I laughed out loud during a work meeting when I read this. Bravo, Xe!
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#4WASI is great but there was an opportunity to standardize on something much more powerful.
Anyway I think the logical extreme of Unix philosophy started with Unix, moved on to Plan 9, and continued to improve from there. It's just that those further advancements are less popular and well known.
An old-fashioned file is not the logical extreme of anything. Not that it isn't useful or interesting.
I stead we don't even have a good way to do any kind of networking.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#5Wasn't there some kind of components proposal that would let modules written in different languages running in web assembly interop with each other? WASI is great but there was an opportunity to standardize on something much more powerful. Anyway I think the logical extreme of Unix philosophy started with Unix, moved on to Plan 9, and continued to improve from there. It's just that those further advancements are less…
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#6Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#7Wasn't there some kind of components proposal that would let modules written in different languages running in web assembly interop with each other? WASI is great but there was an opportunity to standardize on something much more powerful. Anyway I think the logical extreme of Unix philosophy started with Unix, moved on to Plan 9, and continued to improve from there. It's just that those further advancements are less…
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#8Wasn't there some kind of components proposal that would let modules written in different languages running in web assembly interop with each other? WASI is great but there was an opportunity to standardize on something much more powerful. Anyway I think the logical extreme of Unix philosophy started with Unix, moved on to Plan 9, and continued to improve from there. It's just that those further advancements are less…
One can take this further. There was a forgotten system called ChiOs which started with "A bit is a file. An ordered collection of files is a file." and went downhill from there.
"Everything is a file" has its limits.
I rather liked QNX. QNX is a microkernel with microservices. Everything is an inter-process function call. Call, wait for response or timeout. Works both locally and remotely. Very fast locally. There's a POSIX library, but when you call "read", some glue code makes a call to the file system service.
As a base abstraction, remote procedure calls work better than files. Files implemented via RPC are simple. APIs via RPC work are very similar to local function calls. RPC via a file interface is complicated. You have to put a protocol on top of stream/file oriented sockets to get a message interface.
The point that the author seems to be making is that WASI offers a standard API. It's one that crosses a memory protection boundary, like an inter-process function call. This is a reasonable way to do things. For historical reasons, neither Unix nor Windows supports that approach well.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#9> It's magic, just without the spell slots. I laughed out loud during a work meeting when I read this. Bravo, Xe!
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#10Wasn't there some kind of components proposal that would let modules written in different languages running in web assembly interop with each other? WASI is great but there was an opportunity to standardize on something much more powerful. Anyway I think the logical extreme of Unix philosophy started with Unix, moved on to Plan 9, and continued to improve from there. It's just that those further advancements are less…
Wasi Preview 2, which we are aiming to launch by the end of the year, rebases Wasi on the Component Model proposal, which enables composition of Wasm programs, including those which are written in different languages, and which do not trust each other. Wasi is now specified in the Wit IDL, which has a strong type system for representing records, variants, lists, strings, and best of all, external resources, including sugar for constructors, methods, and destructors.
Instead of basing everything on the filesystem abstraction, the core Wasi primitives are the `input-stream`, `output-stream`, and `pollable` resource types, for readable and writable bytestreams, and a pseudo-future: you can `poll-oneoff` on a `list` and it will block until one is ready, and return a `list` indicating the set which are ready. `wasi:filesystem/types.{descriptor}` is the resource for files, but if you need to read, write, or append to a file, you can do so by calling a method on `descriptor` that returns a `input-stream` or `output-stream`.
Preview 2 is also adding networking: wasi-sockets for platforms which support sockets, and wasi-http for those which don't, like the Web.
We are closing in on shipping Wasi Preview 2 but its not quite fully baked yet - changes related to resources are slated to land in the net few weeks. The spec definitions are on github: https://github.com/WebAssembly/wasi-io/blob/main/wit/streams... https://github.com/WebAssembly/wasi-filesystem/blob/main/wit... . Stay tuned for much more approachable documentation, tutorials, and so on, once we are confident it is a stable target ready for users.