Performing consensus of a p2p network outside the system in another system which runs the consensus by real machines and returns the results?
Asked Answered
C

0

2

I have implemented a simulator (in Java) to show the performance of my protocol designed for distributed and peer-to-peer networks, in which transactions are processed via a consensus mechanism. Since it is a simulator, the nodes/peers are virtual (and not a real machine.)

My question is that is it possible to perform the consensus outside the main application (e.g. in a real distributed network) by passing necessary inputs (such as, list of nodes/peers etc.) and after finishing each round of consensus, the result of consensus is returned to the simulator ?

Is this a practical method? If so, there are two main advantages: (1) The evaluation can be more precise, as the consensus has been performed by real machines. And (2) The simulator can get free of implementing several different consensus mechanisms.

Can Apache Zookeeper be used for this purpose in order to execute the consensus externally?

Or can something like micro service in RabbitMQ be efficient? Or even using cloud computing systems in order to perform consensus. (or any other practical method ...)

Following figure describes generally what I want: enter image description here

P.S. If the question is not yet clear enough, please let me know to modify it.

Christmastide answered 23/11, 2021 at 23:19 Comment(5)
Cross-posted: bitcoin.stackexchange.com/q/111005/14915, cs.stackexchange.com/q/146236/755, ethereum.stackexchange.com/q/114603/19041, softwarerecs.stackexchange.com/q/81386/2462, https://mcmap.net/q/87375/-performing-consensus-of-a-p2p-network-outside-the-system-in-another-system-which-runs-the-consensus-by-real-machines-and-returns-the-results/781723. Please do not post the same question on multiple sites. I have given you similar feedback before.Entablement
I am not familiar with RabbitMQ and can't say anything about comparing efficiency, but certainly Zookeeper can do it (one could say that it was built for exactly those kinds of tasks). I don't see the "precision" advantage that you claim in (1) though.Ivatts
@LucaGeretti , Thank you for you response and happy to hear that Zookeeper was built for exactly those kinds of tasks. My current question is ho how to use it in practice? What parameters needed to give it in order to perform consensus? e.g. number of node is enough? I apricate it if you could grant me any document or guidance explaining the use of Zookeeper for the question mentioned above. I am not unfortunately familiar with Zookeeper architecture and how to use it for performing consensus. (If another complementary question is need, please let me to provide it in another post.) ThxChristmastide
Algorithms requiring consensus (such as leader election) must be built above Zookeeper, the software does not supply a library for them. I would suggest the "ZooKeeper: Distributed Process Coordination" book which goes into detail. Anyway, there is plenty of resources online. Read this article that mentions Zookeeper's approach to consensus: betterprogramming.pub/…Ivatts
@LucaGeretti , Thanks, I also posted a new question explaining my purpose in more detail: (stackoverflow.com/q/70199054/5029509) In fact, I am searching a general way to run variant consensus mechanisms that have been already implemented, such as Raft, PBFT etc. by passing the entry parameters (number of nodes and transaction (as a message)) to the software which runs a consensus algorithm (such as Apache Ratis (Raft) or IBM Sawtooth PBFT or Zookeeper ZAB etc.Christmastide

© 2022 - 2024 — McMap. All rights reserved.