Skip to content

Commit

Permalink
move old protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
haaase committed Dec 17, 2024
1 parent c14cc95 commit 03bc261
Show file tree
Hide file tree
Showing 25 changed files with 481 additions and 484 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import org.scalacheck.Prop.propBoolean
import org.scalacheck.commands.Commands
import org.scalacheck.{Gen, Prop}
import rdts.base.{LocalUid, Uid}
import rdts.datatypes.experiments.protocols.{Membership, Paxos}
import rdts.datatypes.experiments.protocols.Membership
import rdts.datatypes.experiments.protocols.old.Paxos

import scala.collection.mutable.ArrayBuffer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import probench.data.RequestResponseQueue.Req
import rdts.base.Lattice.syntax
import rdts.base.{Bottom, LocalUid, Uid}
import rdts.datatypes.experiments.protocols.Membership
import rdts.datatypes.experiments.protocols.simplified.Paxos
import rdts.datatypes.experiments.protocols.old.simplified.Paxos
import rdts.syntax.DeltaBuffer
import replication.DeltaDissemination

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import probench.clients.{ClientCLI, EtcdClient, ProBenchClient}
import probench.data.{ClientNodeState, ClusterData, KVOperation}
import rdts.base.Uid
import rdts.datatypes.experiments.protocols.Membership
import rdts.datatypes.experiments.protocols.simplified.Paxos
import rdts.datatypes.experiments.protocols.old.simplified.Paxos
import replication.{FileConnection, ProtocolMessage}

import java.net.{DatagramSocket, InetSocketAddress}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import probench.clients.ProBenchClient
import probench.data.{ClientNodeState, ClusterData, KVOperation}
import rdts.base.{LocalUid, Uid}
import rdts.datatypes.experiments.protocols.Membership
import rdts.datatypes.experiments.protocols.simplified.Paxos
import rdts.datatypes.experiments.protocols.old.simplified.Paxos
import replication.ProtocolMessage

class ClusterConsensus extends munit.FunSuite {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import rdts.datatypes.experiments.protocols.simplified.GeneralizedPaxos
import rdts.datatypes.experiments.protocols.old.simplified.GeneralizedPaxos

class GeneralizedPaxosSuite extends munit.ScalaCheckSuite {

Expand Down
7 changes: 4 additions & 3 deletions Modules/RDTs/.jvm/src/test/scala/MembershipSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import org.scalacheck.Arbitrary.arbitrary
import org.scalacheck.Prop.propBoolean
import org.scalacheck.{Arbitrary, Gen, Prop}
import rdts.base.{Lattice, LocalUid}
import rdts.datatypes.experiments.protocols.simplified.GeneralizedPaxos
import rdts.datatypes.experiments.protocols.{Consensus, Membership, paper, simplified}
import rdts.datatypes.experiments.protocols.old.simplified
import rdts.datatypes.experiments.protocols.old.simplified.GeneralizedPaxos
import rdts.datatypes.experiments.protocols.{Consensus, Membership, Paxos}

import scala.util.Try
class MembershipSuite extends munit.ScalaCheckSuite {
Expand Down Expand Up @@ -37,7 +38,7 @@ class MembershipSuite extends munit.ScalaCheckSuite {
removeMemberFreq = 1
).property())

property("Membership with paper paxos")(MembershipSpec[Int, paper.Paxos, paper.Paxos](
property("Membership with paper paxos")(MembershipSpec[Int, Paxos, Paxos](
logging = false,
minDevices = 3,
maxDevices = 6,
Expand Down
2 changes: 1 addition & 1 deletion Modules/RDTs/.jvm/src/test/scala/PaperPaxosSuite.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import rdts.datatypes.experiments.protocols.paper.Paxos
import rdts.datatypes.experiments.protocols.Paxos
class PaperPaxosSuite extends munit.ScalaCheckSuite:

// override def scalaCheckInitialSeed = "ZcBq5Oa3t8-hWG0Snkx22h6nivxFRCvp27NO4tFKzbN="
Expand Down
8 changes: 4 additions & 4 deletions Modules/RDTs/.jvm/src/test/scala/SimplePaxosSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.scalacheck.Arbitrary.arbitrary
import org.scalacheck.Prop.propBoolean
import org.scalacheck.{Arbitrary, Gen, Prop}
import rdts.base.LocalUid
import rdts.datatypes.experiments.protocols.simplified
import rdts.datatypes.experiments.protocols.old.simplified.Paxos

import scala.util.Try

Expand Down Expand Up @@ -31,7 +31,7 @@ class SimplePaxosSpec[A: Arbitrary](
maxDevices: Int,
writeFreq: Int,
mergeFreq: Int
) extends ConsensusPropertySpec[A, simplified.Paxos](
) extends ConsensusPropertySpec[A, Paxos](
logging,
minDevices,
maxDevices,
Expand All @@ -46,8 +46,8 @@ class SimplePaxosSpec[A: Arbitrary](

class PWrite(id: LocalUid, value: A) extends Write(id, value) {
override def postCondition(
state: Map[LocalUid, simplified.Paxos[A]],
result: Try[Map[LocalUid, simplified.Paxos[A]]]
state: Map[LocalUid, Paxos[A]],
result: Try[Map[LocalUid, Paxos[A]]]
): Prop =
val res = result.get
val doubleProposal = res(id).accepts.groupBy(_.proposal).find(_._2.size > 1)
Expand Down
Loading

0 comments on commit 03bc261

Please sign in to comment.