Architecture
Last updated
Last updated
This page introduces the high level components in EarthFast and the user and project flows that are for both static assets and Next.js. For more specific information about server side rendered (SSR) Next.js see .
This is how an end-user interacts with an EarthFast-hosted site
Make request to site URL, which is pointed to project's Domain Node
Domain Node returns service worker to user's browser
Service worker securely fetches project content from Content Nodes
This is how project owners create & manage their EarthFast projects
Create Project
Create project on EarthFast Smart Contracts
Connect DNS to Domain Node
Make a reservation with Content Nodes to host project content
Update Project
Update project metadata on EarthFast Smart Contracts
Operator sets up node, per specs defined in Node Operators
Operator registers node on EarthFast Smart Contracts
Operator can manage project reservations as needed
The on-chain entity that owns + manages an EarthFast project. It can be any on-chain address, eg. a DAO, governance contract, multisig, or wallet.
Set of on-chain contracts for state & management of: projects, nodes, and reservations.
More info will be available once contracts are open sourced.
An EarthFast Content Node is essentially an HTTP file server, acting on behalf of a project that has paid to reserve it. The project dictates what content should be served recording the URL of a tarball containing the project website (and its checksum) onto the EarthFast Smart Contracts. Content Nodes that have been reserved will fetch their project's tarball from its origin, verify it, and serve its file contents when requested. Content Nodes can serve static assets via a static file server or Next.js by running a server process.
In addition to serving files for a project, Content Nodes also participate in a distributed monitoring system whereby peer nodes are assessed for uptime and performance. This data is collected over time and stored in a local database, where it eventually gets retrieved by the EarthFast network reconciliation process.
A server that is responsible for responding to browser's DNS requests and maintaining SSL for a project's domain. Domain Nodes host none of the website content directly, in the case of static asset projects the Domain Node serves the service worker and in Next.js projects acts as a proxy between the browser and content nodes.
Since this node provides SSL, there is an element of trust. There's ways to mitigate attacks and add redundancy by running multiple Domain Nodes or setting multivariate A records on the DNS.
A service worker in the web browser handles end-user requests. It runs a set of static HTML and JS files returned by the Domain Node. These files are project specific and have a list of Content Nodes for the project based on the browser's location.
This Service Worker is also responsible for fetching the correct content bundle from Content Nodes and verifying that each file in the bundle matches the expected checksum. The service worker does not run in Next.js, only static asset projects.
The requirements for running a Content Node are outlined in the page, but generally follow from its responsibility as a basic HTTP server: it must be reachable via HTTPS, needs a modest amount of dedicated CPU/memory, persistent storage, and a high quality network link.