Page 36 - MSDN Magazine, July 2018
P. 36

MICROSOFT AZURE
Decentralized
Applications with Azure
Blockchain as a Service
Stefano Tempesta
Blockchain has captured the attention of the business and technology world as a way to streamline business processes, verify transactions, and reduce the potential for fraud. This article introduces Blockchain as a Service (BaaS) in Microsoft Azure, showing how it can be used to build a secured data structure and create a distributed transactional digital ledger.
There’s plenty of literature on the Internet about blockchain and how it started as a digital ledger for Bitcoin. A good introductory article to what blockchain is can be found at bit.ly/2IsoWeJ, and for a more technical overview on how blockchain works, please refer to Jonathan Waldman’s “Blockchain Fundamentals” article in the March2018issueofMSDNMagazine(msdn.com/magazine/mt845650).
Blockchain is a secure, shared, distributed ledger that can be pub- lic, private or consortium (that is, restricted to named members
only). It’s secure because it uses cryptography to create transactions that are difficult (if not impossible with current computing tech- nology) with which to tamper. Shared among all nodes or peers in the chain is a data store and, as you’ll see shortly, business logic in the form of contracts. A blockchain value is indeed directly linked to the number of entities that participate in them. Critically, block- chain data and contracts are distributed, which means that there are many replicas of the database. And the more replicas there are, the more authentic it becomes. And finally, blockchain is a digital ledger, a transactional database that appends only immutable records of every transaction that occurs.
I’dliketoreinforcethispointaboutblockchainbeingadistributed ledger. Traditional ledgers are centralized and use third-party sys- tems, or middlemen, to approve and record transactions. Think of credit cards, banks, identity management systems and the like. This approach creates a challenge of trust and scale. Do you trust your middleman agent to act as a broker for all your transactions? Can the agent become a single point of failure? Can it be compromised?
In a blockchain, ledgers are distributed across the entire network, and there’s no need for any third-party system to be in the middle of a transaction. The technology maintains multiple replicas of data, as in a peer-to-peer file-sharing system, as each peer obtains a copy of the entire dataset. No one owns the entire thing, but ev- eryone possesses a copy of it. Figure 1 depicts this arrangement.
The first blockchain, Bitcoin, emerged in 2009, with distinct limits. As a digital ledger, it simply records transactions and doesn’t keep
This article discusses:
• Microsoft offerings for blockchain development • Deploying an Ethereum ledger on Azure
• Publishing a Solidity smart contract Technologies discussed:
Azure Blockchain, Ethereum, Solidity
Code download available at:
bit.ly/2INgNEP
30 msdn magazine


































































































   34   35   36   37   38