To better understand how Marketplace works, let’s take a step-by-step walkthrough.
As an example we’ll use the scenario of hosting a static webpage in a confidential decentralized environment. However, the process for other types of offers is almost the same.
1. Assembling the Order
First of all, we need to browse the Marketplace and select the necessary components to create an order. The basic component is an Offer.
There are four types of offers in the Marketplace. In most cases you will need all four to create an order.
- Data – complementary to Solutions, the data is used by the solutions (photo, audio, webpages, etc). You can use datasets from the Marketplace or upload your own.
- Compute – providers of confidential computing resources, machines where the solutions and data are executed in the Trusted Execution Environment (TEE).
- Storage – providers of decentralized storages, where the computation results are stored.
Open Marketplace at https://marketplace.superprotocol.com. Go to the Solutions tab and click on the Hosting Launcher offer. It will open a window with a detailed description. Click on the Add to Order button.
Hosting Launcher is the app that enables the operations of decentralized confidential hosting.
You can also see in the Restricted tab that this Solution requires another offer: a NodeJS base image. It is added to Order automatically.
Now we need a website to host. Go to the Data tab and add the Demo Static Website to the order.
The Show compatible with order filter narrows down the selection only to the offers that are compatible with the ones you have previously added to the Order. For instance, an Image Recognition solution is only compatible with datasets that consist of images (JPG, PNG).
The Demo Static Website is a simple static site that we made to illustrate the capabilities of the decentralized confidential hosting functionality. This version of Testnet only supports static sites, but in the coming months we will upgrade to hosting of full stack dynamic apps.
Alternatively, there is also an option to host your own static website. Press the Order button and then Add Your Own button. Upload your site in an archive.
Before uploading your own data all files and folders must be packaged into a TAR or TAR.GZ (TGZ) archive. There must be an index.html file at the root. Do not place all data in a single folder before archiving - the app won’t be able to read it.
Now it’s time to select the provider of confidential computing resources. Go to the Compute tab and add one of the compute offers to the order using the [+] button.
It’s best to select the Compute offer with the fewest orders in the queue.
Finally, we complete the assembly of the order by adding the Storage provider. Go to the Storage tab and add the StorJ offer to the order.
Decentralized storage is where the results of the computation are placed (because the Compute provider does not store the results) and also where the solutions and data offers are stored by the providers. This architecture ensures complete decentralization.
2. Creating Order
It is time to create the order. Open the Order window and press the Checkout button.
Either insert your own passphrase or generate a new one. Then press the Place Order button. Save your passphrase! You won’t be able to access your results without it.
Now you need to confirm the transaction in Metamask. Its window will open automatically, but if it doesn’t, open it manually from the browser. Press the Confirm button.
3. Getting Results
The order has been created and is now being executed. If not forwarded to it automatically, press the All Orders button and then click on the last order in the list.
It takes a few minutes, depending on how many workloads the server is processing.
The order changes to status Done. Press the Get Result button and enter your passphrase. You will see the link - this is your website URL.
The link to your new website will take 2-3 minutes to go live after the order is done.
Also please keep in mind that for testnet purposes the site will remain online only for 72 hours. But you are always free to create new orders.
You will also see that other orders have been created. These are for the Tunnel Clients and Servers, which is the technology that makes hosting work in a confidential environment (which cannot be accessed from the internet directly). The more Clients and Servers you have supporting your hosting - the more stable and fault resistant it is.
Tunnel Client – The client side of the tunnels. It is responsible for performance and contains the applications and data in a confidential enclave (TEE).
Tunnel Server – The server side of the tunnels. It is responsible for protection against DDOS attacks and holds the Public Ingress (public static IP) which routes to the Client.
You are all set! Go to your new website and please don’t forget to tell the world all about it on Twitter (or anywhere else). We’d really appreciate it!