summaryrefslogtreecommitdiff
path: root/gemfeed
diff options
context:
space:
mode:
Diffstat (limited to 'gemfeed')
-rw-r--r--gemfeed/DRAFT-distributed-systems-simulator.gmi83
1 files changed, 43 insertions, 40 deletions
diff --git a/gemfeed/DRAFT-distributed-systems-simulator.gmi b/gemfeed/DRAFT-distributed-systems-simulator.gmi
index f4957f24..c0ae2f50 100644
--- a/gemfeed/DRAFT-distributed-systems-simulator.gmi
+++ b/gemfeed/DRAFT-distributed-systems-simulator.gmi
@@ -1,7 +1,6 @@
# Distributed Systems Simulator
> DRAFT - Not yet published
-> Last updated Fri 27 Mar 16:24:54 EET 2026
This blog explores the Java-based Distributed Systems Simulator program I created as my diploma thesis at the Aachen University of Applied Sciences (August 2008). The simulator offers both built-in implementations of common distributed systems algorithms and an extensible framework that allows researchers and practitioners to implement and test their own custom protocols within the simulation environment.
@@ -13,6 +12,7 @@ This blog explores the Java-based Distributed Systems Simulator program I create
* ⇢ Distributed Systems Simulator
* ⇢ ⇢ Motivation
+* ⇢ ⇢ Installation
* ⇢ ⇢ Fundamentals
* ⇢ ⇢ ⇢ Client/Server Model
* ⇢ ⇢ ⇢ Processes and Their Roles
@@ -50,7 +50,6 @@ This blog explores the Java-based Distributed Systems Simulator program I create
* ⇢ ⇢ ⇢ Implementing a Custom Protocol
* ⇢ ⇢ ⇢ Available API Methods
* ⇢ ⇢ ⇢ Example: Reliable Multicast Implementation
-* ⇢ ⇢ Installation
* ⇢ ⇢ Project Statistics
## Motivation
@@ -67,7 +66,41 @@ This thesis aims to make it easier for users to view distributed systems from a
To achieve this goal, a simulator was developed, particularly for teaching and learning purposes at the University of Applied Sciences Aachen. With the simulator, protocols from distributed systems with their most important influencing factors can be replicated through simulations. At the same time, there is ample room for personal experiments, with no restriction to a fixed number of protocols. It is therefore important that users are enabled to design their own protocols.
-The original simulator (VS-Sim) was written in Java 6 in 2008 with a German-language UI. In 2025, I revamped and modernized it as ds-sim: The entire codebase and UI were translated from German to English. The build system was migrated from hand-rolled Ant scripts to Maven. The Java baseline was upgraded from Java 6 to Java 21, adopting modern language features such as sealed class hierarchies, record types, formatted strings, and pattern matching. A proper exception hierarchy and consistent error handling were introduced. Comprehensive Javadoc documentation was added to all public APIs. A headless testing framework was implemented, bringing the project to 141 unit tests covering core components, the event system, and all protocol implementations. The project structure was reorganized to follow standard Maven conventions, and architecture documentation was added. In total, the modernization touched 199 files with over 15,000 lines of new code. Back in 2008, I wrote every single line by hand using the Vim editor. For the 2025 modernization, I could rely on Claude Code for most of the heavy lifting -- the translation, the refactoring, the test generation, the documentation. It is insane how times have changed.
+The original simulator (VS-Sim) was written in Java 6 in 2008 with a German-language UI. In 2025, I revamped and modernized it as ds-sim: The entire codebase and UI were translated from German to English. The build system was migrated from hand-rolled Ant scripts to Maven. The Java baseline was upgraded from Java 6 to Java 21, adopting modern language features such as sealed class hierarchies, record types, formatted strings, and pattern matching. A proper exception hierarchy and consistent error handling were introduced. Comprehensive Javadoc documentation was added to all public APIs. A headless testing framework was implemented, bringing the project to 208 unit tests covering core components, the event system, and all protocol implementations. The project structure was reorganized to follow standard Maven conventions, and architecture documentation was added. In total, the modernization touched 199 files with over 15,000 lines of new code. Back in 2008, I wrote every single line by hand using the Vim editor. For the 2025 modernization, I could rely on Claude Code for most of the heavy lifting -- the translation, the refactoring, the test generation, the documentation. It is insane how times have changed.
+
+## Installation
+
+The modernized ds-sim requires Java 21 or higher and Maven 3.8 or higher.
+
+```
+# Clone the repository
+git clone https://codeberg.org/snonux/ds-sim.git
+cd ds-sim
+
+# Set JAVA_HOME if needed (e.g. on Fedora Linux)
+export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
+
+# Build the project
+mvn clean package
+
+# Run the simulator
+java -jar target/ds-sim-*.jar
+```
+
+For a faster development build without running tests:
+
+```
+mvn package -DskipTests
+```
+
+After building, the following artifacts are available in the `target/` directory:
+
+* `ds-sim-1.1.0.jar` - Executable JAR with all dependencies bundled
+* `original-ds-sim-1.1.0.jar` - JAR without dependencies
+
+The project also includes 208 unit tests that can be run with `mvn test`. Example simulation files for all built-in protocols are included in the `saved-simulations/` directory.
+
+=> https://codeberg.org/snonux/ds-sim ds-sim source code on Codeberg
## Fundamentals
@@ -634,8 +667,6 @@ Because P3 starts a new request before receiving the answer to its previous one,
### Raft Consensus Failover
-> Updated Fri 27 Mar: Added a Raft consensus failover example from the modernized ds-sim version, together with a fresh screenshot and a walkthrough of the event log.
-
=> ./distributed-systems-simulator/raft-consensus-failover.png Screenshot: A 60-second Raft simulation with three processes. P1 starts as the initial leader, crashes at 3500ms, later recovers, P2 wins the reelection and remains leader, and P3 crashes later. The blue and red message lines show the continuing heartbeat and acknowledgment traffic during and after failover.
While modernizing ds-sim, I also added a simplified Raft Consensus example. The simulation is intentionally small: three processes, one initial leader, one crash, a clean reelection, a recovery of the old leader, and then another crash later in the run. This makes it possible to see the most important Raft transitions without being overwhelmed by cluster size.
@@ -784,40 +815,6 @@ public class VSReliableMulticastProtocol extends VSAbstractProtocol {
}
```
-## Installation
-
-The modernized ds-sim requires Java 21 or higher and Maven 3.8 or higher.
-
-```
-# Clone the repository
-git clone https://codeberg.org/snonux/ds-sim.git
-cd ds-sim
-
-# Set JAVA_HOME if needed (e.g. on Fedora Linux)
-export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
-
-# Build the project
-mvn clean package
-
-# Run the simulator
-java -jar target/ds-sim-*.jar
-```
-
-For a faster development build without running tests:
-
-```
-mvn package -DskipTests
-```
-
-After building, the following artifacts are available in the `target/` directory:
-
-* `ds-sim-1.0.1.jar` - Executable JAR with all dependencies bundled
-* `original-ds-sim-1.0.1.jar` - JAR without dependencies
-
-The project also includes 141 unit tests that can be run with `mvn test`. Example simulation files for all built-in protocols are included in the `saved-simulations/` directory.
-
-=> https://codeberg.org/snonux/ds-sim ds-sim source code on Codeberg
-
## Project Statistics
The original VS-Sim project (August 2008) was written in Java 6 and consisted of:
@@ -829,7 +826,13 @@ The original VS-Sim project (August 2008) was written in Java 6 and consisted of
* 10 built-in protocols
* 163 configurable settings
-The modernized successor ds-sim has been updated to Java 21 and translated to English.
+The modernized successor ds-sim (version 1.1.0) has been updated to Java 21 and translated to English:
+
+* 146 source files (117 main + 29 test) across 19 Java packages
+* Approximately 27,900 lines of code (22,400 main + 5,500 test)
+* 12 built-in protocols
+* 208 unit tests
+* 269 configurable settings
=> https://codeberg.org/snonux/ds-sim ds-sim source code on Codeberg