Developing on the BitTorrent Sync API? Our developer evangelist is here to work with you.
This is a guest post by Ian Maxwell of meshedsites.com, on leveraging BitTorrent Sync and other technologies to create a decentralized solution for deploying and experiencing websites.
I started development with a Firefox add-on to handle a decentralized URL scheme that would load the sites from BitTorrent Sync directories. Each synced directory would be an individual site. I later included a domain-name resolution system into the add-on that became MeshedSites.com and provided the add-on the ability to create BitTorrent Sync config files. It can automatically start the BitTorrent Sync client from the browser with this generated config file, saving users the trouble of messing with the command line just to start the client correctly. It also provides indicators in the toolbar to alert the user when the client is disabled.
While developing the URL scheme, I wanted the URLs to seem familiar, and so decentralized URLs begin with ‘xttp’ instead of ‘http.’ Once a user enters a URL like xttp://blog.meshedsites.com into the address bar, the add-on automatically syncs the entire site to the user’s computer. Once it’s synced, the add-on loads the site into the browser. By using this add-on, the user can directly enter the URL or click an XTTP link and be browsing a decentralized site without any real interruptions in the normal browsing experience. In addition, this system allows users to host a decentralized site by just syncing a folder on their computer and creating a URL to it on MeshedSites.com.
The entire system is a combination of centralized and decentralized technologies. Meshedsites.com acts like a central DNS of the system. Users who want to host a site will log into MeshedSites.com and create URLs that link back to their BitTorrent Sync keys. MeshedSites.com provides a search engine for hosts who want their sites to be displayed in the search results, but this is not required. Users can search for keywords related to a decentralized site and then simply click the XTTP links to navigate to the decentralized version. Once a user visits a decentralized site, they become a peer through BitTorrent Sync and also help host that site. Users will generally want to share their read-only keys, so that only the original version of the site will be propagated on the network. This will prevent someone from maliciously altering or defacing the site’s content and attempting to propagate an unauthorized version. However, MeshedSites.com has the ability to AES encrypt your shared keys so that it is easier to securely share read/write keys, and it provides the added benefit of password protecting your site. In some cases, you will want to share read/write sites with people you trust.
A step-by-step look at how MeshedSites works:
Making adoption simple and intuitive has been one of my top priorities, so I’m working on several open-source projects that will make creating a site over BitTorrent Sync and MeshedSites.com more user accessible. I’ve developed a decentralized blogging platform that uses a JSON database to store blog entries. It contains a browser-based editor that supports the Markdown syntax for creating or updating blog posts. Saving blog posts generates a link to a downloadable JSON database, which can be stored along with the project. This allows quasi-dynamic content on a completely static site—no Web server is required. MeshedSites’ centralized and decentralized blogs are both using this platform. You can download it on GitHub.
I am working with some other people to develop two more open-source projects that will be released soon on GitHub. The first is a decentralized white-boarding application with built-in chat features. This will allow users to collaborate on projects without sharing sensitive data over an uncontrolled company’s servers. The second is a browser-based four-track music-recording studio that will allow musicians to remotely collaborate on ideas and exchange recordings for remixing. I think this would be an excellent use of BitTorrent Sync, because the size of some audio files makes hosting on a centralized site impossible without employing large databases.
This whole project is dedicated to making decentralized solutions more user accessible so that it’s easier to see the potential these technologies bring to the Internet. Decentralization promotes freedom of speech, empowers users to create websites that are free of censorship, and eliminates the need to run a Web server 24/7 or pay for hosting just to share ideas and information on the Internet. I hope to see more of these kinds of technologies catch on.