Using kafka configuration in hyperledger composer setup - hyperledger-fabric

I just want to know whether we can use hyperledger composer in the scenario where there are multiple orderers deployed in kafka configuration ?

Hyperledger Composer can be used against any fabric network setup. So it will work with both a Solo Orderer setup as well as a kafka configured setup. However as noted in the comment there is a limitation in that although you can define multiple orderers in the connection profile, only the first one in the list is used to interact with an orderer.
A new feature that went into the fabric-node-sdk 1.2 allows it to try other orderers in the list if it fails to send proposals to an orderer.
When Composer is able to work with a fabric 1.2 setup then this feature will be available.

Related

Hyperledger Fabric: Unable to Invoke using Node SDK

I am having an issue in the Hyperledger fabric Node SDK.
Network Details:
The network consists of 4 organisations each deployed on different Kubernetes cluster.
Each organisation has 2 peers which joined a single channel say mychannel.
Each organisation has 1 CA running.
Ordering service is Raft.
CouchDB is used as statedb.
The invokes from the CLI are also working fine and the data is being synced between all the 8 peers.
Hypelredger explorer is up and running with the one organisation details and is able to list all the other 6 peers in the dashboard.
Now back to issue, I tried to deploy the Node.js SDK for Org1.
I created a connection profile having the details of the Org1 Peers, Orderer and CA.
The users are enrolled (Admin and user1).
Now when I try to invoke transaction there are two cases:
Service discovery enabled: In this case, the SDK tries to communicate with the other peers in the network and creator org peers but all returns the context deadline exceed error.
Service discovery disabled: Invokes successful.
I have no idea why the invoke transactions are failed when the service discovery is enabled.
The above issue is resolved when I added the host aliases into my /etc/hosts file.
I need to add the host names and IP for each peer in the /etc/hosts files.
After adding the host names, the SDK started working.
Thanks
Could be your anchor peers are configured incorrectly, since discovery reports those, and some clients will use them.

Is Hyperledger Composer mandatory to setup a Multi-Node Multi Org Hyperledger fabric network?

I am getting started with the Hyperledger fabric network. I went through the examples of setting up single org setup on a single node and Single Org-Multi Node as well.
I am now trying to setup a Multi-Org, Multi Node network and the all the examples I have seen online, uses Hyperledger Composer. So, Is Composer mandatory to setup HYL-Fabric Multi-node, Multi-Org structrure, If not, can anyone provide me with the steps needed to setup a n/w without the composer?
Thanks

Multi Org Setup using HyperLedger Composer in multiple machines

I am working on setting up a Business Network for Multiple Organizations (two physical machines).
I did the setup of a business network using Hyperledger Composer Playground and achieved querying, rest-server implementation etc.
I have configured a multi-org (multiple organizations) setup for a single business network in a single cloud server (Reference link used: https://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-multi-org). But, as in real scenario, I want to configure a multi-org functionality with two separate cloud servers.
I met with an error like below.
Error: Unable to Communicate with Peers. Peers not found.
Version of Composer : latest
Version of Fabric : V1.0
Thanks in Advance.
If you are using Composer latest (v0.19) then you have to use Fabric v1.1.
If you are Running on 2 servers with 2 IP addresses you need to solve the communications (IP Addressing and Routing) between you client and the servers, and between the containers on each server.
For the client to server you need to manage the addresses in the connection.json files for composer.
For the connectivity between the Peers and other containers the correct solution is to use Kubernetes or Docker Swarm to manage the addressing/routing. It is possible to use the extra_hosts feature of docker-compose for a simple demo but you might be restricted to one peer per org because of port conflicts.

Using more than one peer in Hyperledger Composer

I have recently deployed and started a business-network with Hyperledger Composer, I have only one peer (?) in which I have created the network and now I am using the rest-server for adding participant and doing transaction from an Android app to my personal blockchain and everything goes well.
So...Need I to configure one or more peers on my network? What's the utility of doing that?
I know that other blockchains needs a lot of peers for co-validating transactions and for maintaining a big scalability / distributed data; doesn't Hyperledger do it for me without adding more peers in my network?
If you have started with Hyperledger Composer you are probably using the 'standard' development Fabric with a Single Peer. This is a 'minimal' Fabric provided to get developers a fast start without the need to configure and deploy a Fabric. But you are correct Hyperleder Fabric can be configured for Multi Peer Multi Organisation distributed ledgers.
There are tutorials in the Fabric documentation for setting up a Fabric from scratch, and also this document covers a tool for extending the Fabric.

Hyperledger Fabric add new peers in different machine

I have completed this tutorial and successfully deployed a business network over what it seems to be a generic hyperledger fabric blockchain.
What i want to do now is to create a new peer in diffenrent machine but connected to the same blockchain. Can't find any information. Any help?
Thank you community!
To deploy hyperledger on a different machine you need to take advantage of docker swarm and overlay network. You can find the guide at
Deploying Hyperledger on Multiple Hosts
for the next question about extending your existing network by adding peers, follow Extending your network
I suggest you start looking at the hyperledger fabric documentation
http://hyperledger-fabric.readthedocs.io/en/latest/
You will need to understand about a hyperledger fabric network topology. There are many things you need to understand in order to understand how to configure a peer correctly and join it to a channel. The build your first network section will take you through creating a fabric network from scratch.

Resources