Skip to content

Commit

Permalink
fix: adjust all the timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
elblasco committed Aug 7, 2024
1 parent d7c8544 commit 7a9a3ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/main/java/it/unitn/disi/ds1/qtop/Simulation.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,12 @@ public void start(int numberOfNodes, int numberOfClients, int voteTimeout, int w
i,
voteTimeout,
writeTimeout,
((numberOfNodes + 1) * Utils.ELECTION_TIMEOUT),
numberOfNodes * Utils.ELECTION_TIMEOUT * 2,
numberOfNodes
),
"node" + i
));
}
System.out.println("The global election timeout is: " + ((numberOfNodes + 1) * Utils.ELECTION_TIMEOUT));
for (int i = 0; i < numberOfClients; i++)
{
group.add(system.actorOf(
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/it/unitn/disi/ds1/qtop/UserInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ public void start() {
//default values
int numberOfNodes = 10;
int numberOfClients = 3;
int voteTimeout = 1000;
int writeTimeout = 2000;
int voteTimeout = 500;
int writeTimeout = 500;
System.out.println("Qtop - DS Project 2023/2024 - Blascovich Alessio, Cereser Lorenzo \n");
System.out.println("""
This is a simulation of 2PC + token ring leader election for the\s
distributed system course, the system is composed by a number of\s
nodes that can be set by the user. Virtual crashes can be inserted
This is a simulation of quorum-based commit + token ring leader election\s
for the distributed system course, the system is composed by a number of\s
nodes that can be set by the user. Virtual crashes can be inserted\s
at user discretion but only in one place at a time. Timeouts can\s
also be set. All of the node logs will be displayed in the specific\s
file.""");
Expand Down

0 comments on commit 7a9a3ff

Please sign in to comment.