Where does Blockchain fit into the web stack?

A “stack”, as used in software development, can be defined as a combination of technologies that work well together to create full-fletched applications. In this article, I share my view of where blockchain technology can fit into this concept and what it is still missing.

Why do developers care about stacks?

Making applications is difficult. Even if we ignore all the design and marketing work going into successful apps, there are many layers of technology that have to be combined to be able to offer an integrated user experience.

With traditional web applications, the user’s first point of interaction is their browser. It displays a webpage using frontend technologies such as HTML, Javascript, CSS, all of which may use their own set of frameworks and conventions. Pages are delivered from HTTP servers. The server may compute the response dynamically by executing a backend program, which often connects to a database. And of course, all these programs don’t run on bare-metal CPUs, but on operating systems that abstract away countless things, like the TCP/IP connection. This is of course just a broad overview — if you want more detail, check out What happens when you type google.com into your browser’s address box and press enter?

As you can imagine, it can be pretty difficult to mix-and-match so many technologies. That’s why web developers usually follow best practices and sets of recommended stacks that are known to fit together well. One stack that used to be very common is the LAMP stack (Linux, Apache, MySQL, PHP). In the early 2010s, the MEAN (MongoDB, Express.js, Angular, Node.js) gained some popularity. Recently, the JAMstack has become a new contender, shifting the focus more towards frontend technologies.

Where does Blockchain fit into the web stack?

In essence, a blockchain is a distributed database with custom business logic and an API, so it seems very close to the backend. In fact, the decentralized web’s longterm vision is that technology like blockchain can replace traditional single-server backends altogether.

On the other hand, Blockchain has some characteristics that are usually found on the frontend layer: it runs everywhere, is easy to distribute and scale, and is inherently transparent. Just as everyone can “view source” of a Javascript+HTML application, you can view the source of a smart contract and its data.

That’s why I see blockchain as somewhere in between traditional backends and frontends. Moving to blockchain technology is a transition away from closed to more open backends. For that, we must either cover or integrate the functionality of existing stacks. And even if blockchain may eventually fail to replace all backends, it can act as an intermediate layer, increasing trust and reliability.

Challenges of Blockchain backends

Compared to traditional backends written in languages such as PHP, Python, Ruby, or Java, blockchains in 2019 are sadly still lacking most of the frameworks and APIs that web developers have grown to expect.

We are still missing good solutions for things like testing and debugging, application-level APIs such as authentication, fetching and synchronizing data, and continuous deployments, just to name a few. Traditional web applications often rely on technology such as REST APIs, OAuth, and sessions, none of which are available on a blockchain.

There are already solutions addressing some of these issues (e.g. Truffle helps with testing and deployment, oracles for interaction with external systems, layer-2 identity protocols), but they are much less mature and standardized than what tools like Django, Ruby on Rails, Spring, or really HTTP itself can offer. In Blockchain, we’re still at the experimentation phase where everybody creates their own solutions.

Can Blockchain become a standard?

Blockchains like Ethereum and Aergo are trying to replace not just the data layer (e.g. MySQL), but also the business logic (PHP), server (Apache), and transport (HTTP). This may be a great value proposition for developers and businesses, but it’s also a very ambitious task.

If Blockchain really is here to stay, I think at least parts of it must evolve into web standards. Luckily, this has already started happening. There is, for example, a W3C working draft for Decentralized Identifiers (DID), a protocol clearly born out of blockchain-related technology but now being elevated into a general standard. I hope we will see many more forays like this.

We as developers and businesses can contribute by either collaborating on these efforts or researching our own solutions and improving the status quo. If we want to be at the forefront of new technology, we have to work with what we got, try to improve it, and make it more accessible to more people. The synthesis of best practices will evolve into a new kind of stack and eventually new standards.

Conclusion

Stacks are an important part of software development. Blockchain must be seen not in a vacuum, but as part of a stack. For Blockchain to succeed, we need much better integration, standards, and best practices. And even if Blockchain-as-we-know-it may eventually fall out of favor, it will have brought upon many innovations for the decentralized web.

Paul Grau is a full-stack developer at Aergo, a hybrid blockchain platform developed from scratch that tries to integrate well with existing systems and offer improved usability for both developers and end-users. Follow him on Twitter.

UX & Frontend engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store