Reputation: 552
Hoping that my understanding of Hyperledger Fabric is correct, can someone please explain how is it possible in a channel with peers from different organizations, each of them with their own and separate orderers, to have transactions in the correct order?
To give an example, client A sends transactions T1 and T2 to the first organization's orderer and client B sends transactions T3 and T4 to the second organization's orderer. All of these four transactions should end up in the ledger, in the correct order.
Upvotes: 0
Views: 937
Reputation: 1644
Let's say that you have multiple ordering service nodes (OSN) that each organization is using. The main component that multiple ordering service nodes will rely on (in a production environment) is a fault-tolerant (stop only, not Byzantine) Kafka Cluster (More precisely a Kafka ZooKeeper ensemble).
Messages (records) in Kafka get written to a topic partition. A Kafka cluster can have multiple topics, and each topic can have multiple partitions. Each partition is an ordered, immutable sequence of records that is continually appended to.
Assume then that for every chain we have a separate partition. Once the OSNs have performed client authentication and transaction filtering, they can relay the incoming client transactions belonging to a certain chain to the chain’s corresponding partition. They can then consume that partition and get back an ordered list of transactions that is common across all ordering service nodes. Kafka gives a unified and single-source-of-truth view about transaction order to all the OSNs. Once the messages are read back in the order what it was written, blocks are cut (with one or more transactions) based on some predefined criteria it is written to the orderer ledger and are then relayed to committing peers for transaction validation and commit.
More Details here : https://docs.google.com/document/d/1vNMaM7XhOlu9tB_10dKnlrhy5d7b1u8lSY8a-kVjCO4
Details on how Kafka is Fault Tolerant : https://kafka.apache.org/documentation/
Upvotes: 2