Messing around with DWeb

You may have heard something about NFTs recently. They are the technology concept that underpins the ability to sell an authoritative version of digital art, sometimes for millions of dollars. It is a bit like selling a signed print for more than the unsigned print sells for, but the unsigned print is free while the signed print is worth $69M. But that’s not really want I wanted to talk about.

If you are the sort of person who pays that much for a bunch of electrons somewhere, you don’t want to wake up tomorrow to find them gone. Many well-known websites have, at various times, been brought down by DDoS attacks or merely defacement attacks, and content has gone missing. A website is a surprisingly brittle thing, and relies on domain name registrars, nameservers, web hosts, ISPs and other parties to all come together to deliver the content that you’re expecting. Since a buyer may expect their newly acquired, expensive digital artwork to be as long-lasting as a statue or painting, traditional web infrastructure is not really the solution.

So, NFTs are now making use of decentralised Web or DWeb technology, where the content delivery has no single points of failure. A lot of the thinking behind this is motivated by free speech ideals and resisting government control, but it can just as easily be put to the service of capitalist art speculators. Or, in my case, blog authors.

I was curious to explore what was involved in putting my humble WordPress blog onto the DWeb, or as it is sometimes called, Web 3.0. It wasn’t too hard, but the material I found explaining it was a little esoteric. Follow along if you would like to do this too!

There are basically two things that I needed to do: host the content somewhere (equivalent to using a web host, or perhaps a CDN) and register a name that could point to that content (equivalent to registering and hosting a domain name). In theory, you don’t need the name, but the address for the content then will not be human-readable or memorable.

IPFS (or InterPlanetary File System) is a technology for hosting content in a decentralised fashion, a bit like peer-to-peer file sharing. The main catch is that the files are all static, which means that they can’t run a platform like WordPress. I had to begin by creating a static mirror of my website as plain HTML, CSS, JavaScript and images, without any dynamic content. If I wanted to do it properly, I’d also have replaced the backend system that allows people to leave comments, but instead that feature will simply be disabled.

At the Terminal prompt of my Mac (which suffices for a Unix shell), I used these commands in an empty directory:

% wget -k -r -p -N -E -w 0.5 -nH -e robots=off -R "*\?feed=*" -R "*\?rest_route=*" -R "*&*" https://www.aes.id.au
% git init
% git add *
% git commit -m "Initial commit"
% git remote add origin https://github.com/aesidau/www.git
% git push -u origin master

and within a couple of hours, I had a static copy of my website stored in GitHub. This is a necessary first step to make use of Fleek, which handily takes a GitHub repo and deploys it to the IPFS. It is also free to use for personal purposes if you use less than 3GB of storage!

At this stage, my blog was now available at https://ipfs.fleek.co/ipfs/Qmahm66pomdqppz71abMixDnHWr9b1HmqXhv1iTGrEWjb2/ which is a bit of a mouthful. That last part is the IPFS Hash that is used to uniquely refer to my blog content. Ideally, I could share something short like https://aes.id.au so the next step was registering a suitable name.

There are a few contenders for the name service of the DWeb, including Handshake and NameCoin, but currently the most popular one seems to be ENS which uses the Ethereum blockchain. To buy a name via ENS, you’ll need some Ether currency and a supported wallet to store it in – MetaMask, Portis, Authereum, Torus, WalletConnect and MEW are the various options at the moment. I chose the option of using the Chrome browser together with the MetaMask extension. The amount of Ether you need to buy will fluctuate based on the price of Ether and exchange rates, but it will probably be in the tens of dollars. Also, if you want to buy a name that is 3 or 4 characters long, it will be a lot more expensive. Additionally, every time there is any update to the ENS name record, it will cost some Ether.

After I’d installed MetaMask, set up a wallet with it, and put in some Ether, I needed to go to the ENS App site and click on “Connect”. Then it’s just a matter of following the instructions to register a name. Once the name is registered, click on the option to manage the name, and click on the option to edit the record. I also updated the entries for ETH and BCN addresses, since the changes will all be covered by the same fee, but the main one to edit is “Content”. I put “ipfs://Qmahm…” here with the full IPFS hash, and saved the record.

That’s it. So, now I can refer to that static mirror of my blog by ipns://aesid.eth (in the Brave browser) or aesid.eth/ (in the Chrome browser with MetaMask installed) or https://aesid.eth.link (which uses an IPFS gateway and should work in every browser). Unfortunately, while it is now protected against my WordPress blog disappearing, it is already out-of-date, as this blog post isn’t there!

The cycle of www

In the early days of the web, it was common to have nearly every website begin with “www.” as a way to indicate that the domain name related to a website, rather than (say) an ftp site, or a news site, or any of a dozen other common types of site on the Internet. However, as more people begin to believe that The Web == The Internet, this practice has slowly disappeared among the “cool” sites. This guide on the net even suggests that “pro” sites should avoid using “www.”

If you type “www.twitter.com” into your favourite web browser, you’ll find that you end up at “twitter.com” (minus the “www.”). Similarly for www.wordpress.com, www.go.com, www.thepiratebay.org, www.digg.com and www.stackoverflow.com – to pick a few other popular sites. While many other sites support leaving off the “www.” in the first instance (such as mine), redirecting you automatically to the site, these listed sites use the www-free name as the canonical version.

Even if this practice continues to build in popularity, in the longer term, it is going to need to change or it will cause a problem.

The trigger will be the complete opening up of the top-level of domain names so that instead of “.com” or “.au” suffixes on names, or a preset list of them, absolutely anything will be possible as a domain name suffix (also known as the top level). Things like “drink.coke” and “stop.spam” could be completely legitimate domain names. Aside from the dot (full-stop, point, period, etc.) in the name, there is nothing about it that would indicate that you should type it into your favourite web browser.

It is convenient for me to be able to click on links in emails that I receive. Another aspect of the above is that my email client (or the sender’s) won’t be able to automatically tell that some domain names should be turned into links, so I may not realise that I ought to visit them. But if I do, I’ll need to cut-n-paste the name, rather than just make an easy click.

The work-around is to put “http://” at the start of every one of these new domain names, so that it’s clear to both human and machine that something is an address on the web. Simple – just add 7 characters to the beginning.

However, this is also achieved by putting the 4 characters “www.” at the beginning, which is universally understood to refer to a website. It’s about half as long, easier to type (especially on mobile devices), and less techy.

So, let the cycle turn, and have it become more common for popular and cool – and “pro” – sites to use “www.” (again).

Why I blog

I’ve had some kind of public presence on the Internet since the mid 1990s, but the first website of mine that I ever intentionally directed people to was on a service called GeoCities. GeoCities was like the MySpace of its day – it seemed like all the ugliest personal webpages were on GeoCities, but was somehow one of the top 5 most popular sites on the net. Then it was taken over by a mainstream site, Yahoo!, and languished until this year when (ten years after they bought it) Yahoo! announced they were shutting GeoCities down.

Some would say good riddance. However, in about two months, this link to my very own ugly personal webpage will stop working. It’s a little sad. And the news that it will be gone from the interwebs is a little sad, too. But, to be honest, I moved on from GeoCities long ago, and a website or two later, have been running a blog on my own domain since 2006.

Anyway, with this nostalgic thought in my mind, I started to reflect on why exactly was I running a blog. I don’t really consider myself a “blogger”. I’m not doing this to develop material for a book, generate advertising income, build a global readership, or promote my company / my product / myself. As this is a personal site, my reasons are personal.

Firstly, my immediate family is spread over four cities (the others are more than 2,000kms away from here), and my friends are dispersed even wider. I write a blog (and use services like Flickr and Facebook) as a way to reach out to them. If they were here with me in person, I would happily chat to them about any of the things that I’ve written on my blog. I hope they are reading, although in reality most probably aren’t. They are the main audience.

Secondly, I enjoy indulging in a regular creative process. I’m not coding much these days, or doing any singing, so it’s nice to be able to sit down, about once a week, and simply write. Some of my blog posts, I’ve recycled into speeches or used the blog as a sounding board for ideas that I’ve had. The act of writing something down helps crystalise it. Also, having created something is its own joy – the world now has something in it that it didn’t have before. Some of my obscure posts (such as my IKEA hinge one) have been read by people I’ve never heard of, and I like to think that maybe they have been helped by the existence of those posts.

Lastly, the whole blog itself is an experiment and a way for me to learn about the technologies behind blogging. As someone working in technology, I want to stay current with important web technologies. Hence, I’ve developed a blog plugin for writing reviews using a technology called microformats, and added plugins to the blog for OpenID, advertising, analytics, and Twitter. As new technologies emerge, I will probably try them out on here somewhere.

Given the above, I don’t expect that I’ll be doing anything like giving up the blog for Facebook. I enjoy blogging, and I know there are others who do also.

However, it’s not something I do freely, with wild abandon. The fact that my ugly site of ten year’s ago can still be retrieved from the Internet Archive serves to illustrate that words on the web can be considered permanent. I am forced to recognise that future friends, employers, colleagues and even my own child can one day retrieve anything I’ll write, if they so wish.

Hopefully in ten year’s time, I won’t be so embarrassed by the content on my website. But if history’s anything to go by, it’s rather likely.

Reblog this post [with Zemanta]

iPhone Innovations

Spectators at the iPhone DisplayIn my previous post, I described the iPhone as appearing to have incremental improvements, but also as allowing the promise of mobile data to be realised. Isn’t this a contradiction? How can minor innovations make such a difference?

I explained how Apple managed to do that with the iPod, compared to other digital music players at the time. It looks like they might have done it again with the iPhone, compared to other WiFi-enabled PDA-phones. Many of these PDA-phones appear to be functionally equivalent to the iPhone: they make calls, play music and movies, manage email and calendars, and allow you to browse the web. HTC has had such devices for a while, and we’ve also seen them from Motorola and Nokia. So, what’s new?

There are basically two types of data that you might want to access when mobile: your personal data, which can be synched to the mobile device; and external data, which these days is made available via the web. The former has been long solved (e.g. iPod) but the latter has been problematic for mobile devices. The main problem is basically that the web has been designed and developed for desktop computers, and not mobiles/PDAs.

Perhaps the most complained about difference between the web for PCs and the web for mobiles, is that on a mobile the web can be expensive and slow. Continual improvements to mobile plans (including caps and bundles), mobile CPUs (along the lines of Moore’s Law), and wireless broadband technologies (such as HSDPA) are addressing these complaints, and will eventually be good enough for this complaint to have little substance. However, for now, increasing numbers of mobile devices, including the iPhone, support Wi-Fi which will provide an equivalent experience to desktop computers in terms of cost and speed. As few people will need to browse the web as they walk or drive, Wi-Fi coverage in hotspots will often be suitable.

No, for the web to work on mobiles, three things need to work equivalently to a PC: input, output and page functionality. The iPhone has brought improvements to what is typical for a PDA-phone, and these are sufficient to gain PC equivalence in these areas.

Most web sites are designed with the assumption that the web browser has a PC keyboard and a PC pointing device like a mouse. The iPhone provides an on-screen QWERTY keyboard, and through its touch screen provides the ability to use your finger as a pointing device. Pretty much all previous touch-screen PDAs assumed that you would use a stylus as a pointing device, but this doesn’t work well on a phone as (i) it means you need to operate the device using two hands, and (ii) it slows the use of the device because before you can do anything, you need to extract the stylus from within the PDA first. The whole UI of the device needs to be completely overhauled if you don’t have the precision of a stylus, e.g. small ‘X’ icons in the corner of a window are too difficult to press to close applications, and scroll-bars along the side of windows are too difficult to manipulate. However, on the iPhone, to scroll a window, you simply wipe your finger along the screen. This is the first time a PDA-phone has managed to provide equivalent input to a PC without needing a stylus.

Most web sites are designed for a screen that is wider than it is tall, i.e. a landscape or horizontal layout. With more desktops and laptops coming with widescreen displays these days, this design principle is likely to become more extreme. However, because PDA-phones need to work when held as a phone, i.e. vertically, so that there is sufficient distance from the ear to the mouth, most mobile devices attempt to display web pages on a screen that is taller than it is wide. When web pages designed for a PC are shown on such devices, the browser either has to (i) shrink the font size so that it becomes unreadable, and needs to support some kind of zooming in-and-out, or (ii) reformat the web page so that it is laid out in a column, which is almost certainly not what the web page designer intended. The iPhone supports vertical display, but also horizontal display; all the user has to do is tip the device sideways. In horizontal display, standard web pages are apparently quite readable.

Most web sites are designed for display on a web browser with equivalent functionality to Microsoft Internet Explorer or Mozilla Firefox. This is not just that it support full JavaScript and dynamic HTML for all that Web 2.0 goodness, but that it supports all the really badly generated HTML out there which is ill-formed and certainly not standards compliant. The Apple Mac has had its own desktop web browser for a while now called Safari, and a version of Safari is included in the iPhone. This should cope with pretty much all those web pages out there that depend on full web browser functionality.

So, that’s it. Three apparently “incremental” innovations – stylus-free touch screen, ability to display horizontally, and a full web browser – are enough to provide an equivalent experience to browsing on the PC. Similar functions have all been seen before, but not quite the same, and not all together. And together they allow the promise of mobile data to be realised.