blockchain - apt store for serverless apps - nasir - serverless summit

35
Blockchain – Apt data store for serverless apps

Upload: codeops-technologies-llp

Post on 23-Jan-2018

1.882 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

Blockchain– Aptdatastoreforserverless apps

Page 2: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

Whatisblockchain?

Page 3: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

3

Secure

Shared

Distributed

Ledger

Blockchain isasecure,shared,distributedledger

Page 4: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

4

Thatdecentralizesdatainatrustlessenvironment

TraditionalSystem

Centralized system with stored ledger

Blockchain System

Distributed system with distributed ledger

§ Traditionalledgersarecentralizedanduse3rd partiesandmiddlementoapproveandrecordtransactions§ Blockchainsafelydistributesledgersacrosstheentirenetworkanddoesnotrequireanymiddleman§ Thetechnologymaintainsmultiplereplicaslikep2ptorrentfilesharing

Page 5: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

5

Decentralizationhasgreatbenefits&changesfundamentalprocesses&models

Eliminates Intermediaries

Reduces Fraud

Increases Efficiency and Speed

Increases Revenue and Savings

Page 6: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

6

Anditwilldisruptmultipleindustries

Retail & Manufacturing

Financial Healthcare Government

Page 7: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

7

Examplescenariosinthefinancialindustry

Trade settlement

Trade finance

Page 8: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

8

Howdoesitwork?

Page 9: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

9

Ledger:Blockchainusesadistributedledgertotracktransactions§ Aledgerisawriteonlydatabasemostcommonlyusedinaccounting§ Thedigitaldistributedledgercreatesthesamecopyofthedataacrossalltheparticipatingnodes§ Allnewtransactionsaredigitallysignedandthenbroadcastacrosstheblockchainnetworktobeaddedtothesystem§ Participantsintheblockchainverifythetransactionisvalidandthenwritesittotheledger§ Thisisthetechnologyoriginallydesignedtopowerthebitcoincurrency

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 Iloveyou

Example ledger

Page 10: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

10

Example:Blockchain totrackfinancialtransactionsInthisexample,AlexwantstosendKatie$500 viaafinancialtransactionblockchain system

Alex Katie Payment $500

Transaction(Tx)From:Alex(0xf5e…)To:Katie (0x992…)Amount: 500

Digitalsignature0x23e423s3234…

Transaction information goes through hash functions

TxSignature

TxSignature

TxSignature

TxSignatureTx

Signature

TxSignature

TxSignature

Confirmed transaction gets pushed to network

Page 11: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

11

Morecomplexexample:Blockchaintotrackassets§ Inthisexample,asmartphoneandallofitscomponentsarecapturedinablockchain systemusedtotrackproducts§ Auniqueidentifierforthesmartphoneiscreatedbasedonallthepartsofthesmartphone§ Thisuniqueidentifierforthesmartphonecanbeusedtotrackthatuniqueitemwithinablockchain

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

Page 12: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

12

Blockchainevolving fromsimpleledgers,tocryptlets thatfetchtrustedandagreed-uponexternaldataneededtoexecuteSmartContracts

SmartContractsareunabletoaccessexternaldataoreventsbasedontimeormarketconditions.CallingcodeordataoutsideofaSmartContractorblockchainbreaksthegeneraltrustbarrierandauthenticityoftransactions.Cryptletswillallowtheblockchaintoaccessexternaldatasecurely,whilemaintainingtheintegrityoftheblockchain.

Microsoft Innovation

Page 13: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

13

Blockchain3.0,Project“Bletchley,”extendsthepowerofblockchainthroughstate-of-the-art“cryptlets”innovation§ Blockchain2.0introducedthepowerofSmartContracts…§ …butSmartContractsareunabletoaccessexternaldataoreventsbasedontimeormarketconditions

₋ CallingcodeordataoutsideofaSmartContractorblockchain breaksthegeneraltrustbarrierandauthenticityoftransactions§ Cryptlets willallowtheblockchaintoaccessexternaldatasecurely,whilemaintainingtheintegrityoftheblockchain§ Cryptlets areaMicrosoftinnovationandsolveasignificanthurdletoenterpriseblockchainadoption

Property0x117292138928edc23dc21323c

Value0x893423022ef8s92d1

223412dds321ac

Property0x117292138928edc23dc21323c

Value0x893423022ef8s92d1

223412dds321ac

CodeContractaccountRegistry(mapping(string=>address)accountMap;functionaccountRegistry()(…

Property0x117292138928edc23dc21323c

Value0x893423022ef8s92d1

223412dds321ac

CodeContractaccountRegistry(mapping(string=>address)accountMap;functionaccountRegistry()(…

InterestRate0x132945934528asf0439dsa3x

Page 14: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

Demo:UsingBlockchain inRealEstateTransactions

Page 15: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

15

Buyingahometakesweeks&includeslarge,unnecessaryfees

Multiplepartsoftheprocesscanbeimprovedusingblockchain:§ Hometitletransfer§ Escrowaccountmanagement§ Loanprocess

1. Buyer looks for a home

5. Buyer owns home

2. Negotiate terms with seller

3. Secure loan from bank

4. Escrow management

Page 16: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

16

TitletransfercanbereducedfromweekstominutesCurrently,inordertotransferahometitlefromasellertoabuyerthefollowingstepsneedtotakeplace:§ Titlecompany/officerconductstitlesearchforseller’shome§ Conveyancercreatesalegallybindingrealestatedeed§ Titlecompany/officerfilesthedeedwiththecountyrecorder'soffice(government)Thecurrentprocesstakesseveralweeks.Blockchain seekstoreducethisprocesstominutes.

Central government home title repository

TraditionalSystem PublicBlockchain System

Public home title repository

Page 17: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

17

Escrowtime&costscanbereducedoreliminated§ Thebuyerputsmoneyintoanescrowaccountuntiltheconditionsofthesalearesatisfied,atwhichpointpaymentismadeto the

seller₋ Theconditionsareobligationsthatmustbefulfilled,suchaspassinganinspection

§ Escrowcompaniesusuallycharge.2%ofpurchasepriceandcantakeseveraldaystoprocesspaperwork.Withblockchain,thischargecanbesignificantlyreducedandprocesstimecanbereducedtominutes

§ SmartContractsmakeitpossibletocodifyrealestateescrowterms

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

ConsortiumBlockchain System

Decentralized consortium of banks/lenders

Smart Contract part of blockchain

Page 18: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

18

BusinessLogic

Bank

PropertyRegistry

Salehappens

SellerapprovesBuyerapproves

Sendcontractproperty

Sendcontractmoney

Buyer SellerApproveor

reject

Inspector

Supportingcontracts Escrowcontract

Metadata

Page 19: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

19

Architecture§ Twoservers– miningiscomputationallyintensive,soitisdoneonadifferentVM§ Keysarestoredandmanagedontheclientgeth node§ Stateofsmartcontractsisreplicatedtolocaldatabaseforquickretrieval– updatesoccurduetocontractevents§ Geth backendcanbeswappedforaprivatenetworkwithanarbitrarynumberofnodesonceARMtemplating workisdone

Clientgethnode

Node.jsWebServer

Server1

Client

Mininggethnode

Server2

MongoDB(localstate)

Page 20: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

20

HowdoesMicrosoftplay?

Page 21: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

21

TenetsofourStrategy

FAILFAST&CHEAP

MIX&MATCH

CREATE&INNOVATE

SHARESOLUTIONS

PROVISION

Page 22: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

22

Microsoftwillexecuteonitsstrategyinthreesteps:LearningfromPOCs,growingtheecosystem,andbuildingkeymiddleware

POCs

HealthcareRetail&CPG GovernmentDiscreteManufacturing

Banking,CapitalMarkets

DistributedLedgerStacks

Azure

Horizontal SaaS&Adapters3rdParty

3rdParty

3rd PartyDLstackA

1st PartyDLStack

1st Party 3rdParty

Blockchain VirtualMachine AdaptersSmartContract-based UTXO+others

Middlew

are

BasePlatfo

rm

3rd PartyDLstackB…

3rd PartyDLstackC…

…..Indu

strySolutions

Blockchain ResourceProvider

CryptoDelegate &Cryptletarchitecture(securecontainers,attestation,etc.)

ProfessionalServices &Support

Identity&KeyServices

CryptoServices

ML&BIServices

DistributedLedgerGatewayServices

BlockchainTools

ISVs&Customers

BlockchainMarketplace

Page 23: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

23

1– CreateatightfeedbackloopbetweenPOCs&MSengineeringtoenablequickiterationsonourofferings

POCs

DistributedLedgerStacks

Azure

Engineering

BlockchainPlatform

POCswillenableMicrosofttolearnquickly,discovercustomerneeds,andgalvanizeourpartners…

…influencingBaaSproductdesignandlong-termvaluedeliverywhilesavingreworkforeveryone

Page 24: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

24

2– Drivepartnerinnovationandscalebyprovidingblockchaintoolsandpre-configuredsolutionsthroughourmarketplaces§ Promote engagementandinnovationbyonboardingISVsintoAzure MarketplaceandAppSource§ Enable customersandpartnerstodiscover,publishandtransactblockchaincomponentsandservices fromsmartcontractsto

complete SaaSofferings

Azure Marketplace and AppSource with 3rd party solutions, smart contracts, and other blockchain components

cryptlet

cryptlet

Page 25: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

25

3– Buildenterprise-readyblockchainmiddleware

§ TheBlockchain Middlewarewillprovidecoreservices,whichwillhelpuserscreateandbuildontopofblockchains withinAzure

§ Thecoreservicescanbebrokendownintothefollowing:₋ IdentityandCertificateServices– Helpswith

authentication,authorization,access,andlifecyclemanagement.

₋ EncryptionServices– Providesencryptionforblockchain transactionsandfields

₋ Cryptlet Services– Providesruntimeforcryptletsandcommunicationbetweenblockchain andcryptlet trustedhost

₋ Blockchain GatewayServices– Providescommunicationbetweenmultipleblockchains

₋ DataServices– Richdataservices,suchasanalytics,auditing,andmachinelearning

₋ ManagementandOperations– Toolsfordeploymentandmanagement

POCs

HealthcareRetail&CPG GovernmentDiscreteManufacturing

Banking,CapitalMarkets

DistributedLedgerStacks

Azure

Horizontal SaaS&Adapters3rdParty

3rdParty

3rd PartyDLstackA

1st PartyDLStack

1st Party 3rdParty

Blockchain VirtualMachine AdaptersSmartContract-based UTXO+others

Middlew

are

BasePlatfo

rm

3rd PartyDLstackB…

3rd PartyDLstackC…

…..Indu

strySolutions

Blockchain ResourceProvider

CryptoDelegate &Cryptletarchitecture(securecontainers,attestation,etc.)

ProfessionalServices &Support

Identity&KeyServices

CryptoServices

ML&BIServices

DistributedLedgerGatewayServices

Page 26: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

26

We’ve delivered an open, broad, and flexible cloud across the stack

Applications Management Clients

Web App Gallery Dozens of .NET & PHP CMS and Web apps

Infrastructure Databases AppFrameworks

SQL Server

+Hundreds of community supported images on VM Depot

AzureBaaS

HyperScale

EnterpriseGrade

Hybrid

MicrosoftAzure|AnOpenCloud

Page 27: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

27

Howdopartnersgetstarted?

Page 28: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

28

SIGNUPFORANAZUREACCOUNT• https://azure.microsoft.com/en-us/solutions/blockchain/

SETUPBLOCKCHAINNETWORKONAZURE• Createyourcustomprivate/consortiumnetworkhttps://azure.microsoft.com/en-us/documentation/templates/

DEPLOYDEV/TESTBLOCKCHAINENVIRONMENTTOLEARN• MarketplaceOfferings:https://azure.microsoft.com/en-

us/marketplace/?term=blockchain• AzureQuickstart Templates:https://github.com/Azure/azure-quickstart-templates

Howdoyougetstarted?

STARTBUILDINGOUTSCENARIOSANDAPPSDevelopyourownSmartContractsandDapps usingVisualStudioSolidityExtension:https://visualstudiogallery.msdn.microsoft.com/96221853-33c4-4531-bdd5-d2ea5acc4799/

Page 29: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

29

Appendix

Page 30: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

30

Andisbasedoncryptographicone-wayhashfunctions

§ Alldigitalmedia,includingtransactionsandowners,areprotectedviadigitalsignaturesand hashes§ Digitalsignaturesand hashes arecreatedbycryptographicone-wayhashfunctions(i.e.mathematicalfunctionthatcreatesaunique

outputbasedonspecificinput withnowayofderivingtheinputfromtheoutput)§ Digitalsignatures andhashesallowblockchains toremainsecurewhilebeingdistributed

Digitalsignature0x23e423s3234…

CryptographicOne-WayHash

Productserialnumber+manufacturer

Page 31: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

31

Eachtransactionhasauniquedigitalsignature

§ Atthecoreofablockchain istheledger,whichrepresentsthehistoryoftransactiondata

§ Atransactionisanexchangeofadigitalassetfromoneaccounttoanother

§ Transactionsbetweenpartiesarebroadcasttotheblockchain network.Thosetransactionsarethenappendedtotheledger

§ Eachtransactionmessage,inadditiontothedigitalassetandtheaccounts,hasauniquedigitalsignature,whichensurestheauthenticityofthemessageandthatitoriginatedfromtherightaccount

§ Privatekeysareusedtocreatesignatureswhilepublickeysareusedtoverifysignatures

§ Theuniquedigitalsignatureensuresnonodewithintheblockchain canmodifythetransactionmessage

Page 32: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

32

Blockchains createatransactionchainthatmaintainsthehistoryofownershipofanasset

§ Theledgeritselfdoesnotkeeptrackofdigitalassetaccountbalances,itsimplyrecordstransactions§ Insteadofbalances,ownershipofdigitalassetsisverifiedbylinkstoprevioustransactions,usingtheimmutablehistoryinherently

availableinablockchainsolution§ Forexample.ForAlextosend$500toKatie,hemustreferenceprevioustransactionswherehehasreceived$500ormoretoprove

thathe,indeed,hasthatmuchmoneytosend.Thesereferencetransactionsarecalledpreviousinputtransactions.Thecurrenttransaction(s)iscalledoutputtransaction(s)

§ Validityofeachtransactionisbasedonthevalidityofprevioustransactions,whichisshared.

FROM TO PROPERTY VALUE

Alex Katie Payment $500

TransactionFrom:Alex(0xf5e…)To:Katie (0x992…)Amount: 500

Inputs:0x56e…,0x987…

Digitalsignature0x23e423s3234…

TransactionFrom:Garth(0xas2…)To:Alex(0xf5e…)Amount: 200

Inputs:0xtd6…,0xj7d…

Digitalsignature0x56e…

TransactionFrom:Sally(0xkj5…)To:Alex(0xf5e…)Amount: 300

Inputs:0xkf7…,0x9dh…

Digitalsignature0x987…

Previous transactionsCurrent transaction

Page 33: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

33

Transactionsareconnectedwithinachainofblocks

§ Transactionsaregroupedtogetherinblocks.Theseblocksrepresenttheorderoftransactions§ Blocksarelinkedtopreviousblocks,whichmaketheblockchain§ Thetransactionchaintrackshowownershipchanges,whiletheblockchaintrackstheorderoftransactions§ Transactionswithinthesameblockareconsideredtooccuratthesametime

Block0(0x23e…)

Transaction1

Transaction2

Transaction3

Confirmed new block

Block1(0x5ef…)

Transaction4

Transaction5

Transaction6

PreviousBlock0x23e…

Block1(0x976…)

Transaction7

Transaction8

Transaction9

PreviousBlock0x5ef…

Page 34: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

34

Consensusisusedtoaddblockstotheblockchain

§ Transactionsnotyetplacedinblocksarecalledunconfirmedorunorderedtransactions

§ Blockchain usesaconsensusmechanismtodeterminethenextblock.Thisconsensusmechanismensurestrustandaccountabilityinsteadofamiddleman

§ Thereareseveraltypesofconsensusmechanisms,suchasProofofWorkandProofofStake

₋ Theactofproducingaproofiscalledmining

§ ProofofWorkisusedinBlockchain 1.0.Itreliesonthedifficultyofsolvingamathematicalproblem.Producingaproofofworkcanbearandomprocesswithlowprobabilitysothatalotoftrialanderrorisneededbeforecomingtoasolution

§ ProofofStakeisusedinBlockchain 2.0andisanalternativetoProofofWork.Insteadofrelyingonpower-intensivework,ProofofStakereliesonownershipofdigitalasset.Inotherwords,anodeowning1%ofdigitalassetscanmine1%oftheblocks

§ Oncetransactionsareconfirmedviaaconsensusmechanism,theinformationisstoredinanewblock

Page 35: Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit

35

Buildenterprise-readyblockchainmiddleware

HealthcareRetail&CPG GovernmentDiscreteManufacturing

Banking,CapitalMarkets

Media

DistributedLedgerStacks

Azure

Horizontal SaaS&Adapters

3rdParty

3rdParty

3rd PartyDLstackA

1st PartyDLStack

1st Party 3rdParty

Blockchain VirtualMachine Adapters

SmartContract-based UTXO-based orother

Middlew

areTier

BasePlatfo

rmTier

3rd PartyDLstackB…

3rd PartyDLstackC…

…..

Indu

strySolutions

Blockchain ResourceProvider

CryptoDelegateandCryptletarchitecture(securecontainers,attestation,etc.)

ProfessionalServices &Support

Identity&KeyServices

CryptoServices

ML&BIServices

DistributedLedgerGatewayServices

§ TheBlockchain Middlewarewillprovidecoreservices,whichwillhelpuserscreateandbuildontopofblockchains withinAzure

§ Thecoreservicescanbebrokendownintothefollowing:₋ IdentityandCertificateServices– Helpswith

authentication,authorization,access,andlifecyclemanagement.

₋ EncryptionServices– Providesencryptionforblockchain transactionsandfields

₋ Cryptlet Services– Providesruntimeforcryptletsandcommunicationbetweenblockchain andcryptlet trustedhost

₋ Blockchain GatewayServices– Providescommunicationbetweenmultipleblockchains

₋ DataServices– Richdataservices,suchasanalytics,auditing,andmachinelearning

₋ ManagementandOperations– Toolsfordeploymentandmanagement