> Websites get seized by losing control over a webserver or a domain. If we
> replace both the webserver and the domain with torrents and blockchain then
> there's nothing left to seize.
>
> When you open index.html in the browser, here's what happens:
> - Bitcoin address 1DhDyqB4xgDWjZzfbYGeutqdqBhSF7tGt4 is searched for the
> latest outgoing transaction containing OP_RETURN script. Inside the
> script there is a torrent infohash of webpage.html.
> - webpage.html is downloaded from torrent via webtorrent and displayed.
I'm at 10 minutes waiting and the page hasn't loaded anything yet, the console reports wasm loaded correctly. It might be more useful to change the URL to the repo catilac linked. The idea sounds interesting, if a bit circuitous.
Edit:
Now that I think about it more, I'm a little confused about how this "decentralizes" anything, because the page is still required to get the bitcoin address in the first place? What prevents someone from seizing a domain or webserver and modifying this particular bitcoin address, other than the work involved? Can anyone familiar with IPFS speak to similarities or differences?
Keep in mind that some ISPs actively attack bittorent and it won't work with them if it accepts unencrypted connections. That might be why it's not working for you (if you've never used bittorent successfully there before)
It isn't using bittorrent, it's a web page. It uses webtorrent, which operates over WebRTC. WebRTC is encrypted and doesn't use bittorrent's TCP/UDP ports. In fact, ISPs would have a hell of a time even discerning WebRTC traffic containing a video call and a webtorrent connection.
I've worked on a lot of web projects, but still I don't understand why we want to build applications in browsers. Don't get me wrong, I love the web and I've been hacking on it for a long time, but browsers can't do shit. Servers do all of the heavy lifting, even with "modern" web apps. Yet our browsers are resource-hungry monsters.
I'm currently working in the peer to peer application/protocol space and the biggest thing that stands out to me is the impact these technologies could have in developing countries. The challenge is making things light enough to run well on the weak hardware most people have to work with. Browser apps don't make the cut.
Because I can build my application once and it works everywhere (mostly). Because I can update it whenever I want and I don't have to support multiple versions. Because there is very little friction for users to use my application, they don't have to manually download or upgrade it.
This. This so much. And it's safer for the user. Have you ever tried distributing binaries on the internet? People are very reluctant to run a random binary (and rightly so).
Also IMH developer perspective HTML+JS+CSS is surprisingly a not so bad UI toolkit, and React makes the development experience even better.
I will always bet on standards and, at least for now, modern web is the standard that I can trust.
The value of the browser sandbox is often dismissed but it's doing a great job at allowing people to run untrusted code from the web without much thought behind it. I also strongly believe users are much more willing to try websites than download entire app anyways just to see if it's any good.
Which other platform truly allows you to write software once and deploy it seamlessly to just about every kind of desktop and mobile device in the world?
The browser has a great deployment story and incredible market penetration, I agree. However, none of that is because of web technologies. Browsers are special because they are everywhere, not because they are good or because JS+CSS+HTML is a special magic sauce that nobody else can replicate.
I just don't get this at all. The fact that chromium books and in the past netbooks do so well is for this reason. I can't understand why you wouldn't want browser applications at this point. Outside of write once run anywhere, security and accessibility is another benefit of the browser. We still have a huge issue with the walled garden in the app space. I'm assuming you mean primarily in the mobile space ? I think this is largely due to a failure on Apple and Google's lack of wanting to innovate because they control the app stores.
I'm talking about performance. Browser applications are very resource intensive. That isn't a problem for rich people in developed countries, but most of the world can't afford to throw hardware at their problems. Besides, do we really think we'll be able to double hardware performance every year ad infinitum? Even Intel has given up on that pipe dream by now.
Again Ill have to disagree, there were many efforts on delivering laptops for people in third world countries that ran linux and used browser apps primarily. Even chromebooks work fine in most educational spaces in the US.
I can't tell you how happy I'd be if someone made a network of applications you could download and install in under a second that ran in any other language.
Is there a way to extend a running javascript app without restart. Say I have a Single Page APP (built on React if that matters) and I want to allow third party developers to add Components / modules/ themes/ plugins to a registry.
I want to be able to allow end users to choose third party plugins from the registry to extend the capabilities of the SPA.
Is this possible? If so, is there any guidance on how to achieve this?
Sure it's possible. As an example, Odoo is a full Python webapp "platform", with a core upon which the user can choose and load plugins to add features (from a simple contact list to a full-blown ERP/CRM/accouting/CMS) and extensions to those features.
On the frontend side, when you install a module, it loads the .js file (using a regular <script> tag) which contains a single function. The Odoo core passes its main JS object (the base of the core API) to that function, which then initializes the whole module and uses the Odoo API to configure stuff, setup hooks, etc.
There's no security, though: by design, a module is trusted and can do anything on the platform. I'm not sure if and how one could contain them.
(Disclaimer: I'm a developer working for an Odoo partner, we write modules and host it as a SaaS.)
I think they're referring to any non-web language, e.g. if I could host and distribute C apps with the ease of the web. (Getting end-users to actually run and use a program with one click, rather than having to download a binary, run it separately, etc.)
Are you thinking of something along the lines of `ceylon run com.example.helloworld/1.0.0`? This command downloads the module if it's not locally available from the remote repository and then runs it to print "Hello, World!".
I think I understand but anyone should free to correct me. In every single other environment there is little to no distinction between "front end" and "back end". In fact, other than the web, the ui is a library within the language a developer chooses while in the web the scripting language is secondary to the ui.
These concepts may hurt or cripple early developers since html/css is obvious and easy while the concept that globals, scope and the database is in an entirely seperate location seems odd. What makes it worse is that xmlhttp requests arent very kind.
The concept of the single page app and "serverless" architecture seems to be a fools errand to build (or influence big names to build) complex html applications without the need to spend money or wrappers to bridge the gap. Meteor, northwest.js and electron are celebrated for attempting to accomplish these goals.
> I think I understand but anyone should free to correct me. In every single other environment there is little to no distinction between "front end" and "back end". In fact, other than the web, the ui is a library within the language a developer chooses while in the web the scripting language is secondary to the ui.
It depends. A desktop application may have a backend, like a central web service to connect to. Even if it doesn't, there is still likely to be a logical separation of layers which may or may not be in different languages (think c++ backend with a c#/xaml front end).
In those situations, does the c++ service render the xaml or provide the c# to execute to provide the xaml? Or does it provide a shared storage/events/peer resolution/info collecting. Usually a server provides something much different than a web server does
C#/XAML on the front-end could mean that .Net/WPF is rendering the XAML and wiring up the C#. The C# might do little more than handle events triggered by the user interface and update the user interface in response to events triggered by the back end.
As the potential capabilities in front-end web development increase, the differences between web development and "desktop" software development are reduced, because web developers find themselves facing more and more of the same questions software developers have always faced when dealing with distributed software architectures at scale.
My point exactly. Spas are going in that direction. "Firebase" allows them to be "serverless" sincebthey have a shared database to write to and read from
> but still I don't understand why we want to build applications in browsers
because that's where people's attention is.
where people's attention is, is where apps are going to be built, with whatever is there to build them.
if you think javascript is bad, get ready for SnapchatScript (that's not an actual project, but it all too easily could be, and something like it will be an actual project, some day)
1. You need to make .torrent of your content AND bitcoin transaction = EVERY even smallest change to your site which need to be seeded as new torrent.
2. If there is not enough people to seed your torrent in DHT network then you need to seed it yourself with your IP/server IP which means it can be taken off like any other website.
3. If you want to get an "account" you need to send him money? If you want this project developed you need to "throw money at him". Aha...
4. Project is connecting to blockchain instead of bitcoin nodes, which means if blockchain is down every site hosted in this system will be down.
5. The most important thing, if you will wait for 3 transaction confirmations then every update to your site will need to wait ~30 minutes or anyone will be able to impersonate as you. This is project killer.
Ok so what is an alternative? There is a new BIP pending in BitTorrent protocol that will enable to update .torrent files in DHT network which means you don't need bitcoin at all in this equation.
It's true that BEP-46 'Mutable Torrents' exists now, but trustless DHTs like Bittorrent Mainline are vulnerable to Sybil attacks [1][2], which is conceptually similar to a Blockchain 50+% attack to where a malicious party can control a large amount of nodes and propagate lies. You want to involve some incentive scheme to counteract this [3].
It will not help to eliminate attacks by using point 3 as you are still on the bitcoin network on which 50%+ attack can be made.
Using mutable torrents you are attaching public key to .torrent file and then just signing any changes with your private key. It's even better than bitcoin and without flaws of bitcoin which i mentioned.
You need to get information about content/website that you want to access somewhere, don't you ? So with this information you can get also sha256 of the public key that is attached to.torrent.
They're not quite the same in computational effort. To attain 50+% on Bitcoin you have to actually solve proofs-of-work on the blockchain. To execute a Sybil against Mainline you just have to show up.
Of course it is harder which doesn't change at all what i wrote = it's possible. Then i explained how to make sybil against your content impossible. Your both points in context of my previous reply are invalid.
This is really clever. I'd love to see the web shift to a decentralized model like this. I don't know enough about bitcoin to understand how this would perform under load. I'm assuming that bitcoin scales the same way that any p2p network scales? So the more requests there are for a resource, the more peers that are serving up that resource?
Especially in jurisdictions that criminalize, or are considering criminalizing (see: the EU), serving links to illegal content. Surprise, because someone put a torrent hash into the chain, it's illegal to mine or own Bitcoin.
Although from the source, it looks like this is really dependent on "https://blockexplorer.com/api/txs/?address=' + CONFIG.btcAddress", so still has an obvious PoF until the browser can speak BTC.
While i love Zeronet, this can run in Chrome and Firefox (possibly others?) without a "complicated" program you have to download and run, and learn the interface of. (I don't think its complicated to use but, the average non-techie person understandably would)
Edit:
Now that I think about it more, I'm a little confused about how this "decentralizes" anything, because the page is still required to get the bitcoin address in the first place? What prevents someone from seizing a domain or webserver and modifying this particular bitcoin address, other than the work involved? Can anyone familiar with IPFS speak to similarities or differences?