-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a Redis backed version of the command-router service #3621
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ | |
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.infinispan</groupId> | ||
<artifactId>infinispan-core-jakarta</artifactId> | ||
|
@@ -59,18 +60,30 @@ | |
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.eclipse.hono</groupId> | ||
<artifactId>hono-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.hono</groupId> | ||
<artifactId>client-device-connection</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.hono</groupId> | ||
<artifactId>hono-client-common</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-web</artifactId> | ||
<artifactId>vertx-core</artifactId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed a dependency on vertx-web and replaced it with vertx-core which does not seem to have had any adverse effects. So my feeling is that vertx-web was not needed and vertx-core is sufficient. |
||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-core</artifactId> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
|
||
See the NOTICE file(s) distributed with this work for additional | ||
information regarding copyright ownership. | ||
|
||
This program and the accompanying materials are made available under the | ||
terms of the Eclipse Public License 2.0 which is available at | ||
http://www.eclipse.org/legal/epl-2.0 | ||
|
||
SPDX-License-Identifier: EPL-2.0 | ||
--> | ||
<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>org.eclipse.hono</groupId> | ||
<artifactId>hono-bom</artifactId> | ||
<version>2.6.0-SNAPSHOT</version> | ||
<relativePath>../bom</relativePath> | ||
</parent> | ||
<artifactId>client-device-connection-redis</artifactId> | ||
|
||
<name>Redis Device Connection client</name> | ||
<description>A Redis based client for accessing device connection information in a Redis cluster.</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.eclipse.hono</groupId> | ||
<artifactId>client-device-connection</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-redis-client</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.eclipse.hono</groupId> | ||
<artifactId>hono-legal</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.hono</groupId> | ||
<artifactId>hono-core</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
|
||
<!-- | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-redis-client</artifactId> | ||
</dependency> | ||
--> | ||
|
||
<!-- testing --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently there are no unit tests in this module. If none are added, these dependencies should be removed. I need to dive into this a bit and see if I can figure out some way to set up mock tests for the redis cache. |
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-params</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.truth</groupId> | ||
<artifactId>truth</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.hono</groupId> | ||
<artifactId>core-test-utils</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.jboss.jandex</groupId> | ||
<artifactId>jandex-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created two "concrete" modules here that will produce docker images:
hono-service-command-router-infinispan
andhono-service-command-router-redis
.The problem with that is that we'd be changing the legacy name of the command router service (
hono-service-command-router
). So the question is whether I should instead use the legacy name for the Infinispan implementation, in order to maintain some sort of a backwards compatibility? It feels "cleaner" to me to explicitly name the docker images with the technology that they support and that's the way it's done in the device-registry service (one is explicitly named-mongodb
and the other one is-jdbc
). But that could potentially cause some trouble where the old image name suddenly stops being produced.Another solution to this could be to have the pipeline that builds and publishes the images tag the
-infinispan
image additionally with the old name as well?