What is a DWA (Decentralized Web App)?
Published: 2023-06-18 19:15:22

## Introduction



![Bootlegged DWA logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lpuechibck30335os55e.png)

Dentralized Web Apps are a new classification of web apps that are differentiated by their access to a standardized local server, which provides networking capabilities via WebSocket signaling for the establishment of RTC peer-to-peer connections.

That's pretty technical, so let's break it down a bit and offer some concrete examples of how this technology is transformative.

## Prerequisites


![DCNT-compatible badge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmwom9kqtqw2nvukpa16.png)


To begin with, DWAs have an existential dependency on a running local implementation of a DCNT server. DCNT servers can run on mobile devices, desktops, or anything in between, so DWAs are inherently cross-platform. If you'd like to learn more about the [DCNT protocol](https://github.com/futurehood/DCNT), or server implementations, check out the links. 

From here, this article will presume a basic understanding of what a DCNT server is.

![hr](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wa6k7hjftacioprrwij.png)


## Overview

So, with that out of the way, let's proceed. What exactly does a DWA do differently from normal web apps? How do these networking capabilities work?

Not just any app can be considerd a DWA, just like there are certain requirements that must be met in order for an app to qualify as a PWA, DWAs too have conditions that must be met for an app to be considered a DWA. 

While there's a bit more to it than this, in simple terms, all DWAs share one common intrinsic trait:

<blockquote>
When executing in the browser, a DWA will establish a WebSocket connection to a locally running DCNT server, which allows the DWA to receive proxied requests from the networks that the server is listening on. At this point, the DWA will register application protocols with the DCNT server. When a remote connection to the DCNT server registers compatible application protocols, the DCNT server will proxy messages to the DWA that is connected locally, and an RTC connection can be signaled to establish a peer-to-peer network without the assistance of any third parties.
</blockquote>


![Anatomy of a DCNT-powered P2P network](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d1h9xlm9f6ioxwk6z77j.png)

DWAs are also differentiated by the fact that they're able to be installed locally and served up in an SSL/TLS context by the local DNCT server. This means they can operate on either private or public networks and also have offline access as long as the server is running, even without internet access. This serves to put the end-user in complete control of the code that's executing to provide their experience. DWAs can technically be served from traditional public servers as well if necessary, though deploying applications this way is discouraged.


Now that it's more clear how DWAs differentiate from other web apps, let's examine the additional DWA features that are provided by the architecture:

![hr](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wa6k7hjftacioprrwij.png)

## Interoperable

DWAs feature interoperability between applications out-of-the box. Different DWAs that correctly implement shared application protocols just work together, without configuration or any headaches. What this means is that, for example, users can not only communicate across different applications extremely easily, they're also able to jump between different applications that use the same protocols themselves just as easily.

![hr](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wa6k7hjftacioprrwij.png)

## Infrastructureless

DWAs are infrastructureless. This is transformative, as it allows developers to create sophisticated peer-to-peer networks and distributed systems that will run in any modern browser and have no other dependencies outside of a DCNT server implementation.

DWAs can be used to build communications apps, social networks, multiplayer games, even file-sharing networks, that have no infrastructure requirements and operate anywhere. DWAs remove every single cost-prohibitive aspect of deployment for many classes of application.

![hr](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wa6k7hjftacioprrwij.png)

## Private and Secure

In addition to offering tremendous advantages to web app operators, DWAs simultaneously solve many of the problems that plague contemporary internet users. DWAs bring exteremely powerful security and privacy implications to the table. DWAs offer the strongest consumer-grade privacy available today. This is accomplished, first and foremost, by removing third parties from the picture entirely. The idea behind this is dead simple, prevent eavesdropping by preventing the opportunity altogether.

Aside from providing direct connections to other devices, DWAs also feature the same industry-standard levels of security that users have come to expect from browsers, because everything happens in a browser. Every connection is wrapped by SSL/TLS using modern standards and completely private.

Peer-to-peer networks properly established by DWAs are completely undetectable, which of course means that they are also uncensorable, unblockable, and cannot be surveilled. There is no way to prevent DWA connections without crippling extremely common functionality network-wide.


![Escape Babylon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gf34k3nz8xe2rk5aum54.png)

The only theoretical weakness in DWA security is the ISP/datacenter metadata that is created when two endpoints connect, though this problem can be largely mitigated for most users by employing a VPN or other secure tunneling software (like CloudFlare Tunnel) in front of their DCNT server, which is highly recommended.


![hr](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wa6k7hjftacioprrwij.png)


## Get Ready

Between these three paradigm-shifting benefits over traditional online experiences, it's easy to see why DWAs have a very bright future!