Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit
-
Upload
codeops-technologies-llp -
Category
Software
-
view
1.886 -
download
0
Transcript of Blockchain - Apt Store for Serverless Apps - Nasir - Serverless Summit
Blockchain– Aptdatastoreforserverless apps
Whatisblockchain?
3
Secure
Shared
Distributed
Ledger
Blockchain isasecure,shared,distributedledger
4
Thatdecentralizesdatainatrustlessenvironment
TraditionalSystem
Centralized system with stored ledger
Blockchain System
Distributed system with distributed ledger
§ Traditionalledgersarecentralizedanduse3rd partiesandmiddlementoapproveandrecordtransactions§ Blockchainsafelydistributesledgersacrosstheentirenetworkanddoesnotrequireanymiddleman§ Thetechnologymaintainsmultiplereplicaslikep2ptorrentfilesharing
5
Decentralizationhasgreatbenefits&changesfundamentalprocesses&models
Eliminates Intermediaries
Reduces Fraud
Increases Efficiency and Speed
Increases Revenue and Savings
6
Anditwilldisruptmultipleindustries
Retail & Manufacturing
Financial Healthcare Government
7
Examplescenariosinthefinancialindustry
Trade settlement
Trade finance
8
Howdoesitwork?
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
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
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
12
Blockchainevolving fromsimpleledgers,tocryptlets thatfetchtrustedandagreed-uponexternaldataneededtoexecuteSmartContracts
SmartContractsareunabletoaccessexternaldataoreventsbasedontimeormarketconditions.CallingcodeordataoutsideofaSmartContractorblockchainbreaksthegeneraltrustbarrierandauthenticityoftransactions.Cryptletswillallowtheblockchaintoaccessexternaldatasecurely,whilemaintainingtheintegrityoftheblockchain.
Microsoft Innovation
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
Demo:UsingBlockchain inRealEstateTransactions
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
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
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
18
BusinessLogic
Bank
PropertyRegistry
Salehappens
SellerapprovesBuyerapproves
Sendcontractproperty
Sendcontractmoney
Buyer SellerApproveor
reject
Inspector
Supportingcontracts Escrowcontract
Metadata
19
Architecture§ Twoservers– miningiscomputationallyintensive,soitisdoneonadifferentVM§ Keysarestoredandmanagedontheclientgeth node§ Stateofsmartcontractsisreplicatedtolocaldatabaseforquickretrieval– updatesoccurduetocontractevents§ Geth backendcanbeswappedforaprivatenetworkwithanarbitrarynumberofnodesonceARMtemplating workisdone
Clientgethnode
Node.jsWebServer
Server1
Client
Mininggethnode
Server2
MongoDB(localstate)
20
HowdoesMicrosoftplay?
21
TenetsofourStrategy
FAILFAST&CHEAP
MIX&MATCH
CREATE&INNOVATE
SHARESOLUTIONS
PROVISION
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
23
1– CreateatightfeedbackloopbetweenPOCs&MSengineeringtoenablequickiterationsonourofferings
POCs
DistributedLedgerStacks
Azure
Engineering
BlockchainPlatform
POCswillenableMicrosofttolearnquickly,discovercustomerneeds,andgalvanizeourpartners…
…influencingBaaSproductdesignandlong-termvaluedeliverywhilesavingreworkforeveryone
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
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
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
27
Howdopartnersgetstarted?
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/
29
Appendix
30
Andisbasedoncryptographicone-wayhashfunctions
§ Alldigitalmedia,includingtransactionsandowners,areprotectedviadigitalsignaturesand hashes§ Digitalsignaturesand hashes arecreatedbycryptographicone-wayhashfunctions(i.e.mathematicalfunctionthatcreatesaunique
outputbasedonspecificinput withnowayofderivingtheinputfromtheoutput)§ Digitalsignatures andhashesallowblockchains toremainsecurewhilebeingdistributed
Digitalsignature0x23e423s3234…
CryptographicOne-WayHash
Productserialnumber+manufacturer
31
Eachtransactionhasauniquedigitalsignature
§ Atthecoreofablockchain istheledger,whichrepresentsthehistoryoftransactiondata
§ Atransactionisanexchangeofadigitalassetfromoneaccounttoanother
§ Transactionsbetweenpartiesarebroadcasttotheblockchain network.Thosetransactionsarethenappendedtotheledger
§ Eachtransactionmessage,inadditiontothedigitalassetandtheaccounts,hasauniquedigitalsignature,whichensurestheauthenticityofthemessageandthatitoriginatedfromtherightaccount
§ Privatekeysareusedtocreatesignatureswhilepublickeysareusedtoverifysignatures
§ Theuniquedigitalsignatureensuresnonodewithintheblockchain canmodifythetransactionmessage
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
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…
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
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