头图

1. Description

This article mainly shares the application scenario of the alliance chain represented by Hyperledger Fabric through an example.

For the related concepts of Fabric, please refer to the article "Hyperledger Fabric Core Concepts"

2. Business Scenario

Let's look at a shopping scene:

file

  1. First, consumers shop on a shopping platform such as Taobao.
  2. Then use a third-party payment channel for payment such as Alipay.
  3. Finally, the deduction of funds is completed at the bank.

In this way, if the whole process is implemented using the current traditional technology, the data between each other is opaque , and the data generated by each platform is only stored in its own database;

For example, Taobao stores order data, Alipay stores payment records, and banks record deduction records and balances; the data is opaque to each participant on the entire link.

Two problems may arise :

  1. Security risk: Since the data is in the hands of the platform itself, for example, the bank has unilaterally modified your balance, or Taobao has been deleted by the developer, resulting in all your order information being lost.
  2. Difficulty in traceability: Because the data between platforms or institutions is opaque to each other, it is very difficult to trace the data; for example, if the transaction link is very long, and the bank wants to identify some criminal acts, it is very difficult to trace the source of the funds.

3. Blockchain Architecture

The above business scenario, if we substitute it into the network of Hyperledger Fabric to implement, the architecture diagram is as follows:

file

  1. Organization : First define 3 organizations, 组织1 Yes 购物平台 There is an application Taobao, 组织2 组织3 支付平台 组织3 Yes 银行 ;
  2. Node : There are two nodes for each organization, and the application of each organization writes transaction information to its own node;
  3. Channel : Through a channel, all nodes are managed uniformly.

After the entire blockchain network is built, three new records will be added to the ledger of the blockchain after each shopping process, one is 订单信息 a 支付信息 and one 扣款信息 ;

The characteristics of the blockchain, each node has a copy of the ledger of the full amount of data.

4. Summary

Compared with the problems existing in traditional technology, it has the following advantages:

  • Security : The non-tampering feature of the blockchain, there is no problem of malicious modification of data by an organization, because each organization has a full account book, and problems will be found as long as the account is reconciled, so any tampering will will not reach 共识 ;
  • Traceability : Due to the data structure characteristics of the blockchain, the ledger will store all transaction information in sequence according to the link method; so for example, the bank needs the source of the final funds, and it is very convenient to identify criminal acts.

Scan the code to follow for a surprise!

file


zlt2000
108 声望2.5k 粉丝

具备多年一线互联网分布式系统开发和设计经验,专注分享Java、SpringBoot、SpringCloud、分布式系统/微服务、中间件等领域。