WebAssembly, the Future of the Internet

WebAssembly may be the next step in the coding evolution. Four of the major web browser developers have been working together behind closed doors for months.

One of the biggest problems that people considered when they thought about using a universal bytecode was that the major web browser developers would never play nice. However, the key players: Microsoft, Mozilla, Google, and Apple, have been collaborating for months.

JavaScript, since 1995, has been virtually the sole engine used in building websites. This is amazing when you consider it took Brendan Eich only ten days to create the first version while he was working for Netscape (I know you just got a flashback to dial up). Since then, JavaScript has evolved into the key way for two computers to communicate via the internet.

There are limitations to JavaScript; developers are constantly trying to increase its speed for instance. The engines of JavaScript must interpret the language written by humans to the 1’s and 0’s that computers can read. Having to read then interpret and transmit the new language is obviously not the fastest way to do things.

WebAssembly May be the Game Changer

To further complicate things, before this point, the big names were taking their own approach to JavaScript. Mozilla was working on asm.js. Google was working on their Native Client (NaCl) and Portable Native Client (PNaCl). And apple had JIT. None of which gained any significant traction.

But times are changing with the announcement of WebAssembly: as well as its presence on W3C and GitHub.

What WebAssembly attempts to do is put more of the work on the development side rather than the computer. In WebAssembly (wasm), it will contain text notation for development and debugging. It will also have its own compilers to pre-translate the information to the 1’s and 0’s (binary) that computers need to execute commands. This allows the code to be compressed more than JavaScript, making the executions to run faster. Twenty-three times faster.

This is also the key feature for its usefulness: the one thing everyone wanted when asking for a universal web bytecode. This intermediary language will allow programmers to begin with whatever language they like, not only JavaScript. Making way for a web app to be written in only one code and work across all web browsers..

Essentially, the software is catching up to the speed of the internet.

Not so Fast

It’s important to remember that these things take time and wasm is still in its first stages. It doesn’t even have a formal standards body. Arstechnica.com puts it best,

The people behind wasm have not forgotten that JavaScript is supported everywhere and wasm is currently not supported anywhere. Their plan is to fill the gap with a polyfill; a JavaScript script that will convert wasm to asm.js for those browsers that don’t have native wasm support. Either the browser will interpret the wasm directly, or it will load the polyfill and execute the resulting asm.js. Native handling should be faster, but the polyfill means that a developer can be sure that a wasm program will always work.

-Peter Bright

Also, as is inherent in collaboration between large corporations, it will take some time to provide for standardization.

Techcrunch.com and the wasm team made a note that in the future, “chances are that both JavaScript and WebAssembly will be used side-by-side and some parts of the application may use WebAssembly modules (animation, visualization, compression, etc.), while the user interface will still be mostly written in JavaScript, for example.”

Keep Your Eyes on the Prize

So, for the coming months and years, keep watching the development of the future of the internet. Wasm, because it has backing from the browser giants, is poised to become the future of internet development. For you programmers, this must be welcomed news.

Feature image courtesy of Scott Maxwell.

Sharing is caring!