zio-keeper
zio-keeper copied to clipboard
Integrate PeerSim into the project
In order to ensure that the implementations are reliable we should use something like PeerSim to run simulations. Scope of this ticket is to figure out a way to test Membership layer implementations using it
I am interested in this ticket. However when checking PeerSim's source, I notice it depends on a third party library, which uses a license[1] I am not sure if it's compatible with zio-keeper's Apache License. Is it ok to integrate it or any alternative recommended?
If it's fine, then I suppose pulling PeerSim's code every time when it's needed to do simulation would be enough. Otherwise any suggestions?
Thanks [1]. http://www.singularsys.com/order/license.html
Thanks for picking this up. This will be a very valuable contribution :bowing_man:
I'm not an expert on this. But it seems like they are using LGPLv2 https://sourceforge.net/projects/peersim/ as their license. This should allow us to stay licensed as AL 2.0 if I'm not mistaken https://www.gnu.org/licenses/lgpl-java.html.
BTW, alternatively you could also look at Jepsen or other tools for this. We really haven't decided on using PeerSim yet.
No problem. Will check Jepsen or others to see if there are more suitable ones for this purpose. Thanks for suggestions!
When checking the source code, I found a few files such as [1], [2], and [3] where [2] and [3] looks like what this ticket want to test. However I don't find corresponded operations, except [4] and [5]. Is it correct that the behavior in [4] and [5] are what this ticket want to examine? Otherwise where should I look into for the protocols in this project? Many thanks.
[1]. https://github.com/zio/zio-keeper/blob/master/keeper/src/main/scala/zio/keeper/transport/Protocol.scala [2]. https://github.com/zio/zio-keeper/blob/master/keeper/src/main/scala/zio/keeper/MembershipProtocol.scala [3]. https://github.com/zio/zio-keeper/blob/master/keeper/src/main/scala/zio/keeper/ConsensusProtocol.scala [4]. https://github.com/zio/zio-keeper/blob/master/keeper/src/test/scala/zio/keeper/hyparview/ActiveProtocolSpec.scala [5]. https://github.com/zio/zio-keeper/blob/master/keeper/src/test/scala/zio/keeper/hyparview/InitialProtocolSpec.scala