Machu Picchu: The Blockchain for a System Architect or an IT executive

Khang Vu Tien
6 min readDec 20, 2020

--

Photo by Thomas Park on Unsplash

A blockchain-based architecture is not so much different from a good old client-server architecture.

Are you curious about how the blockchain is changing the way IT systems are designed? If you are an IT executive, or IT sales manager or IT system architect and if you are ready to consider doing some coding to better understand the big picture, this article is for you. No coding skills required.

This article comes from my recent experience of contributing in Machu Picchu. Machu Picchu is a collaborative open-source initiative. It aims to use the Ethereum blockchain to share “Data as a Public Service” among all the organizations who provide support and benefits to the persons-in-need. The business model is explained here: https://youtu.be/9fWTD8gf-Us?t=189. Machu Picchu started last September 2020 and we won a prize in the ETH Online hackathon of October 2020.

Development continues. In December 2020, the very first demo version 0.0 of Machu Picchu using the blockchain was deployed, running locally. A video of how it looks like can be watched here: https://youtu.be/E93rj6_PXfU

This experience comforted my gut feeling that the blockchain can change significatively the way NGOs and caritative organisation can use IT. It is more scalable, more secure and less expensive to operate than legacy IT systems.

More generally it will change how all corporate IT systems will be designed and built.

From the user point of view

You are an executive, so you are more interested in the user experience of the customer than in the hashes of a block and in crypto keys 🙂. Let’s take the example of Facebook that is the most widespread Web2 application. This Facebook user experience, a client requesting information from a server, is shared by more than a billion of persons:

From the user point of view, using a blockchain-powered Web3 application will be the same: use a client to request information from- or submit a transaction to a node.

From the system architect’s point of view

From a system architecture point of view, the current Web2 client-server application has a familiar presentation:

  • the server is duplicated in a number of instances, spread worldwide and connected by a high-speed and reliable network;
  • a load balancer routes user sessions and balances requests workload between the servers;
  • a back-up and restore system guarantees business continuity.

The system designer’s would add to this same Web2 application the Access Provider, the Content Distribution Network:

For the system architect, a Web3 application would present a similar architecture:

  • each blockchain node is a full copy of a backend server
  • a distributed protocol takes care of maintaining consistency, availability and partition tolerance among the nodes.

Differences brought by the blockchain

The details of coding may differ, but a classical system architect should feel quite comfortable designing a blockchain-based system. There are however a few subtle implementation differences:

  • the business continuity is built-in: each node is by construction a back-up of the whole system and can automatically take over any other node, by nature of the blockchain protocol;
  • as opposed to legacy systems that favor consistency, in a blockchain design the availability and the partition tolerance most often take priority over the consistency, in such blockchains the latter is achieved in a non-deterministic way;
  • the addressing scheme is no more fixed: requests for transaction don’t go to a single IP address but are broadcast to all nodes and then one node among all –the “miner”– takes care of validating the transaction and including it immutably in one of the blocks of the chain.

The developer’s journey

You are a system architect or an IT executive. You want to explore the peculiarities and specifics of the blockchain by doing some coding. You may want to start with Ethereum because this is the one with the largest community of developers, who can handhold any beginner coder. Most of questions and puzzles have their answers here: https://ethereum.stackexchange.com/

There are a few coding skills to learn. Fortunately the purpose is not to master each skill, but to only be familiar enough. The parallel is striking with civil construction: the architect needs not be an expert plumber, expert electrician, expert mason etc. The architect needs only to know the principles, the state-of-the-art tooling and the limitations of each domain of skill.

I’ve gone this path with Ethereum and I can assure you that within 3–4 months you will be familiar enough with the coding to be able to design with confidence a blockchain-based system. Here is a typical journey to get familiarized with blockchain implementation:

  1. To develop a web app, you need to get familiar with the basics of HTML, CSS and a front-end framework. The discussion about the compared virtues of React, Angular, Vue may be relevant for a developer but is less for a system architect. The same holds for the debate between JavaScript, Python or other languages. Personally I have chosen React and JavaScript.
  2. To interface with the Ethereum blockchain API, `truffle` is the javaScript toolset of choice. To connect to the frontend you have the choice between 2 libraries `web3.js` or `ethers.js`. Personally I used `web3.js`.
  3. To integrate, deploy and test your distributed application all the above tools, you need to get yourself familiar with Node.js library manager `npm`. Some may argue for `yarn`. Both are fine.
  4. Last but not least, you need to code the fundamental backend blockchain logic using solidity, the preferred language in Ethereum. The most straightforward development tools to use are the combination Remix IDE + `truffle`.

Teaser, to conclude

In a coming series of articles, I’ll present you the React frontend framework, from the point of view of a system architect. As with many coding frameworks, you may find on Internet a lot of literature and videos explaining the tricks and subtleties of React (here is for example a 10-hour training video: https://www.youtube.com/watch?v=4UZrsTqkcW4). In my future article, I plan to only present what a system architect needs to know of React to start doing some code. It will be much shorter and more synthetic.

As a teaser, here is my blockchain coding tooling and workflow. Stay tuned.

--

--

Khang Vu Tien
Khang Vu Tien

Written by Khang Vu Tien

Machu Picchu — Data as a Public Service

No responses yet