Reputation: 145
I have 2 applications (App1/App2) are deployed on same Hyperledger-Fabric network and both are running on different channel .
We have simple requirement to share some data from App1 to App2 .
So the question is : how to make the integration between App1 and App2 in secure way ?
Should we use Chaincode or Rest API ?
Upvotes: 0
Views: 81
Reputation: 654
You can share data between the two apps directly with the use of
chaincode function invokechaincode
.Where you directly invoke chaincode of other application provided that the chaincodes of your two apps are installed on the same peers.(i.e. your endorsement policies are same for both the applications)
Note:all state changes would be logged only for the caller chaincode.
Or else you have to create a small middleware which would query the chaincode of one app and send the response which you could use for the other application.
Both ways seem to be secure as you are not storing the data outside the network.
Upvotes: 2