Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

3,600 views

Published on

-- This presentation was made during Serverless Summit 2017 - www.inserverless.com --

In the next wave of developing serverless apps we will need a secure, auditable and persistent store that complements the rich features provided by serverless code and hence the discussion around Blockchain. In this session we will discuss how quickly and easily we will be able to build Blockchain networks on Azure to be utilized as data stores for your serverless apps. We will also discuss the vision and offerings of Microsoft in the Blockchain space to make it more enterprise grade and production ready.

Published in: Software
  • Be the first to comment

Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

  1. 1. Blockchain – Apt data store for serverless apps
  2. 2. What is blockchain?
  3. 3. 3 Secure Shared Distributed Ledger Blockchain is a secure, shared, distributed ledger
  4. 4. 4 That decentralizes data in a trustless environment Traditional System Centralized system with stored ledger Blockchain System Distributed system with distributed ledger § Traditional ledgers are centralized and use 3rd parties and middlemen to approve and record transactions § Blockchain safely distributes ledgers across the entire network and does not require any middleman § The technology maintains multiple replicas like p2p torrent file sharing
  5. 5. 5 Decentralization has great benefits & changes fundamental processes & models Eliminates Intermediaries Reduces Fraud Increases Efficiency and Speed Increases Revenue and Savings
  6. 6. 6 And it will disrupt multiple industries Retail & Manufacturing Financial Healthcare Government
  7. 7. 7 Example scenarios in the financial industry Trade settlement Trade finance
  8. 8. 8 How does it work?
  9. 9. 9 Ledger: Blockchain uses a distributed ledger to track transactions § A ledger is a write only database most commonly used in accounting § The digital distributed ledger creates the same copy of the data across all the participating nodes § All new transactions are digitally signed and then broadcast across the blockchain network to be added to the system § Participants in the blockchain verify the transaction is valid and then writes it to the ledger § This is the technology originally designed to power the bitcoin currency Entire network has same ledger FROM TO PROPERTY VALUE Alex Katie Payment $500 Jim Sally Payment $300 Alex Garth Asset Car Katie Tony Payment $100 Molly Paula Message I love you Example ledger
  10. 10. 10 Example: Blockchain to track financial transactions In this example, Alex wants to send Katie $500 via a financial transaction blockchain system Alex Katie Payment $500 Transaction (Tx) From: Alex (0xf5e…) To: Katie (0x992…) Amount: 500 Digital signature 0x23e423s3234… Transaction information goes through hash functions Tx Signature Tx Signature Tx Signature Tx SignatureTx Signature Tx Signature Tx Signature Confirmed transaction gets pushed to network
  11. 11. 11 More complex example: Blockchain to track assets § In this example, a smartphone and all of its components are captured in a blockchain system used to track products § A unique identifier for the smartphone is created based on all the parts of the smartphone § This unique identifier for the smartphone can be used to track that unique item within a blockchain Digests of Parts Smartphone Digest All parts get a hash (digest) based on product serial number + manufacturer All digests of parts are combined into one unique digest for the phone
  12. 12. 12 Blockchain evolving from simple ledgers, to cryptlets that fetch trusted and agreed-upon external data needed to execute Smart Contracts Smart Contracts are unable to access external data or events based on time or market conditions. Calling code or data outside of a Smart Contract or blockchain breaks the general trust barrier and authenticity of transactions. Cryptlets will allow the blockchain to access external data securely, while maintaining the integrity of the blockchain. Microsoft Innovation
  13. 13. 13 Blockchain 3.0, Project “Bletchley,” extends the power of blockchain through state-of-the-art “cryptlets” innovation § Blockchain 2.0 introduced the power of Smart Contracts… § …but Smart Contracts are unable to access external data or events based on time or market conditions ₋ Calling code or data outside of a Smart Contract or blockchain breaks the general trust barrier and authenticity of transactions § Cryptlets will allow the blockchain to access external data securely, while maintaining the integrity of the blockchain § Cryptlets are a Microsoft innovation and solve a significant hurdle to enterprise blockchain adoption Property 0x117292138928 edc23dc21323c Value 0x893423022ef8s92d1 223412dds321ac Property 0x117292138928 edc23dc21323c Value 0x893423022ef8s92d1 223412dds321ac Code Contract accountRegistry(mapping (string=> address) accountMap; function accountRegistry()(… Property 0x117292138928 edc23dc21323c Value 0x893423022ef8s92d1 223412dds321ac Code Contract accountRegistry(mapping (string=> address) accountMap; function accountRegistry()(… Interest Rate 0x132945934528 asf0439dsa3x
  14. 14. Demo: Using Blockchain in Real Estate Transactions
  15. 15. 15 Buying a home takes weeks & includes large, unnecessary fees Multiple parts of the process can be improved using blockchain: § Home title transfer § Escrow account management § Loan process 1. Buyer looks for a home 5. Buyer owns home 2. Negotiate terms with seller 3. Secure loan from bank 4. Escrow management
  16. 16. 16 Title transfer can be reduced from weeks to minutes Currently, in order to transfer a home title from a seller to a buyer the following steps need to take place: § Title company/officer conducts title search for seller’s home § Conveyancer creates a legally binding real estate deed § Title company/officer files the deed with the county recorder's office (government) The current process takes several weeks. Blockchain seeks to reduce this process to minutes. Central government home title repository Traditional System Public Blockchain System Public home title repository
  17. 17. 17 Escrow time & costs can be reduced or eliminated § The buyer puts money into an escrow account until the conditions of the sale are satisfied, at which point payment is made to the seller ₋ The conditions are obligations that must be fulfilled, such as passing an inspection § Escrow companies usually charge .2% of purchase price and can take several days to process paperwork. With blockchain, this charge can be significantly reduced and process time can be reduced to minutes § Smart Contracts make it possible to codify real estate escrow terms Make payment to seller if the following terms are met: • House inspection results in no issues • Both buyer and seller agree on sale Otherwise terminate contract if terms are not met or if time period exceeds 45 days Consortium Blockchain System Decentralized consortium of banks/lenders Smart Contract part of blockchain
  18. 18. 18 Business Logic Bank Property Registry Sale happens Seller approvesBuyer approves Send contract property Send contract money Buyer Seller Approve or reject Inspector Supporting contracts Escrow contract Metadata
  19. 19. 19 Architecture § Two servers – mining is computationally intensive, so it is done on a different VM § Keys are stored and managed on the client geth node § State of smart contracts is replicated to local database for quick retrieval – updates occur due to contract events § Geth backend can be swapped for a private network with an arbitrary number of nodes once ARM templating work is done Client geth node Node.js Web Server Server 1 Client Mining geth node Server 2 MongoDB (local state)
  20. 20. 20 How does Microsoft play?
  21. 21. 21 Tenets of our Strategy FAIL FAST & CHEAP MIX & MATCH CREATE & INNOVATE SHARE SOLUTIONS PROVISION
  22. 22. 22 Microsoft will execute on its strategy in three steps: Learning from POCs, growing the ecosystem, and building key middleware POCs HealthcareRetail & CPG GovernmentDiscrete Manufacturing Banking, Capital Markets Distributed Ledger Stacks Azure Horizontal SaaS & Adapters 3rd Part y 3rd Party 3rd Party DL stack A 1st Party DL Stack 1st Party 3rd Party Blockchain Virtual Machine Adapters Smart Contract-based UTXO + others MiddlewareBase Platform 3rd Party DL stack B… 3rd Party DL stack C… ….. Industry Solutions Blockchain Resource Provider CryptoDelegate & Cryptlet architecture (secure containers, attestation, etc.) Professional Services & Support Identity & Key Services Crypto Services ML & BI Services Distributed Ledger Gateway Services Blockchain Tools ISVs & Customers Blockchain Marketplace
  23. 23. 23 1 – Create a tight feedback loop between POCs & MS engineering to enable quick iterations on our offerings POCs Distributed Ledger Stacks Azure Engineering Blockchain Platform POCs will enable Microsoft to learn quickly, discover customer needs, and galvanize our partners… …influencing BaaS product design and long-term value delivery while saving rework for everyone
  24. 24. 24 2 – Drive partner innovation and scale by providing blockchain tools and pre-configured solutions through our marketplaces § Promote engagement and innovation by onboarding ISVs into Azure Marketplace and AppSource § Enable customers and partners to discover, publish and transact blockchain components and services from smart contracts to complete SaaS offerings Azure Marketplace and AppSource with 3rd party solutions, smart contracts, and other blockchain components cryptlet cryptlet
  25. 25. 25 3 – Build enterprise-ready blockchain middleware § The Blockchain Middleware will provide core services, which will help users create and build on top of blockchains within Azure § The core services can be broken down into the following: ₋ Identity and Certificate Services – Helps with authentication, authorization, access, and lifecycle management. ₋ Encryption Services – Provides encryption for blockchain transactions and fields ₋ Cryptlet Services – Provides runtime for cryptlets and communication between blockchain and cryptlet trusted host ₋ Blockchain Gateway Services – Provides communication between multiple blockchains ₋ Data Services – Rich data services, such as analytics, auditing, and machine learning ₋ Management and Operations – Tools for deployment and management POCs HealthcareRetail & CPG GovernmentDiscrete Manufacturing Banking, Capital Markets Distributed Ledger Stacks Azure Horizontal SaaS & Adapters 3rd Part y 3rd Party 3rd Party DL stack A 1st Party DL Stack 1st Party 3rd Party Blockchain Virtual Machine Adapters Smart Contract-based UTXO + others MiddlewareBase Platform 3rd Party DL stack B… 3rd Party DL stack C… ….. Industry Solutions Blockchain Resource Provider CryptoDelegate & Cryptlet architecture (secure containers, attestation, etc.) Professional Services & Support Identity & Key Services Crypto Services ML & BI Services Distributed Ledger Gateway Services
  26. 26. 26 We’vedeliveredanopen,broad,andflexible cloudacrossthestack Applications Management Clients Web App Gallery Dozens of .NET & PHP CMS and Web apps Infrastructure Databases App Frameworks SQL Server +Hundreds of community supported images on VM Depot Azure BaaS Hyper Scale Enterprise Grade Hybrid Microsoft Azure | An Open Cloud
  27. 27. 27 How do partners get started?
  28. 28. 28 SIGN UP FOR AN AZURE ACCOUNT • https://azure.microsoft.com/en-us/solutions/blockchain/ SETUP BLOCKCHAIN NETWORK ON AZURE • Create your custom private/consortium network https://azure.microsoft.com/en-us/documentation/templates/ DEPLOY DEV/TEST BLOCKCHAIN ENVIRONMENT TO LEARN • Marketplace Offerings: https://azure.microsoft.com/en- us/marketplace/?term=blockchain • Azure Quickstart Templates: https://github.com/Azure/azure-quickstart-templates How do you get started? START BUILDING OUT SCENARIOS AND APPS Develop your own Smart Contracts and Dapps using Visual Studio Solidity Extension: https://visualstudiogallery.msdn.microsoft.com/96221853-33c4-4531- bdd5-d2ea5acc4799/
  29. 29. 29 Appendix
  30. 30. 30 And is based on cryptographic one-way hash functions § All digital media, including transactions and owners, are protected via digital signatures and hashes § Digital signatures and hashes are created by cryptographic one-way hash functions (i.e. mathematical function that creates a unique output based on specific input with no way of deriving the input from the output) § Digital signatures and hashes allow blockchains to remain secure while being distributed Digital signature 0x23e423s3234… Cryptographic One-Way Hash Product serial number + manufacturer
  31. 31. 31 Each transaction has a unique digital signature § At the core of a blockchain is the ledger, which represents the history of transaction data § A transaction is an exchange of a digital asset from one account to another § Transactions between parties are broadcast to the blockchain network. Those transactions are then appended to the ledger § Each transaction message, in addition to the digital asset and the accounts, has a unique digital signature, which ensures the authenticity of the message and that it originated from the right account § Private keys are used to create signatures while public keys are used to verify signatures § The unique digital signature ensures no node within the blockchain can modify the transaction message
  32. 32. 32 Blockchains create a transaction chain that maintains the history of ownership of an asset § The ledger itself does not keep track of digital asset account balances, it simply records transactions § Instead of balances, ownership of digital assets is verified by links to previous transactions, using the immutable history inherently available in a blockchain solution § For example. For Alex to send $500 to Katie, he must reference previous transactions where he has received $500 or more to prove that he, indeed, has that much money to send. These reference transactions are called previous input transactions. The current transaction(s) is called output transaction(s) § Validity of each transaction is based on the validity of previous transactions, which is shared. FROM TO PROPERTY VALUE Alex Katie Payment $500 Transaction From: Alex (0xf5e…) To: Katie (0x992…) Amount: 500 Inputs: 0x56e…, 0x987… Digital signature 0x23e423s3234… Transaction From: Garth (0xas2…) To: Alex (0xf5e…) Amount: 200 Inputs: 0xtd6…, 0xj7d… Digital signature 0x56e… Transaction From: Sally (0xkj5…) To: Alex (0xf5e…) Amount: 300 Inputs: 0xkf7…, 0x9dh… Digital signature 0x987… Previous transactions Current transaction
  33. 33. 33 Transactions are connected within a chain of blocks § Transactions are grouped together in blocks. These blocks represent the order of transactions § Blocks are linked to previous blocks, which make the blockchain § The transaction chain tracks how ownership changes, while the block chain tracks the order of transactions § Transactions within the same block are considered to occur at the same time Block 0 (0x23e…) Transaction 1 Transaction 2 Transaction 3 Confirmed new block Block 1 (0x5ef…) Transaction 4 Transaction 5 Transaction 6 Previous Block 0x23e… Block 1 (0x976…) Transaction 7 Transaction 8 Transaction 9 Previous Block 0x5ef…
  34. 34. 34 Consensus is used to add blocks to the blockchain § Transactions not yet placed in blocks are called unconfirmed or unordered transactions § Blockchain uses a consensus mechanism to determine the next block. This consensus mechanism ensures trust and accountability instead of a middleman § There are several types of consensus mechanisms, such as Proof of Work and Proof of Stake ₋ The act of producing a proof is called mining § Proof of Work is used in Blockchain 1.0. It relies on the difficulty of solving a mathematical problem. Producing a proof of work can be a random process with low probability so that a lot of trial and error is needed before coming to a solution § Proof of Stake is used in Blockchain 2.0 and is an alternative to Proof of Work. Instead of relying on power-intensive work, Proof of Stake relies on ownership of digital asset. In other words, a node owning 1% of digital assets can mine 1% of the blocks § Once transactions are confirmed via a consensus mechanism, the information is stored in a new block
  35. 35. 35 Build enterprise-ready blockchain middleware HealthcareRetail & CPG GovernmentDiscrete Manufacturing Banking, Capital Markets Media Distributed Ledger Stacks Azure Horizontal SaaS & Adapters 3rd Party 3rd Party 3rd Party DL stack A 1st Party DL Stack 1st Party 3rd Party Blockchain Virtual Machine Adapters Smart Contract-based UTXO-based or other Middleware TierBase Platform Tier 3rd Party DL stack B… 3rd Party DL stack C… ….. Industry Solutions Blockchain Resource Provider CryptoDelegate and Cryptlet architecture (secure containers, attestation, etc.) Professional Services & Support Identity & Key Services Crypto Services ML & BI Services Distributed Ledger Gateway Services § The Blockchain Middleware will provide core services, which will help users create and build on top of blockchains within Azure § The core services can be broken down into the following: ₋ Identity and Certificate Services – Helps with authentication, authorization, access, and lifecycle management. ₋ Encryption Services – Provides encryption for blockchain transactions and fields ₋ Cryptlet Services – Provides runtime for cryptlets and communication between blockchain and cryptlet trusted host ₋ Blockchain Gateway Services – Provides communication between multiple blockchains ₋ Data Services – Rich data services, such as analytics, auditing, and machine learning ₋ Management and Operations – Tools for deployment and management

×