Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ jobs:
# libmeos is already built and installed under /usr/local by the
# provision-meos action, so build-jmeos.sh skips its own libmeos build
# and only builds the JMEOS jar from JMEOS main, installs it into the
# local Maven repo, and stages libmeos.so under kafka-streams-app/lib.
# local Maven repo, and stages libmeos.so under the reactor-root lib/.
run: JOBS=2 ./build-jmeos.sh

- name: Test the Kafka Streams app
# The generated MeosOps* facades forward to the installed JMEOS jar; the tests
# exercise them against the freshly built libmeos, resolved via LD_LIBRARY_PATH.
working-directory: kafka-streams-app
run: LD_LIBRARY_PATH="$PWD/lib" mvn -B test
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ tools/meos-idl.json

# JMEOS native dependency — generated by build-jmeos.sh, never committed
.build-jmeos/
kafka-streams-app/jar/
kafka-streams-app/lib/
jar/
lib/
*.jar
*.so

Expand Down
File renamed without changes.
131 changes: 131 additions & 0 deletions benchmark/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.mobilitydb.kafka</groupId>
<artifactId>mobility-kafka-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>mobility-kafka-benchmark</artifactId>

<!-- The BerlinMOD streaming benchmark: a Kafka Streams application built on the binding.
Its MEOS access goes entirely through the binding's generated surface. -->

<dependencies>
<dependency>
<groupId>com.mobilitydb.kafka</groupId>
<artifactId>mobility-kafka-binding</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>

<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams-test-utils</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<!-- Embedded Kafka broker for the runtime throughput benchmark. -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<version>${kafka.version}</version>
<type>test-jar</type><classifier>test</classifier><scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>${kafka.version}</version>
<type>test-jar</type><classifier>test</classifier><scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
<type>test-jar</type><classifier>test</classifier><scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-server-common</artifactId>
<version>${kafka.version}</version>
<type>test-jar</type><classifier>test</classifier><scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
117 changes: 117 additions & 0 deletions binding/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.mobilitydb.kafka</groupId>
<artifactId>mobility-kafka-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>mobility-kafka-binding</artifactId>

<!-- The Kafka MEOS binding: the org.mobilitydb.meos.MeosOps* facades generated from the
JMEOS catalog at build time, plus the generic Kafka Streams wiring layer over them.
A pure projection of the MEOS surface — no application or benchmark code. -->

<dependencies>
<dependency>
<groupId>com.mobilitydb</groupId>
<artifactId>jmeos</artifactId>
<version>${jmeos.version}</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId>
<version>${jnr.version}</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>${kafka.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams-test-utils</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- Generate the org.mobilitydb.meos.MeosOps* facades from the installed JMEOS jar's
surface at build time (into target/, never committed), via the single generator
vendored identically by every JVM binding. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>generate-facades</id>
<phase>generate-sources</phase>
<goals><goal>exec</goal></goals>
<configuration>
<executable>python3</executable>
<arguments>
<argument>${project.basedir}/../tools/codegen_jvm.py</argument>
<argument>--engine</argument>
<argument>kafka</argument>
<argument>--catalog</argument>
<argument>${project.basedir}/../tools/meos-idl.json</argument>
<argument>--jar</argument>
<argument>${settings.localRepository}/com/mobilitydb/jmeos/${jmeos.version}/jmeos-${jmeos.version}.jar</argument>
<argument>--out</argument>
<argument>${project.build.directory}/generated-facades</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>add-generated-facades</id>
<phase>generate-sources</phase>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-facades/src/main/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
6 changes: 3 additions & 3 deletions build-jmeos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
# 3. Registers the jar in the local Maven repository via
# `mvn install:install-file` under the coordinates the kafka-streams-app
# pom depends on (com.mobilitydb:jmeos:1.4.0 by default).
# 4. Copies libmeos.so into kafka-streams-app/lib/ for the test/runtime
# 4. Copies libmeos.so into the reactor-root lib/ for the test/runtime
# LD_LIBRARY_PATH.
#
# After running this once, `cd kafka-streams-app && mvn test` resolves JMEOS as
# After running this once, `mvn test` resolves JMEOS as
# an ordinary dependency — no committed jar/so required.
#
# The refs below track upstream MobilityDB master and MobilityDB/JMEOS main — the
Expand Down Expand Up @@ -51,7 +51,7 @@ JMEOS_VERSION="${JMEOS_VERSION:-1.4.0}"
# Layout.
# ---------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
APP_DIR="${SCRIPT_DIR}/kafka-streams-app"
APP_DIR="${SCRIPT_DIR}"
WORK_DIR="${WORK_DIR:-${SCRIPT_DIR}/.build-jmeos}"
JOBS="${JOBS:-$(nproc 2>/dev/null || echo 4)}"

Expand Down
Loading
Loading