具有多个订购者的渠道中的交易订购 [英] Transactions order in a channel with multiple Orderers

查看:75
本文介绍了具有多个订购者的渠道中的交易订购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望我对Hyperledger Fabric的理解是正确的,有人可以解释一下在一个渠道中如何与来自不同组织的同龄人(他们每个人都有各自独立的订购者)以正确的顺序进行交易吗? >

举个例子,客户A将交易T1和T2发送到第一组织的订购者,而客户B将交易T3和T4发送到第二组织的订购者.所有这四笔交易都应以正确的顺序存储在分类帐中.

解决方案

假设您有每个组织正在使用的多个订购服务节点(OSN).多个订购服务节点(在生产环境中)将依赖的主要组件是容错(仅停止,而不是拜占庭)的Kafka群集(更确切地说是Kafka ZooKeeper集成).

Kafka中的消息(记录)被写入主题分区.一个Kafka集群可以有多个主题,每个主题可以有多个分区.每个分区都是连续附加的有序,不变的记录序列.

然后假设每个链都有一个单独的分区.一旦OSN执行了客户端身份验证和事务过滤,它们就可以将属于某个链的传入客户端事务中继到链的相应分区.然后,他们可以使用该分区,并获取所有订购服务节点之间共有的交易的有序列表. Kafka为所有OSN提供了有关交易顺序的统一的单一事实真相视图. 一旦按照写的顺序读回消息,就会根据一些预定义的标准对块进行切割(具有一个或多个事务),然后将其写入订购者分类帐,然后再中继到提交对等点以进行事务验证和提交. /p>

更多详细信息,请参见: https://docs.google.com/document/d /1vNMaM7XhOlu9tB_10dKnlrhy5d7b1u8lSY8a-kVjCO4

有关Kafka如何容错的详细信息: https://kafka.apache.org/documentation/

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.

解决方案

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/

这篇关于具有多个订购者的渠道中的交易订购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆