A Rusty Web Assembly Architecture

A Rusty Web Assembly Architecture

When I learned Java and Web Applets I could not understand why Applets failed as a technology, and I resented the fact we lost such a useful technology. Eventually I was able to unlearn my emotional attachment to Java Applets through learning Rust and the following video.

While writing Java Applets was very kewl, and a very effective way of sharing stunning GUI code in Web Browsers, it was not the best programming model for Web Applications.

While I can write full-stack code in Javascript and Node.js, and I appreciate this model of staying in a one language paradigm, Node.js is not an ideal model either.

While learning Rust, it felt very retro, very much a blast from the past. Indeed, Rust preserves some really great ideas from the past, but leaves behind some really bad ideas like The Billion Dollar Mistake, exception handling, and to some extent, garbage collection.

Architecture

Over the last few months I have come to realize the best Architecture of Web Applications currently looks something like:

Rust -> Web Assembly

  • Back End -> Rust (such as Actix or Poem)
  • Front End -> Rust (such as Yew)
  • Common -> Rust
  • Running under Docker/Kubernetes Web Assembly containers.

Where the Back End and Front End can easily share common code, and Web Assembly runs just fine in Docker, Kubernetes, and Web Browsers.

Over the years, I have come to believe that Software Architecture is the art of changing the most expensive things the least frequently, most economically, most effectively. Great architects have a sense of the future based on a knowledge of and a respect for the past. Know when to innovate, when to dominate, and when to appreciate.

Admittedly, this architecture is still a little 'bleeding edge' but day by day it is becoming less so. Will it last forever, probably not, but in terms of investment, it looks like one of the best business investments in Web Applications that can be made today.

Developer Experience

This will not result in the best developer onboarding experience, but will probably result in the best developer long term experience.

  • Slower Builds: currently slow, but much better programming power and diagnostics. Rust makes it harder to shoot yourself, and others, in the foot.
  • Power: the macro capability makes for some very powerful programming experiences. While it can be hard to write macros, the benefit is using macros from other packages, aka, cargo crates, designed an implemented by experts.
  • Great Impedance match with Web Assembly: while not designed for Web Assembly, of all the main programming languages, it is currently positioned to make the best use of Web Assembly.

User Experience

This will most likely lead to the best user experience and keep improving this experience in terms of:

  • Low Latency: fast, responsive, low overhead, rich Web Applications
  • More Robust: Rust is designed for robust, reliable, secure, resilient applications with superior diagnostics.
  • Shoulders of Giants: while Java Applets were a 'Giant' success in many ways, Web Assembly remediates many of the problems of a Java Runtime, and Rust leverages Web Assembly better than Java. User's will benefit from many new innovations as this architecture becomes more standard.

Investor Experience

If you are investing in technology, or in technology companies, then this architecture is highly recommended as having a potentially higher ROI and a lower TCO.

Further Travels

Here are some more videos that I found on my relearning process.


要查看或添加评论,请登录

Eric Kolotyluk的更多文章

  • Iterators Make Sense in Rust

    Iterators Make Sense in Rust

    Interface Iterator has been in the Java standard library since version 1.2, December 8, 1998.

  • Going Further With Rust

    Going Further With Rust

    After writing Getting Started With Rust, the adventure got more interesting, and the resulting code was simplified to…

  • Getting Started with Rust

    Getting Started with Rust

    After watching a lot of Rusty videos, and doing Hello World in Rust, I finally started a real project: Comparing Files.…

    4 条评论
  • Weird Rust

    Weird Rust

    The only Rust program I have written is "Hello World!" I have been watching many YouTube videos, but this resonated…

  • AI Idiocracy

    AI Idiocracy

    In the movie "Idiocracy" the hero wakes up in the future where everyone is stupid..

  • Dance Monkey Dance

    Dance Monkey Dance

    I had a job interview today that generally went quite well until the interviewer invoked the "Dance Monkey Dance"…

  • Arc Browser First Impressions

    Arc Browser First Impressions

    While watching I was impressed enough to try out this browser I had never heard of before. As a loyal Firefox user, it…

    1 条评论
  • Why RISC Five?

    Why RISC Five?

    The Genius of RISC-V Microprocessors is a highly technical presentation of RISC-V processors, so I am breaking it down…

  • Ten Years of MacBook Pro

    Ten Years of MacBook Pro

    I recently received my new M3 Max MacBook Pro to replace my 2013 Intel MacBook Pro. I will spare you the usual…

    2 条评论
  • Teamwork in the Modern Age

    Teamwork in the Modern Age

    I have been doing couple's dancing since 1997; to say the least, it’s teamwork. Sure, there are generally only two…

    2 条评论

社区洞察

其他会员也浏览了