summaryrefslogtreecommitdiff
path: root/CreateRaftSimulationDirect.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-22 16:45:17 +0300
committerPaul Buetow <paul@buetow.org>2025-06-22 16:45:17 +0300
commit4c16cc3c4da7bbf8375d7951185db1761eb396bf (patch)
tree19199b664ce802ed3e967e318e6d4ffeb8c9bf39 /CreateRaftSimulationDirect.java
parent464df52901e2dcb84eb81a22f2db19cbf17e5a9f (diff)
Remove all Raft protocol code
Removed all Raft-related code as it was not working properly: - Removed VSRaftProtocol.java implementation - Removed all Raft test files - Removed Raft example/demo files - Removed Raft documentation - Removed Raft simulation files (.dat) - Removed Raft scripts - Updated VSRegisteredEvents to remove Raft registration - Updated SimulationBuilder to remove RAFT constant - Updated SimulationFactory to remove Raft methods - Updated SimulationBuilderTest to remove Raft tests - Updated pom.xml to remove Raft test configurations The protocol had issues with leader election not completing in GUI mode. 🤖 Generated with Claude Code https://claude.ai/code Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'CreateRaftSimulationDirect.java')
-rw-r--r--CreateRaftSimulationDirect.java36
1 files changed, 0 insertions, 36 deletions
diff --git a/CreateRaftSimulationDirect.java b/CreateRaftSimulationDirect.java
deleted file mode 100644
index ec4712d..0000000
--- a/CreateRaftSimulationDirect.java
+++ /dev/null
@@ -1,36 +0,0 @@
-import simulator.*;
-import core.*;
-import prefs.*;
-import events.VSRegisteredEvents;
-import events.internal.VSProtocolEvent;
-import serialize.VSSerialize;
-import java.io.*;
-
-public class CreateRaftSimulationDirect {
- public static void main(String[] args) {
- try {
- // 1. Create a basic simulation with the GUI to get proper structure
- System.out.println("Creating Raft simulation...");
- System.out.println("Note: This requires manual intervention:");
- System.out.println("1. Run DS-Sim GUI: java -jar target/ds-sim-1.0.1-SNAPSHOT.jar");
- System.out.println("2. Add 3 processes");
- System.out.println("3. Right-click each process and select 'Raft Consensus' as Server");
- System.out.println("4. Save as 'saved-simulations/raft.dat'");
- System.out.println("5. Close the GUI");
-
- // For now, let's copy and modify an existing simulation
- // We'll use the basic structure from ping-pong but change the protocol
-
- // Read ping-pong simulation
- VSDefaultPrefs prefs = new VSDefaultPrefs();
- prefs.fillWithDefaults();
- VSRegisteredEvents.init(prefs);
-
- System.out.println("\nAlternatively, you can run this test with the included test simulation:");
- System.out.println("java -cp target/classes:target/test-classes -Djava.awt.headless=true -Dds.sim.verbose=true testing.HeadlessProtocolRunner saved-simulations/raft.dat");
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-} \ No newline at end of file