Page 38 - MSDN Magazine, July 2018
P. 38
Blockchain as a Service
Blockchain on Azure (bit.ly/2rQUO5q) provides a rapid, low-cost, low-risk platform for building and deploying blockchain appli- cations. Azure, basically, offers Blockchain as a Service (BaaS), by providing several easy-to-deploy, enterprise-ready templates for the most popular ledgers, including Ethereum, Quorum, Hyper- ledger Fabric, Corda and more.
Azure Blockchain provides a rapid, low-cost, low-risk platform for building and deploying blockchain applications.
Enough with the sales pitch, let’s investigate some key capabilities of Azure BaaS, before diving into the configuration of a specific ledger in the Azure portal. Azure Blockchain consists of:
• Single-node ledgers to simulate production for multiple divisions within a single organization.
• Multi-node ledgers to simulate production for multiple divisions within multiple organizations.
• Tools for development of decentralized applications distrib- uted on a blockchain.
Decentralized applications (dApps) are applications that run on a peer-to-peer network of computers rather than a single computer. In blockchain context, think of a dApp as a client application that communicates to a smart contract for interacting with the blockchain network. A good introduction to dApps can be found on BlockchainHub at bit.ly/2rRkijj.
The key characteristics of building a blockchain infrastructure in Azure are:
• Establish a secure environment that exposes protected end- points. This can be done via Azure Virtual Networks, Azure App Services VNet Integration or Network Security Groups.
• Develop smart contracts, using any of the available development tools, such as Blockstack Core, Ethereum Studio or Truffle. • Automate deployment of participant components, both virtual
machines and Platform-as-a-Service components. This can be enabled by Azure Resource Manager and PowerShell scripts.
• Protect access to data and logic, with user-level authenti- cation and authorization, by implementing Azure AD to secure apps and APIs.
• In general, build an architecture for enterprise solution integration with a blockchain ledger, leveraging Azure enterprise capabilities and worldwide distribution.
Azure BaaS, in a nutshell, represents not just a public cloud host- ing provider for distributed ledgers, but an organic and integrated platform for building and delivering decentralized applications that run on a blockchain technology. Figure 3 illustrates the platform architecture.
Now let’s explore the digital ledger provisioning capabilities of Azure BaaS. First, I need to access Azure portal (portal.azure.com) and create a new service from the Azure Marketplace | Blockchain section. I can select from several digital ledger technologies—in this case I’ll create an Ethereum Consortium multi-node ledger— and quickly provision my blockchain network in Azure.
Ethereum Consortium
The Ethereum Consortium template deploys an Ethereum multi- member network, consisting of a set of mining nodes and transaction nodes. Provisioning can take up to 20 minutes, depending on the size of the network, at which point I can configure additional Ethereum accounts and get started with smart contract and dApp development through the administrator Web page.
The provisioning process guides you through five steps to enter the necessary configuration settings for provisioning the Ethereum ledger in Azure:
Step 1: Configure basic settings, which include a Resource prefix for naming all the generated Azure resources provisioned in the assigned Resource group, authentication credentials as admin of all the deployed virtual machines and the Azure region of deployment.
The Ethereum Consortium template in Azure Blockchain consists of a set of mining nodes and transaction nodes that can deployed in minutes.
Step 2: Address network size and performance. You may want to specify the number of members in the consortium (up to 12), the num- ber of mining nodes per member (mining nodes record transactions within a blockchain network), storage replication (locally redundant or geo-redundant) and performance. You can also set the number of load-balanced transaction nodes, which represents the point of interaction of users or applications with the deployed blockchain.
Step 3: This step is specific to Ethereum nodes. I can specify the Ethereum Network ID, a unique value that identifies the net- work and will be used by nodes to peer with each other. Also, I can specify how the first block, called Genesis, will be generated,
Microsoft Azure
Secrets, Control & Configuration
Azure-Azure Stack
API (Message-Based)
Blockchains/Distributed Ledgers
Runtime Environment Services
Transaction Builder & Router
Anywhere
Figure 3 Azure Blockchain-as-a-Service Stack 32 msdn magazine