TEA Hosting Nodes: The Backend for TApps

The TEA Project’s Three Compute Tiers

To fully bring decentralized cloud computing to the blockchain, we need to recreate all three tiers that comprise traditional cloud computing.

Visualization of Three-tier Architecture
  • The front-end or presentation tier where the user interface is presented to the end-user for interaction.
  • The back-end tier is where business logic is executed.
  • The database tier is where the app state changes / end-user account changes are stored.

The Front-end Tier

The front-end of any TApp is simply static files (html / css / js / jpg etc.) that are pulled from IPFS and loaded into a TEA hosting node. This is basic functionality that’s being provided by a hosting node, but it’s still an important design. Given an IPFS content ID (CID) for a TApp’s front-end, the user can load that CID from any hosting node on the TEA network. This is 100% decentralized which is in contrast to the many smart contract-based platforms that have to rely on cloud computing for their front-ends. These types of dApps that still rely on cloud computing are best considered “hybrid” dApps at best.

The Back-end Tier

After the end-user logs in to the static TApp, they’ll begin interacting with the user interface. This will entail sending requests and listening to the replies before updating the app. This is how the loop looks like in full (with a break point depending on whether the function call is a query or mutation request):

  • The state machine will order the transactions coming in from its various state maintainer nodes.
  • The state machine continuously updates the state and broadcasts it to all TEA hosting nodes.
  • The TApp front-end is constantly querying the hosting nodes for any new updates and will display them to the end-user when available.

The Database Tier

Besides a local database cache stored on IPFS, there’s no actual database being kept on the hosting nodes. The TEA hosting nodes can’t directly modify the state. The database instead resides on the state machine that’s maintained by the separate state machine nodes. When the hosting nodes have an update, they instead request the state machine to update the state.

  • TEA hosting nodes run function code (actors) for TApps. Some hosting nodes will also host the TApp’s front-end.
  • State maintainer nodes keep the global database and execute the transactions sent by the TApps that change the state.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store