From a91c2f61a12c13abb8ebd79acbdbfd39b05f1384 Mon Sep 17 00:00:00 2001 From: Artem Vysochyn Date: Mon, 21 Sep 2020 11:43:56 +0300 Subject: [PATCH 1/3] Updated github-actions support --- .../{feature-ci.yml => branch-ci.yml} | 9 ++- .github/workflows/master-ci.yml | 64 ------------------- .github/workflows/pre-release-ci.yml | 37 +++++++++++ .github/workflows/release-ci.yml | 44 +++++++++---- DEVELOPMENT.md | 20 ------ pom.xml | 10 ++- 6 files changed, 78 insertions(+), 106 deletions(-) rename .github/workflows/{feature-ci.yml => branch-ci.yml} (89%) delete mode 100644 .github/workflows/master-ci.yml create mode 100644 .github/workflows/pre-release-ci.yml delete mode 100644 DEVELOPMENT.md diff --git a/.github/workflows/feature-ci.yml b/.github/workflows/branch-ci.yml similarity index 89% rename from .github/workflows/feature-ci.yml rename to .github/workflows/branch-ci.yml index c0611d29..b6399688 100644 --- a/.github/workflows/feature-ci.yml +++ b/.github/workflows/branch-ci.yml @@ -1,18 +1,17 @@ -name: Feature Branch CI +name: Branch CI on: push: paths-ignore: - '.github/workflows/**' - - 'README.md' + - '*.md' + - '*.txt' branches-ignore: - - 'master' - - 'develop' - 'release*' jobs: build: - name: Feature Branch CI + name: Branch CI runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/master-ci.yml b/.github/workflows/master-ci.yml deleted file mode 100644 index b79bcd53..00000000 --- a/.github/workflows/master-ci.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Master branch CI - -on: - push: - branches: - - 'master' - -jobs: - build: - name: Master Branch CI - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - server-id: github - server-username: GITHUB_ACTOR - server-password: GITHUB_TOKEN - - name: Maven Build - run: mvn clean install -DskipTests=true -Ddockerfile.skip=true -B -V - env: - GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} - - name: Maven Verify - run: mvn verify -B - - name: Configure git - run: | - echo "Git checkout branch ${GITHUB_REF##*/}, commit ${GITHUB_SHA} was pushed by ${GITHUB_ACTOR}" - git checkout ${GITHUB_REF##*/} - echo "Git reset hard to ${GITHUB_SHA}" - git reset --hard ${GITHUB_SHA} - git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - git config --global user.name "${GITHUB_ACTOR}" - - name: Prepare release - id: prepare_release - run: | - mvn --batch-mode build-helper:parse-version release:prepare -P release \ - -DreleaseVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion} \ - -DdevelopmentVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT \ - -DautoVersionSubmodules=true -Darguments="-DskipTests=true" - echo ::set-output name=release_tag::$(git describe --tags --abbrev=0) - - name: Perform release - run: mvn --batch-mode release:perform -P release -Darguments="-DskipTests=true -Ddocker.image.extra-tag=master" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} - - name: Rollback release - if: failure() - run: | - mvn release:rollback || echo "nothing to rollback" - if [ ! -z "${{ steps.prepare_release.outputs.release_tag }}" ] - then - git tag -d ${{ steps.prepare_release.outputs.release_tag }} - git push origin :refs/tags/${{ steps.prepare_release.outputs.release_tag }} - fi diff --git a/.github/workflows/pre-release-ci.yml b/.github/workflows/pre-release-ci.yml new file mode 100644 index 00000000..664e97c9 --- /dev/null +++ b/.github/workflows/pre-release-ci.yml @@ -0,0 +1,37 @@ +name: Pre-release CI + +on: + release: + types: [prereleased] + +jobs: + build: + name: Pre-release CI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN + - name: Deploy pre-release version + run: | + pre_release_version=${{ github.event.release.tag_name }} + echo Pre-release version $pre_release_version + mvn versions:set -DnewVersion=$pre_release_version -DgenerateBackupPoms=false + mvn versions:commit + mvn clean deploy -B -V + env: + GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} + - name: Rollback pre-release (remove tag) + if: failure() + run: git push origin :refs/tags/${{ github.event.release.tag_name }} diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index 5624043c..d674150d 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -2,7 +2,7 @@ name: Release CI on: release: - types: [published] + types: [released] jobs: build: @@ -10,6 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: git checkout ${{ github.event.release.target_commitish }} - uses: actions/cache@v1 with: path: ~/.m2/repository @@ -23,16 +26,35 @@ jobs: server-id: github server-username: GITHUB_ACTOR server-password: GITHUB_TOKEN - - name: Deploy release version - run: | - # `tag` is the concatenation of `v` and a version by the tag convention. - release_version=$(echo ${{ github.event.release.tag_name }} | sed "s/v//") - echo Release version $release_version - mvn versions:set -DnewVersion=$release_version -DgenerateBackupPoms=false - mvn versions:commit - mvn clean deploy -B -V + - name: Maven Build + run: mvn clean install -DskipTests=true -Ddockerfile.skip=true -B -V env: GITHUB_TOKEN: ${{ secrets.ORGANIZATION_TOKEN }} - - name: Rollback release (remove tag) + - name: Maven Verify + run: mvn verify -B + - name: Configure git + run: | + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git config --global user.name "${GITHUB_ACTOR}" + - name: Prepare release + id: prepare_release + run: | + mvn -B build-helper:parse-version release:prepare \ + -DreleaseVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion} \ + -Darguments="-DskipTests=true -Ddockerfile.skip=true" + echo ::set-output name=release_tag::$(git describe --tags --abbrev=0) + - name: Perform release + run: mvn -B release:perform -Darguments="-DskipTests=true -Ddockerfile.skip=true" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} + - name: Rollback release if: failure() - run: git push origin :refs/tags/${{ github.event.release.tag_name }} + run: | + mvn release:rollback || echo "nothing to rollback" + git push origin :refs/tags/${{ github.event.release.tag_name }} + if [ ! -z "${{ steps.prepare_release.outputs.release_tag }}" ] + then + git tag -d ${{ steps.prepare_release.outputs.release_tag }} + git push origin :refs/tags/${{ steps.prepare_release.outputs.release_tag }} + fi diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md deleted file mode 100644 index 72e6d386..00000000 --- a/DEVELOPMENT.md +++ /dev/null @@ -1,20 +0,0 @@ -# Setting up development environment - -## Install the necessary build tools -You require to have latest stable [Oracle JDK 7](http://java.oracle.com/), latest stable -[Apache Maven](http://maven.apache.org/) and [Git](http://git-scm.com/) installed on your machine. - -## Set up IntelliJ IDEA -ScaleCube project team uses [IntelliJ IDEA](http://www.jetbrains.com/idea/) as the primary IDE, although we are fine -with using other development environments as long as you adhere to our coding style. - -### Code style -ScaleCube project team uses [Google code style](http://google.github.io/styleguide/javaguide.html) with -next modifications: -* Maximum line length is 120 -* Special package in import order is io.scalecube. - -We use [Eclipse code formatter plugin] (https://github.com/krasa/EclipseCodeFormatter#instructions). -Download [this code style configuration](https://github.com/scalecube/scalecube/blob/master/eclipse-java-google-style.xml) -and [import order configuration](https://github.com/scalecube/scalecube/blob/master/style.importorder) and configure -your IDEA plugin with those settings. Configuration is also available in the root project folder. diff --git a/pom.xml b/pom.xml index 4b6bccbc..3f1c7e2c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.scalecube scalecube-parent-pom - 0.2.1 + 0.2.17 scalecube-gateway-parent @@ -65,10 +65,10 @@ - 1.0.10 + 1.0.11 2.10.8 1.2.2 - 0.4.6 + 0.4.7 Dysprosium-SR9 1.0.1 @@ -88,11 +88,9 @@ services-gateway-netty - services-gateway-tests - services-gateway-runner services-gateway-client-transport - services-gateway-benchmarks services-gateway-examples + services-gateway-tests From 5800b47b6e737a2331c2e76e5f43b3d9669f8536 Mon Sep 17 00:00:00 2001 From: Artem Vysochyn Date: Mon, 21 Sep 2020 11:47:07 +0300 Subject: [PATCH 2/3] Remove runner and benchmarks --- services-gateway-benchmarks/Dockerfile | 58 ------- services-gateway-benchmarks/pom.xml | 85 ---------- .../services/benchmarks/LatencyHelper.java | 58 ------- .../gateway/AbstractBenchmarkState.java | 63 ------- .../gateway/GatewayClientCodecs.java | 28 ---- .../gateway/InfiniteStreamScenario.java | 96 ----------- .../gateway/RequestOneScenario.java | 82 --------- .../DistributedBenchmarkState.java | 74 --------- .../http/DistributedRequestOneBenchmark.java | 28 ---- .../DistributedInfiniteStreamBenchmark.java | 28 ---- .../DistributedRequestOneBenchmark.java | 28 ---- .../DistributedInfiniteStreamBenchmark.java | 28 ---- .../DistributedRequestOneBenchmark.java | 28 ---- .../gateway/remote/RemoteBenchmarkState.java | 37 ----- .../http/RemoteRequestOneBenchmark.java | 30 ---- .../RemoteInfiniteStreamBenchmark.java | 30 ---- .../rsocket/RemoteRequestOneBenchmark.java | 30 ---- .../RemoteInfiniteStreamBenchmark.java | 30 ---- .../websocket/RemoteRequestOneBenchmark.java | 30 ---- .../standalone/StandaloneBenchmarkState.java | 61 ------- .../http/StandaloneRequestOneBenchmark.java | 28 ---- .../StandaloneInfiniteStreamBenchmark.java | 28 ---- .../StandaloneRequestOneBenchmark.java | 28 ---- .../StandaloneInfiniteStreamBenchmark.java | 28 ---- .../StandaloneRequestOneBenchmark.java | 28 ---- services-gateway-runner/Dockerfile | 58 ------- services-gateway-runner/pom.xml | 83 ---------- .../services/gateway/GatewayRunner.java | 156 ------------------ .../main/resources/config-gateway.properties | 5 - .../src/main/resources/log4j2.xml | 68 -------- 30 files changed, 1442 deletions(-) delete mode 100644 services-gateway-benchmarks/Dockerfile delete mode 100644 services-gateway-benchmarks/pom.xml delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/LatencyHelper.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/AbstractBenchmarkState.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/GatewayClientCodecs.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/InfiniteStreamScenario.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/RequestOneScenario.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/DistributedBenchmarkState.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/http/DistributedRequestOneBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/rsocket/DistributedInfiniteStreamBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/rsocket/DistributedRequestOneBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/websocket/DistributedInfiniteStreamBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/websocket/DistributedRequestOneBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/RemoteBenchmarkState.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/http/RemoteRequestOneBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/rsocket/RemoteInfiniteStreamBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/rsocket/RemoteRequestOneBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/websocket/RemoteInfiniteStreamBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/websocket/RemoteRequestOneBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/StandaloneBenchmarkState.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/http/StandaloneRequestOneBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/rsocket/StandaloneInfiniteStreamBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/rsocket/StandaloneRequestOneBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/websocket/StandaloneInfiniteStreamBenchmark.java delete mode 100644 services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/websocket/StandaloneRequestOneBenchmark.java delete mode 100644 services-gateway-runner/Dockerfile delete mode 100644 services-gateway-runner/pom.xml delete mode 100644 services-gateway-runner/src/main/java/io/scalecube/services/gateway/GatewayRunner.java delete mode 100644 services-gateway-runner/src/main/resources/config-gateway.properties delete mode 100644 services-gateway-runner/src/main/resources/log4j2.xml diff --git a/services-gateway-benchmarks/Dockerfile b/services-gateway-benchmarks/Dockerfile deleted file mode 100644 index 4899efaf..00000000 --- a/services-gateway-benchmarks/Dockerfile +++ /dev/null @@ -1,58 +0,0 @@ -FROM openjdk:11-jdk-slim - -ARG EXECUTABLE_JAR -ARG SERVICE_NAME -ARG SERVICE_VERSION -ENV SERVICE_NAME ${SERVICE_NAME} -ENV SERVICE_VERSION ${SERVICE_VERSION} -ENV DUMPS_DIR /opt/scalecube/dumps -ENV LOGS_DIR /opt/scalecube/logs -ENV JMX_PORT 5678 -ENV LOG4J_CONFIGURATION_FILE ${LOG4J_CONFIGURATION_FILE:-log4j2-benchmarks.xml} -ENV PRINT_FLAGS_FINAL ${PRINT_FLAGS_FINAL:-"-XX:+PrintFlagsFinal"} - -EXPOSE $JMX_PORT - -WORKDIR /opt/scalecube - -RUN mkdir -p $DUMPS_DIR -RUN mkdir -p $LOGS_DIR - -ENV DEFAULT_JAVA_OPTS="\ --Xlog:gc*,safepoint:$LOGS_DIR/gc.log \ --Xlog:os+container=info \ --XX:InitialRAMPercentage=50 \ --XX:MinRAMPercentage=50 \ --XX:MaxRAMPercentage=70 \ --XX:NativeMemoryTracking=detail \ --XX:+HeapDumpOnOutOfMemoryError \ --XX:HeapDumpPath=$DUMPS_DIR/$SERVICE_NAME-oom.hprof \ --Djava.net.preferIPv4Stack=true \ --Dsun.rmi.dgc.client.gcInterval=3600000 \ --Dsun.rmi.dgc.server.gcInterval=3600000 \ --Djava.rmi.server.hostname=127.0.0.1 \ --Dcom.sun.management.jmxremote \ --Dcom.sun.management.jmxremote.authenticate=false \ --Dcom.sun.management.jmxremote.ssl=false \ --Dcom.sun.management.jmxremote.local.only=false \ --XX:+AlwaysActAsServerClassMachine \ --XX:+UnlockExperimentalVMOptions \ --XX:+TrustFinalNonStaticFields \ --XX:+UnlockDiagnosticVMOptions \ --XX:GuaranteedSafepointInterval=300000 \ --XX:BiasedLockingStartupDelay=0" - -COPY target/lib lib -COPY target/${EXECUTABLE_JAR}.jar app.jar - -ENTRYPOINT exec java \ -$PRINT_FLAGS_FINAL \ -$DEFAULT_JAVA_OPTS \ -$JAVA_OPTS \ -$DEFAULT_JMX_OPTS \ -$DEFAULT_OOM_OPTS \ --Dcom.sun.management.jmxremote.port=$JMX_PORT \ --Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT \ --Dlog4j.configurationFile=$LOG4J_CONFIGURATION_FILE \ --Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector \ --cp benchmarks.jar $PROGRAM_ARGS diff --git a/services-gateway-benchmarks/pom.xml b/services-gateway-benchmarks/pom.xml deleted file mode 100644 index 7002b3a5..00000000 --- a/services-gateway-benchmarks/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - scalecube-gateway-parent - io.scalecube - 2.10.3-SNAPSHOT - - 4.0.0 - - scalecube-services-gateway-benchmarks - - - io.scalecube.services.gateway.GatewayRunner - scalecube-gateway-benchmarks - scalecube/scalecube-gateway - - - - - io.scalecube - scalecube-services-gateway-netty - ${project.version} - - - io.scalecube - scalecube-services-gateway-client-transport - ${project.version} - - - io.scalecube - scalecube-services-examples - ${scalecube-services.version} - - - - io.scalecube - scalecube-services - - - io.scalecube - scalecube-services-discovery - - - io.scalecube - scalecube-services-transport-rsocket - - - io.scalecube - scalecube-services-transport-jackson - - - - io.scalecube - scalecube-benchmarks-api - - - io.scalecube - scalecube-benchmarks-log4j2 - - - - io.dropwizard.metrics - metrics-core - - - - - - - maven-jar-plugin - - - maven-dependency-plugin - - runtime - - - - com.spotify - dockerfile-maven-plugin - - - - - diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/LatencyHelper.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/LatencyHelper.java deleted file mode 100644 index 0b6ef0d5..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/LatencyHelper.java +++ /dev/null @@ -1,58 +0,0 @@ -package io.scalecube.services.benchmarks; - -import io.scalecube.benchmarks.BenchmarkState; -import io.scalecube.benchmarks.metrics.BenchmarkTimer; -import io.scalecube.services.api.ServiceMessage; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.function.BiConsumer; - -public final class LatencyHelper { - - private static final String SERVICE_RECV_TIME = "service-recv-time"; - private static final String SERVICE_SEND_TIME = "service-send-time"; - private static final String CLIENT_RECV_TIME = "client-recv-time"; - private static final String CLIENT_SEND_TIME = "client-send-time"; - - private final BenchmarkTimer clientToServiceTimer; - private final BenchmarkTimer serviceToClientTimer; - - /** - * Creates an instance which helps calculate gateway latency by the headers into received message. - * - * @param state a benchmark state - */ - public LatencyHelper(BenchmarkState state) { - clientToServiceTimer = state.timer("timer.client-to-service"); - serviceToClientTimer = state.timer("timer.service-to-client"); - } - - /** - * Calculates latencies by the headers into received message. - * - * @param message client message - */ - public void calculate(ServiceMessage message) { - // client to service - eval( - message.header(SERVICE_RECV_TIME), - message.header(CLIENT_SEND_TIME), - (v1, v2) -> clientToServiceTimer.update(v1 - v2, TimeUnit.MILLISECONDS)); - - // service to client - eval( - message.header(CLIENT_RECV_TIME), - message.header(SERVICE_SEND_TIME), - (v1, v2) -> serviceToClientTimer.update(v1 - v2, TimeUnit.MILLISECONDS)); - } - - private void eval(String value0, String value1, BiConsumer consumer) { - Optional.ofNullable(value0) - .map(Long::parseLong) - .ifPresent( - long0 -> - Optional.ofNullable(value1) - .map(Long::parseLong) - .ifPresent(long1 -> consumer.accept(long0, long1))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/AbstractBenchmarkState.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/AbstractBenchmarkState.java deleted file mode 100644 index 7d28592e..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/AbstractBenchmarkState.java +++ /dev/null @@ -1,63 +0,0 @@ -package io.scalecube.services.benchmarks.gateway; - -import io.scalecube.benchmarks.BenchmarkSettings; -import io.scalecube.benchmarks.BenchmarkState; -import io.scalecube.net.Address; -import io.scalecube.services.Microservices; -import io.scalecube.services.api.ServiceMessage; -import io.scalecube.services.gateway.ReferenceCountUtil; -import io.scalecube.services.gateway.transport.GatewayClient; -import java.util.Optional; -import java.util.function.Function; -import java.util.logging.Level; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import reactor.core.publisher.Mono; -import reactor.core.publisher.SignalType; - -public abstract class AbstractBenchmarkState> - extends BenchmarkState { - - private static final Logger LOGGER = LoggerFactory.getLogger(AbstractBenchmarkState.class); - - public static final ServiceMessage FIRST_REQUEST = - ServiceMessage.builder().qualifier("/benchmarks/one").build(); - - protected Function clientBuilder; - - public AbstractBenchmarkState( - BenchmarkSettings settings, Function clientBuilder) { - super(settings); - this.clientBuilder = clientBuilder; - } - - @Override - protected void beforeAll() throws Exception { - super.beforeAll(); - int workerCount = Runtime.getRuntime().availableProcessors(); - } - - public abstract Mono createClient(); - - protected final Mono createClient( - Microservices gateway, String gatewayName, Function clientBuilder) { - return Mono.defer(() -> createClient(gateway.gateway(gatewayName).address(), clientBuilder)); - } - - protected final Mono createClient( - Address gatewayAddress, Function clientBuilder) { - return Mono.defer( - () -> { - GatewayClient client = clientBuilder.apply(gatewayAddress); - return client - .requestResponse(FIRST_REQUEST) - .log("benchmark-client-first-request", Level.INFO, false, SignalType.ON_NEXT) - .doOnNext( - response -> - Optional.ofNullable(response.data()) - .ifPresent(ReferenceCountUtil::safestRelease)) - .then(Mono.just(client)) - .doOnNext(c -> LOGGER.info("benchmark-client: {}", c)); - }); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/GatewayClientCodecs.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/GatewayClientCodecs.java deleted file mode 100644 index 51ffa7ec..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/GatewayClientCodecs.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway; - -import io.netty.buffer.ByteBuf; -import io.rsocket.Payload; -import io.scalecube.services.gateway.transport.GatewayClientCodec; -import io.scalecube.services.gateway.transport.http.HttpGatewayClientCodec; -import io.scalecube.services.gateway.transport.rsocket.RSocketGatewayClientCodec; -import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClientCodec; -import io.scalecube.services.transport.api.DataCodec; -import io.scalecube.services.transport.api.HeadersCodec; - -public class GatewayClientCodecs { - - public static final String CONTENT_TYPE = "application/json"; - - public static final HeadersCodec HEADERS_CODEC = HeadersCodec.getInstance(CONTENT_TYPE); - - public static final GatewayClientCodec WEBSOCKET_CLIENT_CODEC = - new WebsocketGatewayClientCodec(DataCodec.getInstance(CONTENT_TYPE)); - public static final GatewayClientCodec RSOCKET_CLIENT_CODEC = - new RSocketGatewayClientCodec(HEADERS_CODEC, DataCodec.getInstance(CONTENT_TYPE)); - public static final GatewayClientCodec HTTP_CLIENT_CODEC = - new HttpGatewayClientCodec(DataCodec.getInstance(CONTENT_TYPE)); - - private GatewayClientCodecs() { - // one instance; - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/InfiniteStreamScenario.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/InfiniteStreamScenario.java deleted file mode 100644 index ffdb107d..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/InfiniteStreamScenario.java +++ /dev/null @@ -1,96 +0,0 @@ -package io.scalecube.services.benchmarks.gateway; - -import static io.scalecube.services.examples.BenchmarkService.CLIENT_RECV_TIME; - -import io.scalecube.benchmarks.BenchmarkSettings; -import io.scalecube.benchmarks.metrics.BenchmarkMeter; -import io.scalecube.services.api.ServiceMessage; -import io.scalecube.services.benchmarks.LatencyHelper; -import java.time.Duration; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.function.Function; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import reactor.core.publisher.Flux; -import reactor.util.concurrent.Queues; - -public final class InfiniteStreamScenario { - - private static final Logger LOGGER = LoggerFactory.getLogger(InfiniteStreamScenario.class); - - public static final String QUALIFIER = "/benchmarks/infiniteStream"; - - private static final int DEFAULT_RATE_LIMIT = Queues.SMALL_BUFFER_SIZE; - - private static final String RATE_LIMIT = "rateLimit"; - - private InfiniteStreamScenario() { - // Do not instantiate - } - - /** - * Runner function for benchmarks. - * - * @param args program arguments - * @param benchmarkStateFactory producer function for {@link AbstractBenchmarkState} - */ - public static void runWith( - String[] args, Function> benchmarkStateFactory) { - - int numOfThreads = Runtime.getRuntime().availableProcessors(); - Duration rampUpDuration = Duration.ofSeconds(numOfThreads); - - BenchmarkSettings settings = - BenchmarkSettings.from(args) - .injectors(numOfThreads) - .messageRate(1) // workaround - .rampUpDuration(rampUpDuration) - .durationUnit(TimeUnit.MILLISECONDS) - .build(); - - AbstractBenchmarkState benchmarkState = benchmarkStateFactory.apply(settings); - - benchmarkState.runWithRampUp( - (rampUpTick, state) -> state.createClient(), - state -> { - LatencyHelper latencyHelper = new LatencyHelper(state); - - BenchmarkMeter serviceToClientMeter = state.meter("meter.service-to-client"); - - Integer rateLimit = rateLimit(settings); - - ServiceMessage request = ServiceMessage.builder().qualifier(QUALIFIER).build(); - - return client -> - (executionTick, task) -> - Flux.defer( - () -> - client - .requestStream(request) - .map(InfiniteStreamScenario::enrichResponse) - .limitRate(rateLimit) - .doOnNext( - message -> { - serviceToClientMeter.mark(); - latencyHelper.calculate(message); - }) - .doOnError( - th -> LOGGER.warn("Exception occured on requestStream: " + th))); - }, - (state, client) -> { - client.close(); - return client.onClose(); - }); - } - - private static Integer rateLimit(BenchmarkSettings settings) { - return Optional.ofNullable(settings.find(RATE_LIMIT, null)) - .map(Integer::parseInt) - .orElse(DEFAULT_RATE_LIMIT); - } - - private static ServiceMessage enrichResponse(ServiceMessage msg) { - return ServiceMessage.from(msg).header(CLIENT_RECV_TIME, System.currentTimeMillis()).build(); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/RequestOneScenario.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/RequestOneScenario.java deleted file mode 100644 index 0e9d9b75..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/RequestOneScenario.java +++ /dev/null @@ -1,82 +0,0 @@ -package io.scalecube.services.benchmarks.gateway; - -import static io.scalecube.services.examples.BenchmarkService.CLIENT_RECV_TIME; -import static io.scalecube.services.examples.BenchmarkService.CLIENT_SEND_TIME; - -import io.scalecube.benchmarks.BenchmarkSettings; -import io.scalecube.benchmarks.metrics.BenchmarkMeter; -import io.scalecube.services.api.ServiceMessage; -import io.scalecube.services.benchmarks.LatencyHelper; -import io.scalecube.services.gateway.ReferenceCountUtil; -import io.scalecube.services.gateway.transport.GatewayClient; -import java.util.Optional; -import java.util.function.Function; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import reactor.core.publisher.Mono; - -public final class RequestOneScenario { - - private static final Logger LOGGER = LoggerFactory.getLogger(RequestOneScenario.class); - - private static final String QUALIFIER = "/benchmarks/one"; - - private RequestOneScenario() { - // Do not instantiate - } - - /** - * Runner function for benchmarks. - * - * @param args program arguments - * @param benchmarkStateFactory producer function for {@link AbstractBenchmarkState} - */ - public static void runWith( - String[] args, Function> benchmarkStateFactory) { - - BenchmarkSettings settings = BenchmarkSettings.from(args).build(); - - AbstractBenchmarkState benchmarkState = benchmarkStateFactory.apply(settings); - - benchmarkState.runForAsync( - state -> { - LatencyHelper latencyHelper = new LatencyHelper(state); - - BenchmarkMeter clientToServiceMeter = state.meter("meter.client-to-service"); - BenchmarkMeter serviceToClientMeter = state.meter("meter.service-to-client"); - - ThreadLocal> clientHolder = - ThreadLocal.withInitial(() -> state.createClient().cache()); - - return i -> { - Mono clientMono = clientHolder.get(); - return clientMono.flatMap( - client -> { - clientToServiceMeter.mark(); - return client - .requestResponse(enrichRequest()) - .map(RequestOneScenario::enrichResponse) - .doOnNext( - msg -> { - serviceToClientMeter.mark(); - Optional.ofNullable(msg.data()) - .ifPresent(ReferenceCountUtil::safestRelease); - latencyHelper.calculate(msg); - }) - .doOnError(th -> LOGGER.warn("Exception occured on requestResponse: " + th)); - }); - }; - }); - } - - private static ServiceMessage enrichResponse(ServiceMessage msg) { - return ServiceMessage.from(msg).header(CLIENT_RECV_TIME, System.currentTimeMillis()).build(); - } - - private static ServiceMessage enrichRequest() { - return ServiceMessage.builder() - .qualifier(QUALIFIER) - .header(CLIENT_SEND_TIME, System.currentTimeMillis()) - .build(); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/DistributedBenchmarkState.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/DistributedBenchmarkState.java deleted file mode 100644 index d2ac940e..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/DistributedBenchmarkState.java +++ /dev/null @@ -1,74 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.distributed; - -import io.scalecube.benchmarks.BenchmarkSettings; -import io.scalecube.net.Address; -import io.scalecube.services.Microservices; -import io.scalecube.services.benchmarks.gateway.AbstractBenchmarkState; -import io.scalecube.services.discovery.ScalecubeServiceDiscovery; -import io.scalecube.services.examples.BenchmarkServiceImpl; -import io.scalecube.services.gateway.http.HttpGateway; -import io.scalecube.services.gateway.rsocket.RSocketGateway; -import io.scalecube.services.gateway.transport.GatewayClient; -import io.scalecube.services.gateway.ws.WebsocketGateway; -import io.scalecube.services.transport.rsocket.RSocketServiceTransport; -import java.util.function.Function; -import reactor.core.publisher.Mono; - -public class DistributedBenchmarkState extends AbstractBenchmarkState { - - private final String gatewayName; - - private Microservices services; - private Microservices gateway; - - public DistributedBenchmarkState( - BenchmarkSettings settings, - String gatewayName, - Function clientBuilder) { - super(settings, clientBuilder); - this.gatewayName = gatewayName; - } - - @Override - protected void beforeAll() throws Exception { - super.beforeAll(); - - gateway = - Microservices.builder() - .gateway(opts -> new RSocketGateway(opts.id("rsws"))) - .gateway(opts -> new WebsocketGateway(opts.id("ws"))) - .gateway(opts -> new HttpGateway(opts.id("http"))) - .discovery("gateway", ScalecubeServiceDiscovery::new) - .transport(RSocketServiceTransport::new) - .startAwait(); - - Address seedAddress = gateway.discovery("gateway").address(); - int numOfThreads = Runtime.getRuntime().availableProcessors(); - services = - Microservices.builder() - .discovery( - "services", - serviceEndpoint -> - new ScalecubeServiceDiscovery(serviceEndpoint) - .membership(opts -> opts.seedMembers(seedAddress))) - .transport(() -> new RSocketServiceTransport().numOfWorkers(numOfThreads)) - .services(new BenchmarkServiceImpl()) - .startAwait(); - } - - @Override - protected void afterAll() throws Exception { - super.afterAll(); - if (services != null) { - services.shutdown().block(); - } - if (gateway != null) { - gateway.shutdown().block(); - } - } - - @Override - public Mono createClient() { - return createClient(gateway, gatewayName, clientBuilder); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/http/DistributedRequestOneBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/http/DistributedRequestOneBenchmark.java deleted file mode 100644 index 579996ac..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/http/DistributedRequestOneBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.distributed.http; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.RequestOneScenario; -import io.scalecube.services.benchmarks.gateway.distributed.DistributedBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.http.HttpGatewayClient; - -public class DistributedRequestOneBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - RequestOneScenario.runWith( - args, - benchmarkSettings -> - new DistributedBenchmarkState( - benchmarkSettings, - "http", - address -> - new HttpGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.HTTP_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/rsocket/DistributedInfiniteStreamBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/rsocket/DistributedInfiniteStreamBenchmark.java deleted file mode 100644 index 7b6d47d0..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/rsocket/DistributedInfiniteStreamBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.distributed.rsocket; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.InfiniteStreamScenario; -import io.scalecube.services.benchmarks.gateway.distributed.DistributedBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.rsocket.RSocketGatewayClient; - -public class DistributedInfiniteStreamBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - InfiniteStreamScenario.runWith( - args, - benchmarkSettings -> - new DistributedBenchmarkState( - benchmarkSettings, - "rsws", - address -> - new RSocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.RSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/rsocket/DistributedRequestOneBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/rsocket/DistributedRequestOneBenchmark.java deleted file mode 100644 index 31ac332b..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/rsocket/DistributedRequestOneBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.distributed.rsocket; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.RequestOneScenario; -import io.scalecube.services.benchmarks.gateway.distributed.DistributedBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.rsocket.RSocketGatewayClient; - -public class DistributedRequestOneBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - RequestOneScenario.runWith( - args, - benchmarkSettings -> - new DistributedBenchmarkState( - benchmarkSettings, - "rsws", - address -> - new RSocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.RSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/websocket/DistributedInfiniteStreamBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/websocket/DistributedInfiniteStreamBenchmark.java deleted file mode 100644 index 78a561cc..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/websocket/DistributedInfiniteStreamBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.distributed.websocket; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.InfiniteStreamScenario; -import io.scalecube.services.benchmarks.gateway.distributed.DistributedBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClient; - -public class DistributedInfiniteStreamBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - InfiniteStreamScenario.runWith( - args, - benchmarkSettings -> - new DistributedBenchmarkState( - benchmarkSettings, - "ws", - address -> - new WebsocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.WEBSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/websocket/DistributedRequestOneBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/websocket/DistributedRequestOneBenchmark.java deleted file mode 100644 index bc813adc..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/distributed/websocket/DistributedRequestOneBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.distributed.websocket; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.RequestOneScenario; -import io.scalecube.services.benchmarks.gateway.distributed.DistributedBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClient; - -public class DistributedRequestOneBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - RequestOneScenario.runWith( - args, - benchmarkSettings -> - new DistributedBenchmarkState( - benchmarkSettings, - "ws", - address -> - new WebsocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.WEBSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/RemoteBenchmarkState.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/RemoteBenchmarkState.java deleted file mode 100644 index 9821350f..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/RemoteBenchmarkState.java +++ /dev/null @@ -1,37 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.remote; - -import io.scalecube.benchmarks.BenchmarkSettings; -import io.scalecube.net.Address; -import io.scalecube.services.benchmarks.gateway.AbstractBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClient; -import java.util.function.Function; -import reactor.core.publisher.Mono; - -public class RemoteBenchmarkState extends AbstractBenchmarkState { - - public static final int WS_PORT = 7070; - public static final int RS_PORT = 9090; - public static final int HTTP_PORT = 8080; - - private final Address gatewayAddress; - - /** - * Constructor for benchmark state. - * - * @param settings benchmark settings. - */ - public RemoteBenchmarkState( - BenchmarkSettings settings, int gatewayPort, Function clientBuilder) { - super(settings, clientBuilder); - gatewayAddress = Address.create(settings.find("gatewayHost", "localhost"), gatewayPort); - } - - /** - * Factory function for {@link GatewayClient}. - * - * @return client - */ - public Mono createClient() { - return createClient(gatewayAddress, clientBuilder); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/http/RemoteRequestOneBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/http/RemoteRequestOneBenchmark.java deleted file mode 100644 index 7de395a4..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/http/RemoteRequestOneBenchmark.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.remote.http; - -import static io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState.HTTP_PORT; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.RequestOneScenario; -import io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.http.HttpGatewayClient; - -public class RemoteRequestOneBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - RequestOneScenario.runWith( - args, - benchmarkSettings -> - new RemoteBenchmarkState( - benchmarkSettings, - HTTP_PORT, - address -> - new HttpGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.HTTP_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/rsocket/RemoteInfiniteStreamBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/rsocket/RemoteInfiniteStreamBenchmark.java deleted file mode 100644 index 4933215f..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/rsocket/RemoteInfiniteStreamBenchmark.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.remote.rsocket; - -import static io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState.RS_PORT; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.InfiniteStreamScenario; -import io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.rsocket.RSocketGatewayClient; - -public class RemoteInfiniteStreamBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - InfiniteStreamScenario.runWith( - args, - benchmarkSettings -> - new RemoteBenchmarkState( - benchmarkSettings, - RS_PORT, - address -> - new RSocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.RSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/rsocket/RemoteRequestOneBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/rsocket/RemoteRequestOneBenchmark.java deleted file mode 100644 index 01ced1bc..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/rsocket/RemoteRequestOneBenchmark.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.remote.rsocket; - -import static io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState.RS_PORT; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.RequestOneScenario; -import io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.rsocket.RSocketGatewayClient; - -public class RemoteRequestOneBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - RequestOneScenario.runWith( - args, - benchmarkSettings -> - new RemoteBenchmarkState( - benchmarkSettings, - RS_PORT, - address -> - new RSocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.RSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/websocket/RemoteInfiniteStreamBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/websocket/RemoteInfiniteStreamBenchmark.java deleted file mode 100644 index c4ab53ab..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/websocket/RemoteInfiniteStreamBenchmark.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.remote.websocket; - -import static io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState.WS_PORT; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.InfiniteStreamScenario; -import io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClient; - -public class RemoteInfiniteStreamBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - InfiniteStreamScenario.runWith( - args, - benchmarkSettings -> - new RemoteBenchmarkState( - benchmarkSettings, - WS_PORT, - address -> - new WebsocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.WEBSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/websocket/RemoteRequestOneBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/websocket/RemoteRequestOneBenchmark.java deleted file mode 100644 index df427680..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/remote/websocket/RemoteRequestOneBenchmark.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.remote.websocket; - -import static io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState.WS_PORT; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.RequestOneScenario; -import io.scalecube.services.benchmarks.gateway.remote.RemoteBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClient; - -public class RemoteRequestOneBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - RequestOneScenario.runWith( - args, - benchmarkSettings -> - new RemoteBenchmarkState( - benchmarkSettings, - WS_PORT, - address -> - new WebsocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.WEBSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/StandaloneBenchmarkState.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/StandaloneBenchmarkState.java deleted file mode 100644 index 71dc8c0f..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/StandaloneBenchmarkState.java +++ /dev/null @@ -1,61 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.standalone; - -import io.scalecube.benchmarks.BenchmarkSettings; -import io.scalecube.net.Address; -import io.scalecube.services.Microservices; -import io.scalecube.services.benchmarks.gateway.AbstractBenchmarkState; -import io.scalecube.services.discovery.ScalecubeServiceDiscovery; -import io.scalecube.services.examples.BenchmarkServiceImpl; -import io.scalecube.services.gateway.http.HttpGateway; -import io.scalecube.services.gateway.rsocket.RSocketGateway; -import io.scalecube.services.gateway.transport.GatewayClient; -import io.scalecube.services.gateway.ws.WebsocketGateway; -import io.scalecube.services.transport.rsocket.RSocketServiceTransport; -import java.util.function.Function; -import reactor.core.publisher.Mono; - -public class StandaloneBenchmarkState extends AbstractBenchmarkState { - - private final String gatewayName; - - private Microservices microservices; - - public StandaloneBenchmarkState( - BenchmarkSettings settings, - String gatewayName, - Function clientBuilder) { - super(settings, clientBuilder); - this.gatewayName = gatewayName; - } - - @Override - protected void beforeAll() throws Exception { - super.beforeAll(); - microservices = - Microservices.builder() - .services(new BenchmarkServiceImpl()) - .gateway(opts -> new RSocketGateway(opts.id("rsws"))) - .gateway(opts -> new WebsocketGateway(opts.id("ws"))) - .gateway(opts -> new HttpGateway(opts.id("http"))) - .discovery("microservices", ScalecubeServiceDiscovery::new) - .transport(RSocketServiceTransport::new) - .startAwait(); - } - - @Override - protected void afterAll() throws Exception { - super.afterAll(); - if (microservices != null) { - microservices.shutdown().block(); - } - } - - /** - * Factory function for {@link GatewayClient}. - * - * @return client - */ - public Mono createClient() { - return createClient(microservices, gatewayName, clientBuilder); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/http/StandaloneRequestOneBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/http/StandaloneRequestOneBenchmark.java deleted file mode 100644 index c31ecd82..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/http/StandaloneRequestOneBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.standalone.http; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.RequestOneScenario; -import io.scalecube.services.benchmarks.gateway.standalone.StandaloneBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.http.HttpGatewayClient; - -public class StandaloneRequestOneBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - RequestOneScenario.runWith( - args, - benchmarkSettings -> - new StandaloneBenchmarkState( - benchmarkSettings, - "http", - address -> - new HttpGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.HTTP_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/rsocket/StandaloneInfiniteStreamBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/rsocket/StandaloneInfiniteStreamBenchmark.java deleted file mode 100644 index 3d1c0590..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/rsocket/StandaloneInfiniteStreamBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.standalone.rsocket; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.InfiniteStreamScenario; -import io.scalecube.services.benchmarks.gateway.standalone.StandaloneBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.rsocket.RSocketGatewayClient; - -public class StandaloneInfiniteStreamBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - InfiniteStreamScenario.runWith( - args, - benchmarkSettings -> - new StandaloneBenchmarkState( - benchmarkSettings, - "rsws", - address -> - new RSocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.RSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/rsocket/StandaloneRequestOneBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/rsocket/StandaloneRequestOneBenchmark.java deleted file mode 100644 index f043dc1a..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/rsocket/StandaloneRequestOneBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.standalone.rsocket; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.RequestOneScenario; -import io.scalecube.services.benchmarks.gateway.standalone.StandaloneBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.rsocket.RSocketGatewayClient; - -public class StandaloneRequestOneBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - RequestOneScenario.runWith( - args, - benchmarkSettings -> - new StandaloneBenchmarkState( - benchmarkSettings, - "rsws", - address -> - new RSocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.RSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/websocket/StandaloneInfiniteStreamBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/websocket/StandaloneInfiniteStreamBenchmark.java deleted file mode 100644 index 1afb97d6..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/websocket/StandaloneInfiniteStreamBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.standalone.websocket; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.InfiniteStreamScenario; -import io.scalecube.services.benchmarks.gateway.standalone.StandaloneBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClient; - -public class StandaloneInfiniteStreamBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - InfiniteStreamScenario.runWith( - args, - benchmarkSettings -> - new StandaloneBenchmarkState( - benchmarkSettings, - "ws", - address -> - new WebsocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.WEBSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/websocket/StandaloneRequestOneBenchmark.java b/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/websocket/StandaloneRequestOneBenchmark.java deleted file mode 100644 index c343a493..00000000 --- a/services-gateway-benchmarks/src/main/java/io/scalecube/services/benchmarks/gateway/standalone/websocket/StandaloneRequestOneBenchmark.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.scalecube.services.benchmarks.gateway.standalone.websocket; - -import io.scalecube.services.benchmarks.gateway.GatewayClientCodecs; -import io.scalecube.services.benchmarks.gateway.RequestOneScenario; -import io.scalecube.services.benchmarks.gateway.standalone.StandaloneBenchmarkState; -import io.scalecube.services.gateway.transport.GatewayClientSettings; -import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClient; - -public class StandaloneRequestOneBenchmark { - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - RequestOneScenario.runWith( - args, - benchmarkSettings -> - new StandaloneBenchmarkState( - benchmarkSettings, - "ws", - address -> - new WebsocketGatewayClient( - GatewayClientSettings.builder().address(address).build(), - GatewayClientCodecs.WEBSOCKET_CLIENT_CODEC))); - } -} diff --git a/services-gateway-runner/Dockerfile b/services-gateway-runner/Dockerfile deleted file mode 100644 index 6963873a..00000000 --- a/services-gateway-runner/Dockerfile +++ /dev/null @@ -1,58 +0,0 @@ -FROM openjdk:11-jdk-slim - -ARG EXECUTABLE_JAR -ARG SERVICE_NAME -ARG SERVICE_VERSION -ENV SERVICE_NAME ${SERVICE_NAME} -ENV SERVICE_VERSION ${SERVICE_VERSION} -ENV DUMPS_DIR /opt/scalecube/dumps -ENV LOGS_DIR /opt/scalecube/logs -ENV JMX_PORT 5678 -ENV LOG4J_CONFIGURATION_FILE ${LOG4J_CONFIGURATION_FILE:-log4j2.xml} -ENV PRINT_FLAGS_FINAL ${PRINT_FLAGS_FINAL:-"-XX:+PrintFlagsFinal"} - -EXPOSE $JMX_PORT - -WORKDIR /opt/scalecube - -RUN mkdir -p $DUMPS_DIR -RUN mkdir -p $LOGS_DIR - -ENV DEFAULT_JAVA_OPTS="\ --Xlog:gc*,safepoint:$LOGS_DIR/gc.log \ --Xlog:os+container=info \ --XX:InitialRAMPercentage=50 \ --XX:MinRAMPercentage=50 \ --XX:MaxRAMPercentage=70 \ --XX:NativeMemoryTracking=detail \ --XX:+HeapDumpOnOutOfMemoryError \ --XX:HeapDumpPath=$DUMPS_DIR/$SERVICE_NAME-oom.hprof \ --Djava.net.preferIPv4Stack=true \ --Dsun.rmi.dgc.client.gcInterval=3600000 \ --Dsun.rmi.dgc.server.gcInterval=3600000 \ --Djava.rmi.server.hostname=127.0.0.1 \ --Dcom.sun.management.jmxremote \ --Dcom.sun.management.jmxremote.authenticate=false \ --Dcom.sun.management.jmxremote.ssl=false \ --Dcom.sun.management.jmxremote.local.only=false \ --XX:+AlwaysActAsServerClassMachine \ --XX:+UnlockExperimentalVMOptions \ --XX:+TrustFinalNonStaticFields \ --XX:+UnlockDiagnosticVMOptions \ --XX:GuaranteedSafepointInterval=300000 \ --XX:BiasedLockingStartupDelay=0" - -COPY target/lib lib -COPY target/${EXECUTABLE_JAR}.jar app.jar - -ENTRYPOINT exec java \ -$PRINT_FLAGS_FINAL \ -$DEFAULT_JAVA_OPTS \ -$JAVA_OPTS \ -$DEFAULT_JMX_OPTS \ -$DEFAULT_OOM_OPTS \ --Dcom.sun.management.jmxremote.port=$JMX_PORT \ --Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT \ --Dlog4j.configurationFile=$LOG4J_CONFIGURATION_FILE \ --Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector \ --jar app.jar $PROGRAM_ARGS diff --git a/services-gateway-runner/pom.xml b/services-gateway-runner/pom.xml deleted file mode 100644 index 884563e5..00000000 --- a/services-gateway-runner/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - scalecube-gateway-parent - io.scalecube - 2.10.3-SNAPSHOT - - 4.0.0 - - scalecube-services-gateway-runner - - - io.scalecube.services.gateway.GatewayRunner - scalecube-gateway - scalecube/scalecube-gateway - - - - - io.scalecube - scalecube-services-gateway-netty - ${project.version} - - - - io.scalecube - scalecube-services - - - io.scalecube - scalecube-services-discovery - - - io.scalecube - scalecube-services-transport-rsocket - - - io.scalecube - scalecube-services-transport-jackson - - - - io.scalecube - config - - - - org.slf4j - slf4j-api - - - org.apache.logging.log4j - log4j-slf4j-impl - - - org.apache.logging.log4j - log4j-core - - - com.lmax - disruptor - - - - - - - maven-jar-plugin - - - maven-dependency-plugin - - runtime - - - - com.spotify - dockerfile-maven-plugin - - - - - diff --git a/services-gateway-runner/src/main/java/io/scalecube/services/gateway/GatewayRunner.java b/services-gateway-runner/src/main/java/io/scalecube/services/gateway/GatewayRunner.java deleted file mode 100644 index cec0b5c9..00000000 --- a/services-gateway-runner/src/main/java/io/scalecube/services/gateway/GatewayRunner.java +++ /dev/null @@ -1,156 +0,0 @@ -package io.scalecube.services.gateway; - -import io.scalecube.config.ConfigRegistry; -import io.scalecube.config.ConfigRegistrySettings; -import io.scalecube.config.audit.Slf4JConfigEventListener; -import io.scalecube.config.source.ClassPathConfigSource; -import io.scalecube.config.source.SystemEnvironmentConfigSource; -import io.scalecube.config.source.SystemPropertiesConfigSource; -import io.scalecube.net.Address; -import io.scalecube.services.Microservices; -import io.scalecube.services.ServiceEndpoint; -import io.scalecube.services.discovery.ScalecubeServiceDiscovery; -import io.scalecube.services.discovery.api.ServiceDiscovery; -import io.scalecube.services.gateway.http.HttpGateway; -import io.scalecube.services.gateway.rsocket.RSocketGateway; -import io.scalecube.services.gateway.ws.WebsocketGateway; -import io.scalecube.services.transport.rsocket.RSocketServerTransportFactory; -import io.scalecube.services.transport.rsocket.RSocketServiceTransport; -import java.nio.file.Path; -import java.util.List; -import java.util.Optional; -import java.util.function.Predicate; -import java.util.regex.Pattern; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class GatewayRunner { - - private static final Logger LOGGER = LoggerFactory.getLogger(GatewayRunner.class); - private static final String DECORATOR = - "#######################################################################"; - - /** - * Main runner. - * - * @param args program arguments - */ - public static void main(String[] args) { - ConfigRegistry configRegistry = ConfigBootstrap.configRegistry(); - - Config config = - configRegistry - .objectProperty("io.scalecube.services.gateway", Config.class) - .value() - .orElseThrow(() -> new IllegalStateException("Couldn't load config")); - - LOGGER.info(DECORATOR); - LOGGER.info("Starting Gateway on {}", config); - LOGGER.info(DECORATOR); - - Microservices.builder() - .discovery("gateway", serviceEndpoint -> serviceDiscovery(serviceEndpoint, config)) - .transport(() -> newServiceTransport(config)) - .gateway(opts -> new WebsocketGateway(opts.id("ws").port(7070))) - .gateway( - opts -> - new HttpGateway(opts.id("http").port(8080)) - .corsEnabled(true) - .corsConfig(cors -> cors.allowedRequestHeaders("*"))) - .gateway(opts -> new RSocketGateway(opts.id("rsws").port(9090))) - .startAwait() - .onShutdown() - .block(); - } - - private static RSocketServiceTransport newServiceTransport(Config config) { - return new RSocketServiceTransport() - .serverTransportFactory(RSocketServerTransportFactory.tcp(config.servicePort())); - } - - private static ServiceDiscovery serviceDiscovery(ServiceEndpoint serviceEndpoint, Config config) { - return new ScalecubeServiceDiscovery(serviceEndpoint) - .options( - clusterConfig -> - clusterConfig - .membership(opts -> opts.seedMembers(config.seedAddresses())) - .transport(opts -> opts.port(config.discoveryPort())) - .externalHost(config.externalHost()) - .externalPort(config.externalPort())); - } - - public static class Config { - - private int servicePort; - private int discoveryPort; - private List seeds; - private String externalHost; - private Integer externalPort; - - public int servicePort() { - return servicePort; - } - - public int discoveryPort() { - return discoveryPort; - } - - public List seeds() { - return seeds; - } - - /** - * Returns seeds as an {@link Address}'s array. - * - * @return {@link Address}'s array - */ - public Address[] seedAddresses() { - return Optional.ofNullable(seeds()) - .map(seeds -> seeds.stream().map(Address::from).toArray(Address[]::new)) - .orElse(new Address[0]); - } - - public String externalHost() { - return externalHost; - } - - public Integer externalPort() { - return externalPort; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("Config{"); - sb.append("servicePort=").append(servicePort); - sb.append(", discoveryPort=").append(discoveryPort); - sb.append(", seeds=").append(seeds); - sb.append(", externalHost=").append(externalHost); - sb.append(", externalPort=").append(externalPort); - sb.append('}'); - return sb.toString(); - } - } - - public static class ConfigBootstrap { - - private static final Pattern CONFIG_PATTERN = Pattern.compile("(.*)config(.*)?\\.properties"); - private static final Predicate PATH_PREDICATE = - path -> CONFIG_PATTERN.matcher(path.toString()).matches(); - - /** - * ConfigRegistry method factory. - * - * @return configRegistry - */ - public static ConfigRegistry configRegistry() { - return ConfigRegistry.create( - ConfigRegistrySettings.builder() - .addListener(new Slf4JConfigEventListener()) - .addLastSource("sys_prop", new SystemPropertiesConfigSource()) - .addLastSource("env_var", new SystemEnvironmentConfigSource()) - .addLastSource("cp", new ClassPathConfigSource(PATH_PREDICATE)) - .jmxEnabled(false) - .build()); - } - } -} diff --git a/services-gateway-runner/src/main/resources/config-gateway.properties b/services-gateway-runner/src/main/resources/config-gateway.properties deleted file mode 100644 index b6d3a16a..00000000 --- a/services-gateway-runner/src/main/resources/config-gateway.properties +++ /dev/null @@ -1,5 +0,0 @@ -io.scalecube.services.gateway.servicePort=5801 -io.scalecube.services.gateway.discoveryPort=4801 -io.scalecube.services.gateway.seeds=localhost:4801,localhost:4802 -#io.scalecube.services.gateway.externalHost=gateway -#io.scalecube.services.gateway.externalPort=4801 diff --git a/services-gateway-runner/src/main/resources/log4j2.xml b/services-gateway-runner/src/main/resources/log4j2.xml deleted file mode 100644 index 5ac547ba..00000000 --- a/services-gateway-runner/src/main/resources/log4j2.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - %level{length=1} %d{ISO8601} %c{1.} %m [%t]%n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From ce19503cc313912c42e36f961370f26857784c46 Mon Sep 17 00:00:00 2001 From: Artem Vysochyn Date: Mon, 21 Sep 2020 12:35:27 +0300 Subject: [PATCH 3/3] Updated services to .9 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3f1c7e2c..4a1435ca 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ 1.0.11 - 2.10.8 + 2.10.9 1.2.2 0.4.7