Skip to content

Commit

Permalink
rdf-graphs: update some dependencies + README
Browse files Browse the repository at this point in the history
  • Loading branch information
sszuev committed Apr 1, 2024
1 parent 58dd920 commit 3ed01d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 73 deletions.
79 changes: 9 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ A simple jvm library containing [RDF](https://www.w3.org/TR/rdf11-concepts/) gra

Contains several implementations, including

- `SynchronizedGraph`, based straightforward use standard java `synchronized` block
- `ReadWriteLockingGraph`, uses `java.util.concurrent.locks.ReadWriteLock`
- `SynchronizedGraph` - straightforward implementation which uses the standard `synchronized` java block
- `ExtendedSynchronizedGraph` - advanced implementation which uses the standard java `synchronized` block
- `ReadWriteLockingGraph` - it uses `java.util.concurrent.locks.ReadWriteLock`

Each implementation is an instance of `org.apache.jena.sparql.graph.GraphWrapper` from [Apache Jena](https://github.com/apache/jena) project.
Each implementation is an instance of `org.apache.jena.sparql.graph.GraphWrapper`
from [Apache Jena](https://github.com/apache/jena).
The project is equipped with concurrent tests, the local running of which may end with `TimeoutException` if the local
machine is not fast enough.
Also, there are benchmarks tests.

## Available via [jitpack](https://jitpack.io/#sszuev/concurrent-rdf-graph)

Expand All @@ -26,7 +29,7 @@ machine is not fast enough.
<dependency>
<groupId>com.github.sszuev</groupId>
<artifactId>concurrent-rdf-graph</artifactId>
<version>1.0.0</version>
<version>1.1.0-kotlin</version>
</dependency>
```

Expand All @@ -40,7 +43,7 @@ gradlew clean jmhJar
java -jar build/libs/concurrent-rdf-graph-kotlin-{version}-jmh.jar
```

For allowed arguments see help:
For allowed arguments, see help:

```bash
java -jar build/libs/concurrent-rdf-graph-kotlin-{version}-jmh.jar -help
Expand All @@ -54,68 +57,4 @@ java -jar build/libs/concurrent-rdf-graph-kotlin-{version}-jmh.jar -wi 3 -i 3 -p

## License

Apache License Version 2.0

## Benchmarks

```txt
Benchmark (factory) Score Error Units Mode Cnt
FunctionalBenchmarks.MIXED_OPERATIONS SYNCHRONIZED_GRAPH_V1 360874,442 6544,873 ops/s thrpt 25
FunctionalBenchmarks.MIXED_OPERATIONS SYNCHRONIZED_GRAPH_V2 159884,792 2240,801 ops/s thrpt 25
FunctionalBenchmarks.MIXED_OPERATIONS RW_LOCKING_GRAPH_V1 160909,886 752,778 ops/s thrpt 25
FunctionalBenchmarks.MIXED_OPERATIONS RW_LOCKING_GRAPH_V2 160852,180 568,482 ops/s thrpt 25
FunctionalBenchmarks.MIXED_OPERATIONS TXN_GRAPH 4733,355 2276,425 ops/s thrpt 25
FunctionalBenchmarks.MIXED_OPERATIONS MEM_GRAPH 511464,911 7447,120 ops/s thrpt 25
SmallGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_K_RW_5x5 TXN_GRAPH 861,948 19,946 ops/s thrpt 25
SmallGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_K_RW_5x5 SYNCHRONIZED_GRAPH_V1 2326,383 11,281 ops/s thrpt 25
SmallGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_K_RW_5x5 SYNCHRONIZED_GRAPH_V2 1647,428 13,200 ops/s thrpt 25
SmallGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_K_RW_5x5 RW_LOCKING_GRAPH_V1 1360,096 8,573 ops/s thrpt 25
SmallGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_K_RW_5x5 RW_LOCKING_GRAPH_V2 1364,187 11,645 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_A_RW_5x6 TXN_GRAPH 44,571 0,406 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_A_RW_5x6 SYNCHRONIZED_GRAPH_V1 388,593 0,572 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_A_RW_5x6 SYNCHRONIZED_GRAPH_V2 196,814 2,185 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_A_RW_5x6 RW_LOCKING_GRAPH_V1 174,625 3,216 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_A_RW_5x6 RW_LOCKING_GRAPH_V2 175,428 6,557 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_B_R_5x5 TXN_GRAPH 10,474 0,041 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_B_R_5x5 SYNCHRONIZED_GRAPH_V1 256,124 2,280 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_B_R_5x5 SYNCHRONIZED_GRAPH_V2 202,822 1,607 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_B_R_5x5 RW_LOCKING_GRAPH_V1 262,363 2,302 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_B_R_5x5 RW_LOCKING_GRAPH_V2 259,216 1,256 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_C_RW_8x14 TXN_GRAPH 17,381 0,488 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_C_RW_8x14 SYNCHRONIZED_GRAPH_V1 383,599 1,189 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_C_RW_8x14 SYNCHRONIZED_GRAPH_V2 116,886 1,096 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_C_RW_8x14 RW_LOCKING_GRAPH_V1 80,700 0,751 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_C_RW_8x14 RW_LOCKING_GRAPH_V2 80,328 0,380 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_DC_RW_6x14 TXN_GRAPH 12,106 0,306 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_DC_RW_6x14 SYNCHRONIZED_GRAPH_V1 239,483 0,531 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_DC_RW_6x14 SYNCHRONIZED_GRAPH_V2 82,769 1,018 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_DC_RW_6x14 RW_LOCKING_GRAPH_V1 58,756 0,197 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_DC_RW_6x14 RW_LOCKING_GRAPH_V2 57,630 0,316 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_5x5 TXN_GRAPH 134,213 2,101 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_5x5 SYNCHRONIZED_GRAPH_V1 1166,114 10,125 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_5x5 SYNCHRONIZED_GRAPH_V2 1140,289 6,863 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_5x5 RW_LOCKING_GRAPH_V1 1125,440 18,303 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_5x5 RW_LOCKING_GRAPH_V2 1110,576 5,923 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_H_RW_4x8 TXN_GRAPH 8,564 0,087 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_H_RW_4x8 SYNCHRONIZED_GRAPH_V1 200,555 1,549 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_H_RW_4x8 SYNCHRONIZED_GRAPH_V2 123,483 1,655 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_H_RW_4x8 RW_LOCKING_GRAPH_V1 128,941 1,356 ops/s thrpt 25
PizzaGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_H_RW_4x8 RW_LOCKING_GRAPH_V2 129,192 1,150 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_6x21 TXN_GRAPH 27,264 0,557 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_6x21 SYNCHRONIZED_GRAPH_V1 243,342 2,209 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_6x21 SYNCHRONIZED_GRAPH_V2 242,921 3,252 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_6x21 RW_LOCKING_GRAPH_V1 247,684 3,352 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_D_W_6x21 RW_LOCKING_GRAPH_V2 246,687 1,778 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_F_RW_5x4 TXN_GRAPH 6,203 0,180 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_F_RW_5x4 SYNCHRONIZED_GRAPH_V1 4,889 0,276 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_F_RW_5x4 SYNCHRONIZED_GRAPH_V2 2,159 0,049 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_F_RW_5x4 RW_LOCKING_GRAPH_V1 3,764 0,077 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_F_RW_5x4 RW_LOCKING_GRAPH_V2 3,767 0,081 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_G_R_4x11 TXN_GRAPH 0,887 0,004 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_G_R_4x11 SYNCHRONIZED_GRAPH_V1 215,077 4,978 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_G_R_4x11 SYNCHRONIZED_GRAPH_V2 176,964 8,118 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_G_R_4x11 RW_LOCKING_GRAPH_V1 197,756 6,029 ops/s thrpt 25
BigGraphConcurrentBenchmarks.CONCURRENT_SCENARIO_G_R_4x11 RW_LOCKING_GRAPH_V2 192,724 15,460 ops/s thrpt 25
```
Apache License Version 2.0
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ kotlin.code.style=official
# https://github.com/melix/jmh-gradle-plugin
jmhGradlePluginVersion=0.7.2
# https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib
kotlinVersion=1.9.22
kotlinVersion=1.9.23
# https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core
kotlinCoroutinesVersion=1.7.3
kotlinCoroutinesVersion=1.8.0
# https://mvnrepository.com/artifact/org.apache.jena/jena-arq
jenaVersion=4.10.0
# https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
junitVersion=5.10.1
junitVersion=5.10.2

0 comments on commit 3ed01d7

Please sign in to comment.