Reputation: 701
We are trying to figure out best design practice while using hyper-ledger composer. We have following questions :
1) if We are using composer-rest-server, then will have to manage two server side components. i) running composer-rest-server ii) running application which will send request to composer-rest-server to communicate to network.
Isn't it overhead? what additional advantages we are getting by using composer-rest-server? in fact, probably client will have to authenticate two times i guess.
2) If we are using JavaScript SDK, then will have to manage only one server side application, kindly correct me in case of misunderstanding.
3) When i generated angularjs application using yo generator, its also asking me information of composer-rest-server, but I am not planning to use composer-rest-server and want to use 'composer-client' and 'composer-admin' only.
Upvotes: 1
Views: 398
Reputation: 2297
Another option would be to generate a LoopBack application (using the lb
tools) that uses the loopback-connector-composer
LoopBack connector directly. This may give you access to the underlying Express server and would allow you to merge your application and the REST server.
You are correct, however you would have to build the REST API for your business network yourself, and manage authentication and certificates.
The generated Angular application uses the REST API exposed by the composer-rest-server to interact with HLF.
Here is a DRAFT topology diagram that I am working on for contribution to the documentation.
Upvotes: 1