do I need to use fabric sdk if am using hyperledge

2019-08-15 16:32发布

问题:

I am using hyperledger composer for transaction invocation and all the stuffs related to resource(participants, assets etc) manipulation. I have generated the server using composer-rest-server, and also generated the angular frontend using yeoman generator. This makes me to ask what is the use of fabric sdk? Will I need it in the above mentioned scenario? Please clarify, thanks.

回答1:

There are two ways to write chaincode in Hyperledger Fabric,

1) Using GoLang

2) Using NodeJS

In order to connect Hyperledger Fabric and Invoke chaincode transaction. You will require SDK. Based on your application technology stack, You can either use Fabric NodeJS SDK, Fabric Java SDK and Fabric Python SDK.

On other hand; Hyperledger composer is different way of writing chaincode, which is guide of framework which can help you to accelerate your chaincode development. If you have developed business network using composer, then you can either use "composer rest server" or "composer-admin" and "composer-client" node module. You dont need to use any SDK in order to interact with Business network deployed on hyperledger fabric. Kindly refer following diagram for more clarity.