Blockchains and Azure

Lauri Peltonen | 25.02.2021
Reading time 5 min

This is the first post of a new blog series called Blockchains and Azure. The aim of this series is to:
– Deep dive into Azure’s blockchain services
– Go through blockchains in general: what are they and how do they work
– Look into what business opportunities blockchains offer (also beyond Azure’s blockchain services)

Now, the general topic of this blog series is not an easy one to tackle, but I will try my best to guide you gently to the wonderful world of blockchains. My personal background is mostly with Azure, but as a hobby I’ve done (Ethereum public) blockchain development for three years now – so I have a pretty good idea about, at least, some parts of the blockchain world.

Azure blockchain offering

For this first blog post, I will look into Azure’s blockchain offering, and especially Azure Blockchain Workbench.

If you look at Blockchain offering in Azure Marketplace, the results can be roughly divided into three groups:
1) Apps provided by Microsoft
2) Apps provided by partners
3) Consulting services provided by partners

The consulting services are mostly introductions to blockchain and various proof-of-concept projects. The apps provided by partners vary a lot: client software (node) for various blockchains, ready blockchain solutions, and various development environments.

What I find most interesting are the apps provided by Microsoft. There are essentially two meaningful ones: Azure Blockchain Workbench and Hyperledger Fabric on AKS. These are both different blockchain frameworks. Hyperledger Fabric is a modular blockchain framework, while Azure Blockchain Workbench is a comprehensive suite of services used to work with a blockchain.

Azure Blockchain Workbench

Azure Blockchain Workbench is a framework to help in developing and deploying blockchain applications.

Azure Workbench architecture

When creating a new Workbench, Azure Portal suggests you create an Azure Blockchain Service as the blockchain, but you can also connect to an existing blockchain. Azure Blockchain Service includes a consortium blockchain (Ethereum Quorum) which is meant for businesses.

With Workbench, visibility into the actual underlying blockchain is a bit limited. For this, you can use an external blockchain explorer. I tried the recommended explorer from Epirus and it seems to be working fine. It provides quite basic functionality, such as blocks, transactions, and contracts.

Epirus blockchain explorer
Epirus blockchain explorer

At its easiest, you can think of the Workbench (with a blockchain) as a state machine: there exist a finite number of states and the machine is always in one of those states. The state can be changed by a user or a service. All state-changing actions need to be performed by an authorized entity and access control is handled by Azure Active Directory.

However, a state machine is only the easiest use case. Blockchains can be used for a lot of other stuff as well. Valid use cases depend on the blockchain type and the chosen architecture. I’m hoping to write a separate blog post about blockchain uses a bit later, so check Zure blogs after a while for new posts or follow us on social media where we will always inform about new blogs.

Workbench integrations

The Workbench is a rather complicated entity, but it especially excels in its various integrations. The Workbench provides at least the following integration points to read or write data into the blockchain:
– IoT Hub: various IoT devices
– Gateway Service API: regular apps, such as web apps on App Service
– Event Grid: react to events / publish events
– Web App: Web UI for manual interaction

Web UI for Workbench
Web UI for Workbench

Furthermore, if you’re feeling adventurous, you can tap into any of the internal structures to input or output data. Typically there shouldn’t be a need for this.

Workbench pricing: 200€ / month

Usually, the first thing I’m interested in, with any service, is its price. Unfortunately, there is no explicit price stated for the Workbench. Its description simply states that its price is an aggregate of the cost of the underlying Azure services.

When creating a Workbench there are not many variables that would affect the price. The only ones I can think of are:
– Azure region. Price between different regions may vary a bit
– Used VM size. The Workbench uses internally a few VMs
– If including a new blockchain service: its pricing tier (Basic / Standard)

Once the Workbench is up and running you can add more nodes (VMs) to the blockchain, which naturally raises the costs.

I deployed the Workbench with a new Blockchain Service, to have something to play around with. Then I was also able to check the actual cost in Cost Management. Currently, it looks like the monthly cost is around 200 €. This is with the most basic settings: VM Standard_DS1_v2, North Europe, Basic Blockchain Service with no extra nodes. However, you can cut the costs in half by simply lowering the default App Service tiers – assuming you don’t have much use.

Cost for a 2-week period
Cost for a 2-week period

The most basic setup is not sufficient for production use, mostly because it only has 1 node inputting data into the blockchain. A blockchain with a single node is rather useless – blockchains are meant for multiple parties to input data, possibly simultaneously.

Final thoughts

The Workbench is useful if you want to try out a blockchain in Azure. Its integrations are also useful when you want to integrate a blockchain into an external system.

Unfortunately, just creating a Workbench is not really enough to start using blockchains for business use. You first have to understand a bit how blockchains work and what they can be used for. So stay tuned for the next part of this series, where I go into blockchain details.