sebastiandagostino/graph-builder
Graph builder for Ripple consensus simulator
Project graph-builder
This project provides utility classes to generate a network that can produce a json file to be used for testing in the ripple-simulator fork.
Prerequisites
Java JDK 8 and Maven are required to run the project.
Compiling
As in any Maven project, it may be required to run
mvn clean install
Running
After compilation with Maven, to run it in any console:
java -jar target/GraphBuilder-1.0-jar-with-dependencies.jar 54 3 500 500
The four parameters after the jar file are the following:
- Graph Size: must be a positive integer greater than Clique Size
- Clique Size: must be a positive integer greater than 1
- Max Node Latency: must be a positive integer
- Max Link Latency: must be a positive integer
There is another parameter that is optional:
- Additional Nodes: must be positive number to use as amount of new nodes in the improvement algorithm
Alternatively the application can be run with the following bash script:
./gb.sh 54 3 500 500
This application creates two files (file1.json and file2.json) running the application with the same parameters except that for the second one it runs the improvement algorithm with 8% (a parameter in the bash script) of additional nodes.
Built With
- Jackson - Used to generate JSON streams
- JGraphT - Utility framework for graph creation and clique search
- Maven - Dependency Management
Author
- Sebastian D'Agostino - Initial work