30
Blockchain as a software connector By: Maged Mohamed @mmeljazzar linkedin.com/in/mmjazzar 17/10/2016 1

blockchain as software connector

Embed Size (px)

Citation preview

Page 1: blockchain as software connector

1

Blockchain as a software connector

By: Maged Mohamed@mmeljazzar

linkedin.com/in/mmjazzar

17/10/2016

Page 2: blockchain as software connector

2

Agenda

Introduction. How block chain works Blockchain as a software connector The main Design decisions in blockchain as a software connector Blockcain to other connectors comparsion Blockchain Applications and Platforms

17/10/2016

Page 3: blockchain as software connector

3

introduction

blockchain is a distributed database that is an ordered list of blocks. Blocks are the containers aggregating transactions. Blocks and transactions are Seen as a data structure, the blockchain

Each block contains a timestamp and a link to a previous block, in a Merkle tree structure.

The technology can work for almost every type of transaction involving value, including money, goods and property.

17/10/2016

Page 4: blockchain as software connector

4

Merkle tree structure

17/10/2016Fig 1. Merkle tree structure

source: wikipedia

Page 5: blockchain as software connector

5

How Blockchain works

17/10/2016Fig2. How Blockchain works

*cited from the world economic forum.https://www.weforum.org/agenda/2016/06/blockchain-explained-simply/

Page 6: blockchain as software connector

6

How we can use blockchain as a software connector ? The blockchain is a network-based software connector, which

provides communication through transactions, validation oracles and facilitation services.

The transaction is sent to a node connected to the blockchainnetwork, which knows how to validate the transaction.

This flooding approach guarantees that a valid transaction will reach the whole network.

17/10/2016

Page 7: blockchain as software connector

7

blockchain as a software connector (Cont.) The senders do not need to trust the nodes as long as they use more

than one to ensure that the transaction propagates.

The recipients do not need to trust the senders as there is no confidential information or credentials.

When a transaction reaches a mining node, it is verified and included in a block, which is propagated to the network.

17/10/2016

Page 8: blockchain as software connector

8

The validation oracle

The validation oracle facilitates component coordination within the network using external, independently managed state.

Other facilitation services include cryptography-based secure clearing payment, mining, transaction validation, and permission management

17/10/2016

Page 9: blockchain as software connector

9

The validation oracle

Every node in the blockchain network has two layers, namely, application layer and blockchain layer.

Part of the application is implemented inside the blockchain connector.

The part of application outside the blockchain connector might host off-line data and application logic, and interact with the blockchain through transactions.

17/10/2016

Page 10: blockchain as software connector

10

blockchain node architecture

17/10/2016Fig3. Blockchain as a software connector*cited from the world economic forum.

https://www.weforum.org/agenda/2016/06/blockchain-explained-simply/

Page 11: blockchain as software connector

11

The main Design decisions in blockchain as a software connector 1. Blockchain Design Decision

2. Application Design Decision

17/10/2016

Page 12: blockchain as software connector

12

1.Blockchain Design Decision

1.1 Mechanisms of improving transaction processing rateLarger block size; Off-chain transactions; Smaller transaction withoutsignature; Scalable protocol

1.2 Mechanisms of selecting the next block included in the blockchainProof-of-work, Proof-of-stake, Proof-of-burn, Proof-of-retrievability

17/10/2016

Page 13: blockchain as software connector

13

2. Application Design Decision

2.1 The implemented functionality in the connector2.2 The scope of the blockchain2.3 The number of chains2.4 Validation2.5 Permissionless vs. Permissioned blockchain

17/10/2016

Page 14: blockchain as software connector

14

2.1 The implemented functionality in the connector

concerning which data and computation should be placed on-chain or kept off-chain.

Considering the amount of computational power and data storage space available on the blockchain network remains limited.

17/10/2016

Page 15: blockchain as software connector

15

2.2 The scope of the blockchain

Scope: on-chainEnable verification of computational result, limited computation power and data storageExamples: Metadata

Scope: off-chainMore computation power and data storage, less cost, additional trustrequired Examples: Raw personal data

17/10/2016

Page 16: blockchain as software connector

16

2.2 The access scope of the blockchain: Using a public blockchain results in better information transparency

but sacrifices information privacy.

The consensus process of a consortium blockchain is controlled by authorized nodes. The right to restrict the participants of the blockchain.

Some blockchain platforms provide an API and/or tools to filter the historical transactions.

17/10/2016

Page 17: blockchain as software connector

17

2.3 The number of chains

Single chainEasier chain management and permission management, harder datamanagement and isolation

Multiple chainsInformation isolation, harder chain management and permission managementExample: using one chain to store transactions, and using a separate chain to store access control information

17/10/2016

Page 18: blockchain as software connector

18

2.4 Validation

External Validation oracle Introduce a third party trusted by the whole network

Internal Validation oraclePeriodically injecting external state into the blockchain might introduce latency issues. The source of external state also needs to be trusted

17/10/2016

Page 19: blockchain as software connector

19

2.4 Validation

17/10/2016Fig4. Validation betwwen Oracle

Page 20: blockchain as software connector

20

2.5 Permissionless vs. Permissioned blockchain Trade-offs: Performance, cost, censorship,

reversibility, finality, flexibility in governance

Permissions: Read/Join network, submit transaction, mine, create assets

17/10/2016

Page 21: blockchain as software connector

21

Compare blockcain to other connectors ?1.1 TransactionsCentralized, Shared Data Store The concept of log

where data items get appended but never deleted or updated.

blockchain An append-only data store

as it does not support update.

Any changes/updates on contract states are appended to the blockchain as new transactions.

17/10/2016

Page 22: blockchain as software connector

22

1.2 sustainability and latency.

Centralized, Shared Data Store Stores use different strategies

to improve sustainability and throughput.

Reduce latency, such as master-slave replication, and multi-master replication.

Blockchain Provides a more sustainable

data storage because the data is duplicated on every node.

The throughput of some blockchains is not comparable with shared data store due to the latency.

17/10/2016

Page 23: blockchain as software connector

23

1.3 consensus protocols

Traditional shared data stores have their own

consensus protocols to synchronize replicas in a fully trusted environment, such as 2-Phase Commit and Paxos.

Blockchain Aims at reaching agreement

among themselves to process correct operations despite a faulty component.

validate the consistency of transactions based on rules attached with the transactions in terms of smart contract.

17/10/2016

Page 24: blockchain as software connector

24

2.1 distribution

Replicated State Machine A general method to

implement a fault-tolerant service with a distributed system.

To cope with failures, it replicates the service at several servers and coordinates the service requests issued by the clients.

Blockchain Uses distribution not to depend

nor rely on any single entity.

17/10/2016

Page 25: blockchain as software connector

25

2.2 consensus protocol

Replicated State Machine Takes as an input the

requests of the components and decides upon one of these requests.

In the case of a distributed locking service. the consensus will guarantee that only one particular client acquires a lock.

Blockchain Ensure that among

multiple conflicting proposed transactions, only one gets approved, preventing for example a double spending of the same coins.

17/10/2016

Page 26: blockchain as software connector

26

2.3Communication

Replicated State Machine Transmit data among

components. Components can store

and retrieve information that will persist despite failures.

Blockchain Guarantees that the

information stored by one component; Gets replicated and delivered to another components upon requests even when some failures occur.

17/10/2016

Page 27: blockchain as software connector

27

2.4 arbitrary failures

Replicated State Machine The sender of a message is

typically authenticated with public-key cryptography.

The encryption with the sender private key serves as a signature to whoever decrypts the message with the corresponding public key.

Blockchain Collision-resilient hash

functions help verifying the integrity of the message.

They take the content of the message and produce a digest.

This digest once sent encrypted allows the receiver to observe that the signed message was not altered.

17/10/2016

Page 28: blockchain as software connector

28

2.5 requests scheduling

Replicated State Machine orders the requests

from components. It controls concurrency

by scheduling requests issued by components and thus serves as a facilitation connector.

Blockchain Each block contains the

hash of the previous block according to this total order,

Hence allowing to audit preceding transactions by backtracking the blockchain up to the genesis block.

17/10/2016

Page 29: blockchain as software connector

29

Blockchain applications and platforms Cryptocurrency: it uses cryptography to control the monetary

issuance and secures the transaction.

Smart contract: enables a generally programmable infrastructure.

Ledger platforms: Customizable and Developer friendly such as IBM blochchain and enigma.

17/10/2016

Page 30: blockchain as software connector

30

Thank you

17/10/2016