fabric notes

what is fabric ?

First look at the introduction of the official website

Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

It provides a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/downloading files, as well as auxiliary functionality such as prompting the running user for input, or aborting execution.

Fabric is a Python (2.5-2.7) library for simplifying application deployment or system administration tasks using SSH .

The operations it provides include: executing local or remote shell commands, uploading/downloading files, and other auxiliary functions such as prompting for user input, aborting execution, etc.

 

In fact, Fabric also includes a large number of functions, such as the definition of Role, remote interaction and exception handling, concurrent execution, file operations, etc., and is not limited to the command line mode, you can call Fabric in your application.

 

 

 

How to use fabric?

Don't stick my notes here, recommend better article links

Introduction to remote automatic deployment of Python fabric 

fabric Chinese documentation

There are also many projects worth learning when searching for fabric on github

 

Dividing line················································ ・・・・The following contains my own notes and insights ・・・・・・・・・・・ ・・・・・

At that time, when I was mainly studying the blockchain, I needed to fiddle with the fabric.

Paste what you have seen here

Blockchain Core Technology: PBFT of Byzantine Consensus Algorithm -  Programmer  Sought

Introduction to fabric architecture

Fabric is an implementation of blockchain technology, and Bitcoin can build simple applications on fabric

Fabric core components:

    Membership, Blockchain and Chaincode

Fabric architecture features:

    Chaincode trust is flexible

    Scalability

    keep secret

    Consensus module

How can it be a blockchain

 

1. Blockchain is a distributed database (system) placed in a secure environment

2. The blockchain uses cryptography to ensure that existing data cannot be tampered with

3. The blockchain adopts a consensus algorithm to reach a consensus on new data.

A system with the above three properties is a blockchain

 

A blockchain consists of many nodes that communicate with each other

A program that runs chaincode on the blockchain, saves state and data, and executes transactions

The chaincode is the intermediate element since transactions are operations invoked on the chaincode

Transactions must be "licensed"

The blockchain seems to be still active in Internet finance, so let's talk about the entire transaction process

Transactions may be of two types:

  • A deploy transaction creates a new chaincode with a program as an argument. When the deploy transaction executes successfully, the chaincode has been installed on the block.
  • The calling transaction executes the action in the context of the previously deployed chaincode. A calling transaction refers to a chaincode and one of the functions it provides. On success, the chaincode executes the specified function - which may involve modifying the corresponding state, and returns an output.

Basic Workflow of Transactions

    The client creates a transaction, sends the peer to get the consent

    The signature is generated after the transaction is approved in the peer

    Transactions and signatures are committed and broadcast through the service

    The service will send the transaction to other peers

Transaction flow diagram (transaction flow)

 

The above is only my personal opinion, if there is any objection, please advise

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325934249&siteId=291194637