Using the DHT storage module from fledger, you can store data in a decentralized way. A first use-case is to store and retrieve webpages from fledger. Here is how it works:
- You create a static version of your website (with Hugo, Jekyll or others)
- You upload it to the fledger network
- Your webpage is served from your node while its online, or from other people's node when you're offline
In a future version, fledger will also track how long you're online and how many other pages you're serving. This will allow a tit-for-tat sharing: the longer and the more other pages you store and serve, the longer other nodes wil store and serve your pages.
To upload your web page to fledger, you can simply go to the Fledger Web to connect as a node. Choose the Manage Pages tab. Fledger will automatically choose the standard root-domain for you. You will see all subdomains of the root-domain available and can click on any of them for sub-sub domains or the homepage.
To add your own homepage, you need to create a domain for it.
Then you can upload files and directories which will be stored
under this domain.
Per default, index.html or index.md is used as the homepage, but
you can also change this.
Each domain can decide whether it wants to accept random sub-domains or whether it restricts them to the owner. The root-domain accepts any sub-domain, and is selected by default. Follow the steps to create your sob-domain and upload your page:
- Click
Add subdomain - Enter the desired name - fledger will tell you if the name is available or not
- Confirm with
Add
Please be aware that fledger will create a private key for protecting access to your domain. If you lose this key, you won't be able to modify the domain anymore.
The private keys created to protect your domain will be stored directly in your
browser.
So if you delete the localStorage, you will lose all your private keys and access
to your domain!
You can create a backup in the Profile tab, and store the json file somewhere safe on
your harddisk.
To restore a backup, you can upload it in the Profile tab.
Fledger does the following when you set up your own webpage:
- Creates a
Signerand stores it locally - Creates and stores an
Identityas aFloIdentity - Creates an
ACEwith the rulesdomain.*,blob.*and stores it as aFloACE - Creates a
Domainupdatable by theACE - Creates a
FloBlobwith content-typetext/htmland links it with theDomain
- should the
Domainpoint to a home-page? - is there a need for a hierarchical storage of the FloBlobs?
- how to discover the Domain given the name?
- ID of the domain could depend on the hash of the name
- a separate DNS system to resolve names to IDs
- how to discover the pages stored?
- Create a list of all domains if they point to a home-page
- the home-pages link to the other pages
- use sub-domains for different topics in the domains of the users
- should there be a main-domain with given subdomains (social, blog, tests) that can be populated by new users?
- how to bootstrap the system?
- create one page for fledger, and hardcode this ID in the fledger-binary