Skip to content

Commit c5b320c

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 3b6a43c + 454bc66 commit c5b320c

File tree

16 files changed

+115
-75
lines changed

16 files changed

+115
-75
lines changed

README.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# scalecube-services
2-
[![Build Status](https://travis-ci.org/scalecube/scalecube-services.svg?branch=develop)](https://travis-ci.org/scalecube/scalecube-services)
32
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/5e2ee9be41f7425590313ee1b8f737d7)](https://app.codacy.com/app/ScaleCube/scalecube-services?utm_source=github.com&utm_medium=referral&utm_content=scalecube/scalecube-services&utm_campaign=badger)
43
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.scalecube/scalecube-services-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.scalecube/scalecube-services-api)
54
[![SourceSpy Dashboard](https://sourcespy.com/shield.svg)](https://sourcespy.com/github/scalecubescalecubeservices/)
@@ -10,7 +9,7 @@
109
<tr>
1110
<td>
1211
An open-source project that is focused on streamlining reactive-programming of Microservices Reactive-systems that scale, built by developers for developers.<br><br>
13-
ScaleCube Services provides a low latency Reactive Microservices library for peer-to-peer service registry and discovery
12+
ScaleCube Services provides a low latency Reactive Microservices library for peer-to-peer service registry and discovery
1413
based on gossip protocol, without single point-of-failure or bottlenecks.<br><br>
1514
Scalecube more gracefully address the cross cutting concernes of distributed microservices architecture.
1615
<br><br>
@@ -32,7 +31,7 @@ ScaleCube Services Features:
3231
* Reactive Streams support.
3332
* Fire And Forget - Send and not wait for a reply
3433
* Request Response - Send single request and expect single reply
35-
* Request Stream - Send single request and expect stream of responses.
34+
* Request Stream - Send single request and expect stream of responses.
3635
* Request bidirectional - send stream of requests and expect stream of responses.
3736
* Built-in failure detection, fault tolerance, and elasticity
3837
* Routing and balancing strategies for both stateless and stateful services
@@ -55,10 +54,10 @@ User Guide:
5554

5655
Basic Usage:
5756

58-
The example provisions 2 cluster nodes and making a remote interaction.
59-
1. seed is a member node and provision no services of its own.
57+
The example provisions 2 cluster nodes and making a remote interaction.
58+
1. seed is a member node and provision no services of its own.
6059
2. then microservices variable is a member that joins seed member and provision GreetingService instance.
61-
3. finally from seed node - create a proxy by the GreetingService api and send a greeting request.
60+
3. finally from seed node - create a proxy by the GreetingService api and send a greeting request.
6261

6362
```java
6463
//1. ScaleCube Node node with no members
@@ -126,19 +125,19 @@ Basic API-Gateway example:
126125
.gateway(options -> new WebsocketGateway(options.id("ws").port(8080)))
127126
.gateway(options -> new HttpGateway(options.id("http").port(7070)))
128127
.gateway(options -> new RSocketGateway(options.id("rsws").port(9090)))
129-
128+
130129
.startAwait();
131-
130+
132131
// HINT: you can try connect using the api sandbox to these ports to try the api.
133132
// http://scalecube.io/api-sandbox/app/index.html
134133
```
135134

136135
### Maven
137136

138-
With scalecube-services you may plug-and-play alternative providers for Transport,Codecs and discovery.
139-
Scalecube is using ServiceLoader to load providers from class path,
140-
141-
You can think about scalecube as slf4j for microservices - Currently supported SPIs:
137+
With scalecube-services you may plug-and-play alternative providers for Transport,Codecs and discovery.
138+
Scalecube is using ServiceLoader to load providers from class path,
139+
140+
You can think about scalecube as slf4j for microservices - Currently supported SPIs:
142141

143142
**Transport providers:**
144143

@@ -148,12 +147,12 @@ You can think about scalecube as slf4j for microservices - Currently supported S
148147

149148
* scalecube-services-transport-jackson: using Jackson to encode / decode service messages. https://github.com/FasterXML
150149
* scalecube-services-transport-protostuff: using protostuff to encode / decode service messages. https://github.com/protostuff
151-
150+
152151
**Service discovery providers:**
153152

154153
* scalecube-services-discovery: using scalecue-cluster do locate service Endpoint within the cluster
155154
https://github.com/scalecube/scalecube-cluster
156-
155+
157156

158157
Binaries and dependency information for Maven can be found at http://search.maven.org.
159158

@@ -170,7 +169,7 @@ To add a dependency on ScaleCube Services using Maven, use the following:
170169
</properties>
171170

172171
<!-- -------------------------------------------
173-
scalecube core and api:
172+
scalecube core and api:
174173
------------------------------------------- -->
175174

176175
<!-- scalecube apis -->
@@ -179,14 +178,14 @@ To add a dependency on ScaleCube Services using Maven, use the following:
179178
<artifactId>scalecube-services-api</artifactId>
180179
<version>${scalecube.version}</version>
181180
</dependency>
182-
181+
183182
<!-- scalecube services module -->
184183
<dependency>
185184
<groupId>io.scalecube</groupId>
186185
<artifactId>scalecube-services</artifactId>
187186
<version>${scalecube.version}</version>
188187
</dependency>
189-
188+
190189

191190
<!--
192191
@@ -200,7 +199,7 @@ To add a dependency on ScaleCube Services using Maven, use the following:
200199
<groupId>io.scalecube</groupId>
201200
<artifactId>scalecube-services-transport-rsocket</artifactId>
202201
<version>${scalecube.version}</version>
203-
</dependency>
202+
</dependency>
204203
```
205204

206205
----

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</parent>
1010

1111
<artifactId>scalecube-services-parent</artifactId>
12-
<version>2.10.7-SNAPSHOT</version>
12+
<version>2.10.8-SNAPSHOT</version>
1313
<packaging>pom</packaging>
1414
<name>ScaleCube-Services</name>
1515

services-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.scalecube</groupId>
88
<artifactId>scalecube-services-parent</artifactId>
9-
<version>2.10.7-SNAPSHOT</version>
9+
<version>2.10.8-SNAPSHOT</version>
1010
</parent>
1111

1212
<artifactId>scalecube-services-api</artifactId>

services-benchmarks/Dockerfile

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,58 @@
1-
FROM openjdk:11
1+
FROM openjdk:11-jdk-slim
22

33
ARG EXECUTABLE_JAR
4+
ARG SERVICE_NAME
5+
ARG SERVICE_VERSION
6+
ENV SERVICE_NAME ${SERVICE_NAME}
7+
ENV SERVICE_VERSION ${SERVICE_VERSION}
8+
ENV DUMPS_DIR /opt/scalecube/dumps
9+
ENV LOGS_DIR /opt/scalecube/logs
10+
ENV JMX_PORT 5678
11+
ENV LOG4J_CONFIGURATION_FILE ${LOG4J_CONFIGURATION_FILE:-log4j2-benchmarks.xml}
12+
ENV PRINT_FLAGS_FINAL ${PRINT_FLAGS_FINAL:-"-XX:+PrintFlagsFinal"}
13+
14+
EXPOSE $JMX_PORT
415

516
WORKDIR /opt/scalecube
617

7-
ENV DEFAULT_JAVA_OPTS="-server \
8-
-XX:+DisableExplicitGC \
18+
RUN mkdir -p $DUMPS_DIR
19+
RUN mkdir -p $LOGS_DIR
20+
21+
ENV DEFAULT_JAVA_OPTS="\
22+
-Xlog:gc*,safepoint:$LOGS_DIR/gc.log \
23+
-Xlog:os+container=info \
24+
-XX:InitialRAMPercentage=50 \
25+
-XX:MinRAMPercentage=50 \
26+
-XX:MaxRAMPercentage=70 \
27+
-XX:NativeMemoryTracking=detail \
28+
-XX:+HeapDumpOnOutOfMemoryError \
29+
-XX:HeapDumpPath=$DUMPS_DIR/$SERVICE_NAME-oom.hprof \
30+
-Djava.net.preferIPv4Stack=true \
931
-Dsun.rmi.dgc.client.gcInterval=3600000 \
10-
-Dsun.rmi.dgc.server.gcInterval=3600000"
11-
12-
ENV DEFAULT_JMX_OPTS="-Dcom.sun.management.jmxremote \
13-
-Dcom.sun.management.jmxremote.port=5678 \
14-
-Dcom.sun.management.jmxremote.rmi.port=5678 \
32+
-Dsun.rmi.dgc.server.gcInterval=3600000 \
33+
-Djava.rmi.server.hostname=127.0.0.1 \
34+
-Dcom.sun.management.jmxremote \
1535
-Dcom.sun.management.jmxremote.authenticate=false \
1636
-Dcom.sun.management.jmxremote.ssl=false \
1737
-Dcom.sun.management.jmxremote.local.only=false \
18-
-Djava.rmi.server.hostname=127.0.0.1"
19-
20-
ENV DEFAULT_OOM_OPTS="-XX:+HeapDumpOnOutOfMemoryError \
21-
-XX:HeapDumpPath=services-benchmarks-oom.hprof \
22-
-XX:+UseGCOverheadLimit"
38+
-XX:+AlwaysActAsServerClassMachine \
39+
-XX:+UnlockExperimentalVMOptions \
40+
-XX:+TrustFinalNonStaticFields \
41+
-XX:+UnlockDiagnosticVMOptions \
42+
-XX:GuaranteedSafepointInterval=300000 \
43+
-XX:BiasedLockingStartupDelay=0"
2344

2445
COPY target/lib lib
25-
COPY target/${EXECUTABLE_JAR}.jar benchmarks.jar
26-
27-
# profiler agent port
28-
EXPOSE 10001
29-
30-
# jmx server port
31-
EXPOSE 5678
46+
COPY target/${EXECUTABLE_JAR}.jar app.jar
3247

33-
CMD exec java \
48+
ENTRYPOINT exec java \
49+
$PRINT_FLAGS_FINAL \
3450
$DEFAULT_JAVA_OPTS \
3551
$JAVA_OPTS \
3652
$DEFAULT_JMX_OPTS \
3753
$DEFAULT_OOM_OPTS \
38-
-Dlog4j.configurationFile=log4j2-benchmarks.xml \
54+
-Dcom.sun.management.jmxremote.port=$JMX_PORT \
55+
-Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT \
56+
-Dlog4j.configurationFile=$LOG4J_CONFIGURATION_FILE \
57+
-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector \
3958
-cp benchmarks.jar $PROGRAM_ARGS

services-benchmarks/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
<parent>
66
<artifactId>scalecube-services-parent</artifactId>
77
<groupId>io.scalecube</groupId>
8-
<version>2.10.7-SNAPSHOT</version>
8+
<version>2.10.8-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>scalecube-services-benchmarks</artifactId>
1212

1313
<properties>
14-
<extratags>${env.TRAVIS_COMMIT}</extratags>
14+
<mainClass>io.scalecube.services.examples.ExamplesRunner</mainClass>
15+
<serviceName>scalecube-services-benchmarks</serviceName>
16+
<github.repository>scalecube/scalecube-services</github.repository>
1517
</properties>
1618

1719
<dependencies>

services-bytebuf-codec/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.scalecube</groupId>
66
<artifactId>scalecube-services-parent</artifactId>
7-
<version>2.10.7-SNAPSHOT</version>
7+
<version>2.10.8-SNAPSHOT</version>
88
</parent>
99

1010
<artifactId>scalecube-services-bytebuf-codec</artifactId>

services-discovery/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.scalecube</groupId>
66
<artifactId>scalecube-services-parent</artifactId>
7-
<version>2.10.7-SNAPSHOT</version>
7+
<version>2.10.8-SNAPSHOT</version>
88
</parent>
99

1010
<artifactId>scalecube-services-discovery</artifactId>

services-examples-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.scalecube</groupId>
77
<artifactId>scalecube-services-parent</artifactId>
8-
<version>2.10.7-SNAPSHOT</version>
8+
<version>2.10.8-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>scalecube-services-examples-parent</artifactId>
Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,58 @@
1-
FROM openjdk:11
1+
FROM openjdk:11-jdk-slim
22

33
ARG EXECUTABLE_JAR
4+
ARG SERVICE_NAME
5+
ARG SERVICE_VERSION
6+
ENV SERVICE_NAME ${SERVICE_NAME}
7+
ENV SERVICE_VERSION ${SERVICE_VERSION}
8+
ENV DUMPS_DIR /opt/scalecube/dumps
9+
ENV LOGS_DIR /opt/scalecube/logs
10+
ENV JMX_PORT 5678
11+
ENV LOG4J_CONFIGURATION_FILE ${LOG4J_CONFIGURATION_FILE:-log4j2.xml}
12+
ENV PRINT_FLAGS_FINAL ${PRINT_FLAGS_FINAL:-"-XX:+PrintFlagsFinal"}
13+
14+
EXPOSE $JMX_PORT
415

516
WORKDIR /opt/scalecube
617

7-
ENV DEFAULT_JAVA_OPTS="-server \
8-
-XX:+DisableExplicitGC \
18+
RUN mkdir -p $DUMPS_DIR
19+
RUN mkdir -p $LOGS_DIR
20+
21+
ENV DEFAULT_JAVA_OPTS="\
22+
-Xlog:gc*,safepoint:$LOGS_DIR/gc.log \
23+
-Xlog:os+container=info \
24+
-XX:InitialRAMPercentage=50 \
25+
-XX:MinRAMPercentage=50 \
26+
-XX:MaxRAMPercentage=70 \
27+
-XX:NativeMemoryTracking=detail \
28+
-XX:+HeapDumpOnOutOfMemoryError \
29+
-XX:HeapDumpPath=$DUMPS_DIR/$SERVICE_NAME-oom.hprof \
30+
-Djava.net.preferIPv4Stack=true \
931
-Dsun.rmi.dgc.client.gcInterval=3600000 \
10-
-Dsun.rmi.dgc.server.gcInterval=3600000"
11-
12-
ENV DEFAULT_JMX_OPTS="-Dcom.sun.management.jmxremote \
13-
-Dcom.sun.management.jmxremote.port=5678 \
14-
-Dcom.sun.management.jmxremote.rmi.port=5678 \
32+
-Dsun.rmi.dgc.server.gcInterval=3600000 \
33+
-Djava.rmi.server.hostname=127.0.0.1 \
34+
-Dcom.sun.management.jmxremote \
1535
-Dcom.sun.management.jmxremote.authenticate=false \
1636
-Dcom.sun.management.jmxremote.ssl=false \
1737
-Dcom.sun.management.jmxremote.local.only=false \
18-
-Djava.rmi.server.hostname=127.0.0.1"
19-
20-
ENV DEFAULT_OOM_OPTS="-XX:+HeapDumpOnOutOfMemoryError \
21-
-XX:HeapDumpPath=services-examples-oom.hprof \
22-
-XX:+UseGCOverheadLimit"
38+
-XX:+AlwaysActAsServerClassMachine \
39+
-XX:+UnlockExperimentalVMOptions \
40+
-XX:+TrustFinalNonStaticFields \
41+
-XX:+UnlockDiagnosticVMOptions \
42+
-XX:GuaranteedSafepointInterval=300000 \
43+
-XX:BiasedLockingStartupDelay=0"
2344

2445
COPY target/lib lib
2546
COPY target/${EXECUTABLE_JAR}.jar app.jar
2647

27-
# profiler agent port
28-
EXPOSE 10001
29-
30-
# jmx server port
31-
EXPOSE 5678
32-
3348
ENTRYPOINT exec java \
49+
$PRINT_FLAGS_FINAL \
3450
$DEFAULT_JAVA_OPTS \
3551
$JAVA_OPTS \
3652
$DEFAULT_JMX_OPTS \
3753
$DEFAULT_OOM_OPTS \
38-
-Dlog4j.configurationFile=log4j2.xml \
54+
-Dcom.sun.management.jmxremote.port=$JMX_PORT \
55+
-Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT \
56+
-Dlog4j.configurationFile=$LOG4J_CONFIGURATION_FILE \
57+
-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector \
3958
-jar app.jar $PROGRAM_ARGS

services-examples-parent/services-examples-runner/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
<parent>
44
<artifactId>scalecube-services-examples-parent</artifactId>
55
<groupId>io.scalecube</groupId>
6-
<version>2.10.7-SNAPSHOT</version>
6+
<version>2.10.8-SNAPSHOT</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

1010
<artifactId>scalecube-services-examples-runner</artifactId>
1111

1212
<properties>
13-
<extratags>${env.TRAVIS_COMMIT}</extratags>
1413
<mainClass>io.scalecube.services.examples.ExamplesRunner</mainClass>
14+
<serviceName>scalecube-services-examples</serviceName>
15+
<github.repository>scalecube/scalecube-services</github.repository>
1516
</properties>
1617

1718
<dependencies>

0 commit comments

Comments
 (0)