Fractal Architecture

From atoms to stars, self-symmetry scales

Tyson Midboe
ITNEXT

--

fractal architecture “sightbite”

Let’s first establish another architecture at the core of a Fractal Architecture, and that is, Federated Architecture. What is a federated architecture? If you’re familiar with GraphQL Apollo federation, which is an API gateway designed to integrate the schemas of multiple, independent services, in a cohesive, yet decoupled way (and the tech that allowed Netflix to scale their microservices), a federated architecture federates objects and data directly, in a ubiquitous fabric that covers frontend, backend, mobile, edge, and embedded/IoT, supporting transparent integration and persistence of the aggregated components. Federation is baked into the architecture, not layered on top.

At the heart of federated architecture is Module Federation — and while both owe their existence to Webpack Module Federation and its creators, Zack Jackson and Tobias Koppers — we are talking here about the architecture pattern, not the Webpack implementation. This pattern has another key implementation, WebAssembly. WebAssembly (Wasm) is designed to be modular, and used as a runtime, not a compile-time, dependency. Runtime dependency or runtime binding is the secret sauce of module federation. Streaming small chunks of source code or intermediate bytecode at runtime, as and when needed, from potentially multiple network locations and repos— versus installing the entire codebase on local storage ahead of time and then loading it all into memory at startup — is the key difference that enables module federation to outperform traditional softwares from both an operational and development standpoint.

I’ve written extensively about the advantages of federated software in previous articles, but it boils down to the following two capabilities: self-deployment and non-interruptive, live update/install of separately developed components. This gives us:

  • deployment independence (without the need for a distributed architecture, as required by today’s microservices);
  • and universal deployment across any compute primitive, regardless of vendor, obviating the need for deployment automation.

Universal, unattended, zero-downtime deployment is one step on the road to fractal architecture, but it is incomplete without runtime ubiquity, which is provided by the comprehensive portability of WebAssembly. Not only does WebAssembly provide deployment and language independence, without the need for distribution, but, unlike the Java Virtual Machine, which had previously attempted “write once, run anywhere”, WebAssembly is small enough to have runtimes for virtually any platform, from microprocessor to microcontroller. So, together, Module Federation and WebAssembly let us deploy from any source to any target.

Together, Module Federation and WebAssembly let us deploy from any source to any target.

With the death of Moore’s Law, WebAssembly, as a universal compilation target for lower level languages, allows us to shift our attention from the bottom of the stack to the top, providing the answer to another key requirement of our architecture, performant software. With use cases like AIoT and AR, and the need to perform AI inference against streaming data in real time, poor performance means you can forget about everything else.

That said, without security, you can forget about performance. WebAssembly provides an answer here, too; one that affords better protection from untrusted code than today’s container technology, with far less overhead, allowing us to achieve workload densities that are orders of magnitude greater. So, combining WebAssembly’s portability, performance, and container-less, capability-based security, we have just about all we need to handle tomorrow’s workloads today.

But what’s missing? Oh, yes, an architecture. How do we combine all of these capabilities into a cohesive system? Here hexagonal or port-adapter architecture, is simple and effective, enforcing clear boundaries between a component’s core logic and its implementation; as well as between the component’s themselves. This brings us to self-symmetry and tessellation: a runtime capable of hosting multiple, independently deployable, hexagonal components and, zooming out, a ubiquitous, self-forming mesh made up of multiple, hexagonal host instances, all integrated, as per the actor model, through messaging. This gives us a decentralized, comprehensive system, with a simple pattern that repeats across the breadth of the compute landscape, and from the micro level scale of the component library up to the macro level scale of the network, for the ultimate in scalable design. Fractal architecture is cognitively accessible and complements today’s most effective technology. Not to mention, it follows in the footsteps of the world’s greatest and most successful designer, nature.

You can find an example of this architecture here.

--

--

Writer for

Why do so many microservice implementations fail? Is the ‘microservice premium’ an inevitable trade-off or a problem with a solution? Read on and find out…