Outline: Frontend Architecture and Authentication

5 minutes read

This is an outline for a talk I have presented at ASPLOS 2022 and adapted for Motoko Bootcamp 2022. It’s not fully fleshed out, since I’ll be using it to make slides, but I figured I’d publish it anyway in case it is helpful to anyone.

Trustless Web Applications on the Internet Computer

The Dfinity Foundation has launched the Internet Computer, a general compute platform which is powered by blockchain. Smart contracts run in a WebAssembly environment, and can be used to replace virtually every function possible on traditional cloud platforms.

These smart contracts, which we call canisters, can be thought of as stateful lambda functions. Canisters can be written in any language that compiles to WebAssembly, and are able to respond to HTTP requests and can interact with each other though a standard, backwards-compatible interface language.

Architectural Overview of the Internet Computer

Much of this segment is borrowed from IC Whitepaper, which was written by Victor Shoup, a Principal Researcher at the Dfinity Foundation.

What is the Internet Computer?

The Internet Computer (IC) is a platform for executing smart contracts in WebAssembly across a global network of nodes running in independent data centers. This platform was designed from the ground up to be able to scale horizontally, avoiding the scaling and bandwidth challenges presented on Ethereum-like blockchains.

Today, close to a year since the Genesis Mainnet launch event, there are many applications running on the Internet Computer. Social media sites like DSCVR, Distrikt, NFT Marketplaces such as Entrepot.app, and more are running their services on IC canisters. That statement is perhaps understated - to be clear, every aspect of those applications is running on a blockchain platform. This includes:

How is this possible?

The Internet Computer (IC) is a new platform for executing smart contracts. Here, we use the term “smart contract” in a very broad sense: a general-purpose, tamperproof computer program whose execution is performed autonomously on a decentralized public network.

The IC Replica

Architecture

Boundary Nodes
Network Nervous System

The Internet Computer has a governance system, called the NNS. ICP tokens that are staked into Neurons are able to cast votes on a variety of topics

Actors and Agents

Why does this matter?

Serving Certified Web Content

Why serve certified web content?

In a traditional application, you rely on the party who is providing your hosting to be a reliable and trustworthy partner.

Certified Variables

Certified variables allow a user to query some value, and get back that value, along with a certificate, aka a proof that the subnet has agreed on the value. The certificate can be computed ahead of time

Process:

Certified Assets

This starts with essentially the same setup as certified variables

Limitation - this architecture makes it hard to stream large content


Anonymous Authentication with Internet Identity

Now that the basic stack is explained, let’s explore how smart contracts can be used to provide secure authentication across your devices, without requiring email, passwords, phone numbers, or time-based authentication codes.

Using an identity

Access Control Strategies


Go to TopFile an Issue