Btw. how we can compare it to SHIFT and Substratum?
Web2Web is much simpler. I would describe it as the "KISS" variant of a decentralized web.
I haven't read the whitepapers of Shift and Substratum, but from the infos on their websites, Web2Web is a little bit more similar to Substratum than to Shift. Shift uses IPFS to host content, that means that you'll need a "gateway node" or install a software on end users computers to access contents. Substratum seems to share the advantage with Web2Web that end users don't need to install a software to view pages on their browser. However, they also need gateways; there is a complicated pay-per-click system where content hosters pay "forwarders" to deliver the contents to end users.
Web2Web has no payment system and no "gateway nodes", sites live on the torrent network. That means that if you have a device that is online 24/7 and can seed your torrent, then you will be able to directly publish your page from there, without costs. If you don't have a 24/7 online device, if your content is interesting enough it may be forwarded by your readers; otherwise you may have to pay somebody. But today, I think most people have access to a device or a server that can publish torrents 24/7.
So Web2Web's disadvantage is that it has no integrated system to incentive nodes to "forward" the contents while the original hoster is offline. (I think I remember Graham also mentioned this disadvantage and he's looking for solutions.)
The advantage is that you only need a Slimcoin standard node (even a light node, or a web node, would do it) and a webtorrent-enabled torrent client to publish pages, and that sites can be viewed without software.
So I think Web2Web, both Shift and Substratum - and also MaidSafe and ZeroNet - are cool projects, but they have a potentially different public. Substratum would be more suited for commercial sites, while Web2Web is more for things like activist blogs - that's why I also think that China is an interesting "market" for it.
In the New Year I'll put on my thinking hat and see if I can come up with a solution for re-orgs.
I already changed your blocknotify script a bit, however, this point (reorgs) was still not addressed.
Two ideas for "workarounds"
- the simpler and more "hacky" one: I'm thinking about to offer, instead of the whole blockchain, only the transactions that carry OP_RETURN inscriptions via RDF. That should also boost performance. In this case, reorgs would not be really dramatic: If there's an inscription in a tx that later gets "orphaned" by a reorg, the intention of the publisher is to publish the inscription. So at most there would be a duplicate inscription that could be pruned.
- the more complete solution: add a "safe mode" to the blocknotify script that checks every 1000 blocks or so if the real blockchain still is identic to the RDF blockchain. If not, the blocks that are different are deleted and the script catches up again.