diff --git a/theodolite-benchmarks/buildSrc/src/main/groovy/theodolite.beam.dataflow.gradle b/theodolite-benchmarks/buildSrc/src/main/groovy/theodolite.beam.dataflow.gradle new file mode 100644 index 0000000000000000000000000000000000000000..3499ba449dbb699038427b622003d5bcf145e034 --- /dev/null +++ b/theodolite-benchmarks/buildSrc/src/main/groovy/theodolite.beam.dataflow.gradle @@ -0,0 +1,7 @@ +plugins { + id 'theodolite.beam' +} + +dependencies { + implementation 'org.apache.beam:beam-runners-google-cloud-dataflow-java:2.35.0' +} \ No newline at end of file diff --git a/theodolite-benchmarks/settings.gradle b/theodolite-benchmarks/settings.gradle index 776e7d8e4fe132839b6e27c70c368720415721ea..42651f5970d1744ccb94866f19e8742a60ce8e31 100644 --- a/theodolite-benchmarks/settings.gradle +++ b/theodolite-benchmarks/settings.gradle @@ -10,6 +10,7 @@ include 'uc1-commons' include 'uc1-kstreams' include 'uc1-flink' include 'uc1-beam' +include 'uc1-beam-dataflow' include 'uc1-beam-flink' include 'uc1-beam-samza' @@ -24,6 +25,7 @@ include 'uc3-load-generator' include 'uc3-kstreams' include 'uc3-flink' include 'uc3-beam' +include 'uc3-beam-dataflow' include 'uc3-beam-flink' include 'uc3-beam-samza' @@ -35,3 +37,4 @@ include 'uc4-beam-flink' include 'uc4-beam-samza' include 'http-bridge' + diff --git a/theodolite-benchmarks/uc1-beam-dataflow/.gitignore b/theodolite-benchmarks/uc1-beam-dataflow/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7bf05dd280fcc888467656ce1fbdeb65322c7ba8 --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-dataflow/.gitignore @@ -0,0 +1 @@ +state \ No newline at end of file diff --git a/theodolite-benchmarks/uc1-beam-dataflow/Dockerfile b/theodolite-benchmarks/uc1-beam-dataflow/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..cf6ef6675464e3c9d37db492b39fd8a71ec60e63 --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-dataflow/Dockerfile @@ -0,0 +1,9 @@ +FROM openjdk:11-slim + +ENV MAX_SOURCE_PARALLELISM=1024 + +ADD build/distributions/uc1-beam-samza.tar / +ADD samza-standalone.properties / + +CMD /uc1-beam-samza/bin/uc1-beam-samza --configFilePath=samza-standalone.properties --samzaExecutionEnvironment=STANDALONE --maxSourceParallelism=$MAX_SOURCE_PARALLELISM --enableMetrics=false --configOverride="{\"job.coordinator.zk.connect\":\"$SAMZA_JOB_COORDINATOR_ZK_CONNECT\"}" + diff --git a/theodolite-benchmarks/uc1-beam-dataflow/build.gradle b/theodolite-benchmarks/uc1-beam-dataflow/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..21ffd94500cf2945f04fbe59c511ec370b891a37 --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-dataflow/build.gradle @@ -0,0 +1,19 @@ +plugins { + id 'theodolite.beam.dataflow' +} + +dependencies { + implementation project(':uc1-beam') +} + +sourceSets { + main { + resources { + srcDirs += [ + project(':uc1-beam').sourceSets.main.resources + ] + } + } +} + +mainClassName = "rocks.theodolite.benchmarks.uc1.beam.dataflow.Uc1BeamDataflow" diff --git a/theodolite-benchmarks/uc1-beam-dataflow/src/main/java/rocks/theodolite/benchmarks/uc1/beam/dataflow/Uc1BeamDataflow.java b/theodolite-benchmarks/uc1-beam-dataflow/src/main/java/rocks/theodolite/benchmarks/uc1/beam/dataflow/Uc1BeamDataflow.java new file mode 100644 index 0000000000000000000000000000000000000000..24af2f24d175509a43b669f5cddf5eaad0bd81ba --- /dev/null +++ b/theodolite-benchmarks/uc1-beam-dataflow/src/main/java/rocks/theodolite/benchmarks/uc1/beam/dataflow/Uc1BeamDataflow.java @@ -0,0 +1,21 @@ +package rocks.theodolite.benchmarks.uc1.beam.dataflow; + +import org.apache.beam.runners.dataflow.DataflowRunner; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc1.beam.PipelineFactory; + +/** + * Implementation of the use case Database Storage using Apache Beam with the Google Cloud Dataflow + * runner. + */ +public final class Uc1BeamDataflow { + + private Uc1BeamDataflow() {} + + /** + * Main method. + */ + public static void main(final String[] args) { + new BeamService(PipelineFactory.factory(), DataflowRunner.class, args).runStandalone(); + } +} diff --git a/theodolite-benchmarks/uc3-beam-dataflow/.gitignore b/theodolite-benchmarks/uc3-beam-dataflow/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7bf05dd280fcc888467656ce1fbdeb65322c7ba8 --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-dataflow/.gitignore @@ -0,0 +1 @@ +state \ No newline at end of file diff --git a/theodolite-benchmarks/uc3-beam-dataflow/Dockerfile b/theodolite-benchmarks/uc3-beam-dataflow/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..54979b8e1fa8aa9ac7d073302301bd10cbff5f34 --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-dataflow/Dockerfile @@ -0,0 +1,8 @@ +FROM openjdk:11-slim + +ENV MAX_SOURCE_PARALLELISM=1024 + +ADD build/distributions/uc3-beam-samza.tar / +ADD samza-standalone.properties / + +CMD /uc3-beam-samza/bin/uc3-beam-samza --configFilePath=samza-standalone.properties --samzaExecutionEnvironment=STANDALONE --maxSourceParallelism=$MAX_SOURCE_PARALLELISM --enableMetrics=false --configOverride="{\"job.coordinator.zk.connect\":\"$SAMZA_JOB_COORDINATOR_ZK_CONNECT\"}" diff --git a/theodolite-benchmarks/uc3-beam-dataflow/build.gradle b/theodolite-benchmarks/uc3-beam-dataflow/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..dabf19000f884c44657eadd15670c2eda1a4802e --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-dataflow/build.gradle @@ -0,0 +1,19 @@ +plugins { + id 'theodolite.beam.dataflow' +} + +dependencies { + implementation project(':uc3-beam') +} + +sourceSets { + main { + resources { + srcDirs += [ + project(':uc3-beam').sourceSets.main.resources + ] + } + } +} + +mainClassName = "rocks.theodolite.benchmarks.uc3.beam.dataflow.Uc3BeamDataflow" diff --git a/theodolite-benchmarks/uc3-beam-dataflow/src/main/java/rocks/theodolite/benchmarks/uc3/beam/dataflow/Uc3BeamDataflow.java b/theodolite-benchmarks/uc3-beam-dataflow/src/main/java/rocks/theodolite/benchmarks/uc3/beam/dataflow/Uc3BeamDataflow.java new file mode 100644 index 0000000000000000000000000000000000000000..5c8bc8c423a9f6fd64bc7ca663588dab19e10e74 --- /dev/null +++ b/theodolite-benchmarks/uc3-beam-dataflow/src/main/java/rocks/theodolite/benchmarks/uc3/beam/dataflow/Uc3BeamDataflow.java @@ -0,0 +1,23 @@ +package rocks.theodolite.benchmarks.uc3.beam.dataflow; + +import org.apache.beam.runners.dataflow.DataflowRunner; +import rocks.theodolite.benchmarks.commons.beam.BeamService; +import rocks.theodolite.benchmarks.uc3.beam.PipelineFactory; + +/** + * Implementation of the use case Aggregation based on Time Attributes using Apache Beam with the + * Google Cloud Dataflow runner. + */ +public final class Uc3BeamDataflow { + + private Uc3BeamDataflow() {} + + /** + * Start running this microservice. + */ + public static void main(final String[] args) { + new BeamService(PipelineFactory.factory(), DataflowRunner.class, args).runStandalone(); + } + +} +