Skip to content

Commit a2dc0d5

Browse files
authored
Merge pull request #4 from netifi/release/1.5.0
Release/1.5.0
2 parents a05fcb7 + c61d35b commit a2dc0d5

File tree

12 files changed

+136
-46
lines changed

12 files changed

+136
-46
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ subprojects {
22
apply plugin: 'idea'
33

44
group 'io.netifi.proteus.quickstart'
5-
version '1.0.0'
5+
version '1.5.0'
66

77
// Proteus Versions
88
ext {
9-
proteusVersion = '0.9.0'
10-
rsocketRpcVersion = '0.2.0'
9+
proteusVersion = '1.5.0'
10+
rsocketRpcVersion = '0.2.4'
1111
}
1212

1313
repositories {

client/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@
66
<parent>
77
<groupId>io.netifi.proteus.quickstart</groupId>
88
<artifactId>proteus-quickstart</artifactId>
9-
<version>1.0-SNAPSHOT</version>
9+
<version>1.5.0</version>
1010
</parent>
1111

1212
<artifactId>client</artifactId>
1313
<name>client</name>
14-
<version>1.0-SNAPSHOT</version>
14+
<version>1.5.0</version>
1515
<packaging>jar</packaging>
1616

17-
1817
<dependencies>
1918
<dependency>
2019
<groupId>io.netifi.proteus.quickstart</groupId>
2120
<artifactId>service-idl</artifactId>
22-
<version>1.0-SNAPSHOT</version>
21+
<version>1.5.0</version>
2322
<scope>compile</scope>
2423
</dependency>
2524
<dependency>

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip

pom.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,25 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>io.netifi.proteus.quickstart</groupId>
55
<artifactId>proteus-quickstart</artifactId>
6-
<version>1.0-SNAPSHOT</version>
6+
<version>1.5.0</version>
77
<packaging>pom</packaging>
88
<name>multi</name>
9+
910
<modules>
1011
<module>client</module>
1112
<module>service</module>
1213
<module>service-idl</module>
1314
</modules>
15+
1416
<properties>
1517
<maven.compiler.target>1.8</maven.compiler.target>
1618
<maven.compiler.source>1.8</maven.compiler.source>
17-
<proteusVersion>0.9.0</proteusVersion>
18-
<rsocketRpcVersion>0.2.0</rsocketRpcVersion>
19+
<proteusVersion>1.5.0</proteusVersion>
20+
<rsocketRpcVersion>0.2.4</rsocketRpcVersion>
1921
<protobufVersion>3.6.0</protobufVersion>
2022
<log4j2Version>2.9.0</log4j2Version>
2123
</properties>
24+
2225
<repositories>
2326
<repository>
2427
<id>jcenter</id>

service-idl/pom.xml

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,47 @@
77
<parent>
88
<groupId>io.netifi.proteus.quickstart</groupId>
99
<artifactId>proteus-quickstart</artifactId>
10-
<version>1.0-SNAPSHOT</version>
10+
<version>1.5.0</version>
1111
</parent>
1212

1313
<artifactId>service-idl</artifactId>
1414
<name>service-idl</name>
15-
<version>1.0-SNAPSHOT</version>
15+
<version>1.5.0</version>
1616
<packaging>jar</packaging>
17+
1718
<dependencies>
19+
<dependency>
20+
<groupId>io.netifi.proteus</groupId>
21+
<artifactId>proteus-client</artifactId>
22+
<version>${proteusVersion}</version>
23+
</dependency>
24+
<dependency>
25+
<groupId>io.netifi.proteus</groupId>
26+
<artifactId>proteus-metrics-micrometer</artifactId>
27+
<version>${proteusVersion}</version>
28+
<exclusions>
29+
<exclusion>
30+
<groupId>io.rsocket.rpc</groupId>
31+
<artifactId>rsocket-rpc-protobuf</artifactId>
32+
</exclusion>
33+
</exclusions>
34+
</dependency>
35+
<dependency>
36+
<groupId>io.netifi.proteus</groupId>
37+
<artifactId>proteus-tracing-openzipkin</artifactId>
38+
<version>${proteusVersion}</version>
39+
<exclusions>
40+
<exclusion>
41+
<groupId>io.rsocket.rpc</groupId>
42+
<artifactId>rsocket-rpc-protobuf</artifactId>
43+
</exclusion>
44+
</exclusions>
45+
</dependency>
46+
<dependency>
47+
<groupId>javax.inject</groupId>
48+
<artifactId>javax.inject</artifactId>
49+
<version>1</version>
50+
</dependency>
1851
<dependency>
1952
<groupId>io.rsocket.rpc</groupId>
2053
<artifactId>rsocket-rpc-core</artifactId>
@@ -42,12 +75,31 @@
4275
</extension>
4376
</extensions>
4477
<plugins>
78+
<plugin>
79+
<groupId>org.codehaus.mojo</groupId>
80+
<artifactId>build-helper-maven-plugin</artifactId>
81+
<executions>
82+
<execution>
83+
<phase>generate-sources</phase>
84+
<goals>
85+
<goal>add-source</goal>
86+
</goals>
87+
<configuration>
88+
<sources>
89+
<source>${project.build.directory}/generated-sources/protobuf/java</source>
90+
<source>${project.build.directory}/generated-sources/protobuf/rsocketRpc</source>
91+
</sources>
92+
</configuration>
93+
</execution>
94+
</executions>
95+
</plugin>
4596
<plugin>
4697
<groupId>org.xolstice.maven.plugins</groupId>
4798
<artifactId>protobuf-maven-plugin</artifactId>
4899
<version>0.5.1</version>
49100
<configuration>
50-
<protocArtifact>com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}
101+
<protocArtifact>
102+
com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}
51103
</protocArtifact>
52104
<pluginId>rsocketRpc</pluginId>
53105
<pluginArtifact>
@@ -65,5 +117,4 @@
65117
</plugin>
66118
</plugins>
67119
</build>
68-
69120
</project>

service-idl/src/generated/main/proteus/io/netifi/proteus/quickstart/service/protobuf/BlockingHelloService.java renamed to service-idl/src/generated/main/rsocketRpc/io/netifi/proteus/quickstart/service/protobuf/BlockingHelloService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
*/
55
@javax.annotation.Generated(
6-
value = "by Proteus proto compiler (version 0.7.15)",
6+
value = "by RSocket RPC proto compiler (version 0.2.4)",
77
comments = "Source: io/netifi/proteus/quickstart/service/protobuf/service.proto")
88
public interface BlockingHelloService {
99
String SERVICE_ID = "io.netifi.proteus.quickstart.service.HelloService";

service-idl/src/generated/main/proteus/io/netifi/proteus/quickstart/service/protobuf/BlockingHelloServiceClient.java renamed to service-idl/src/generated/main/rsocketRpc/io/netifi/proteus/quickstart/service/protobuf/BlockingHelloServiceClient.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package io.netifi.proteus.quickstart.service.protobuf;
22

33
@javax.annotation.Generated(
4-
value = "by Proteus proto compiler (version 0.7.15)",
4+
value = "by RSocket RPC proto compiler (version 0.2.4)",
55
comments = "Source: io/netifi/proteus/quickstart/service/protobuf/service.proto")
6-
@io.netifi.proteus.annotations.internal.ProteusGenerated(
7-
type = io.netifi.proteus.annotations.internal.ProteusResourceType.CLIENT,
6+
@io.rsocket.rpc.annotations.internal.Generated(
7+
type = io.rsocket.rpc.annotations.internal.ResourceType.CLIENT,
88
idlClass = BlockingHelloService.class)
99
public final class BlockingHelloServiceClient implements BlockingHelloService {
1010
private final io.netifi.proteus.quickstart.service.protobuf.HelloServiceClient delegate;
@@ -17,11 +17,13 @@ public BlockingHelloServiceClient(io.rsocket.RSocket rSocket, io.micrometer.core
1717
this.delegate = new io.netifi.proteus.quickstart.service.protobuf.HelloServiceClient(rSocket, registry);
1818
}
1919

20+
@io.rsocket.rpc.annotations.internal.GeneratedMethod(returnTypeClass = io.netifi.proteus.quickstart.service.protobuf.HelloResponse.class)
2021
public io.netifi.proteus.quickstart.service.protobuf.HelloResponse sayHello(io.netifi.proteus.quickstart.service.protobuf.HelloRequest message) {
2122
return sayHello(message, io.netty.buffer.Unpooled.EMPTY_BUFFER);
2223
}
2324

2425
@java.lang.Override
26+
@io.rsocket.rpc.annotations.internal.GeneratedMethod(returnTypeClass = io.netifi.proteus.quickstart.service.protobuf.HelloResponse.class)
2527
public io.netifi.proteus.quickstart.service.protobuf.HelloResponse sayHello(io.netifi.proteus.quickstart.service.protobuf.HelloRequest message, io.netty.buffer.ByteBuf metadata) {
2628
return delegate.sayHello(message, metadata).block();
2729
}

service-idl/src/generated/main/proteus/io/netifi/proteus/quickstart/service/protobuf/BlockingHelloServiceServer.java renamed to service-idl/src/generated/main/rsocketRpc/io/netifi/proteus/quickstart/service/protobuf/BlockingHelloServiceServer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package io.netifi.proteus.quickstart.service.protobuf;
22

33
@javax.annotation.Generated(
4-
value = "by Proteus proto compiler (version 0.7.15)",
4+
value = "by RSocket RPC proto compiler (version 0.2.4)",
55
comments = "Source: io/netifi/proteus/quickstart/service/protobuf/service.proto")
6-
@io.netifi.proteus.annotations.internal.ProteusGenerated(
7-
type = io.netifi.proteus.annotations.internal.ProteusResourceType.SERVICE,
6+
@io.rsocket.rpc.annotations.internal.Generated(
7+
type = io.rsocket.rpc.annotations.internal.ResourceType.SERVICE,
88
idlClass = BlockingHelloService.class)
99
@javax.inject.Named(
1010
value ="BlockingHelloServiceServer")
11-
public final class BlockingHelloServiceServer extends io.netifi.proteus.AbstractProteusService {
11+
public final class BlockingHelloServiceServer extends io.rsocket.rpc.AbstractRSocketService {
1212
private final BlockingHelloService service;
1313
private final reactor.core.scheduler.Scheduler scheduler;
1414
private final java.util.function.Function<? super org.reactivestreams.Publisher<io.rsocket.Payload>, ? extends org.reactivestreams.Publisher<io.rsocket.Payload>> sayHello;
@@ -19,7 +19,7 @@ public BlockingHelloServiceServer(BlockingHelloService service, java.util.Option
1919
if (!registry.isPresent()) {
2020
this.sayHello = java.util.function.Function.identity();
2121
} else {
22-
this.sayHello = io.netifi.proteus.metrics.ProteusMetrics.timed(registry.get(), "proteus.server", "service", BlockingHelloService.SERVICE_ID, "method", BlockingHelloService.METHOD_SAY_HELLO);
22+
this.sayHello = io.rsocket.rpc.metrics.Metrics.timed(registry.get(), "rsocket.server", "service", BlockingHelloService.SERVICE_ID, "method", BlockingHelloService.METHOD_SAY_HELLO);
2323
}
2424

2525
}
@@ -43,7 +43,7 @@ public reactor.core.publisher.Mono<Void> fireAndForget(io.rsocket.Payload payloa
4343
public reactor.core.publisher.Mono<io.rsocket.Payload> requestResponse(io.rsocket.Payload payload) {
4444
try {
4545
io.netty.buffer.ByteBuf metadata = payload.sliceMetadata();
46-
switch(io.netifi.proteus.frames.ProteusMetadata.getMethod(metadata)) {
46+
switch(io.rsocket.rpc.frames.Metadata.getMethod(metadata)) {
4747
case HelloService.METHOD_SAY_HELLO: {
4848
com.google.protobuf.CodedInputStream is = com.google.protobuf.CodedInputStream.newInstance(payload.getData());
4949
io.netifi.proteus.quickstart.service.protobuf.HelloRequest message = io.netifi.proteus.quickstart.service.protobuf.HelloRequest.parseFrom(is);

service-idl/src/generated/main/proteus/io/netifi/proteus/quickstart/service/protobuf/HelloService.java renamed to service-idl/src/generated/main/rsocketRpc/io/netifi/proteus/quickstart/service/protobuf/HelloService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
*/
55
@javax.annotation.Generated(
6-
value = "by Proteus proto compiler (version 0.7.15)",
6+
value = "by RSocket RPC proto compiler",
77
comments = "Source: io/netifi/proteus/quickstart/service/protobuf/service.proto")
88
public interface HelloService {
99
String SERVICE = "io.netifi.proteus.quickstart.service.HelloService";

service-idl/src/generated/main/proteus/io/netifi/proteus/quickstart/service/protobuf/HelloServiceClient.java renamed to service-idl/src/generated/main/rsocketRpc/io/netifi/proteus/quickstart/service/protobuf/HelloServiceClient.java

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,62 @@
11
package io.netifi.proteus.quickstart.service.protobuf;
22

33
@javax.annotation.Generated(
4-
value = "by Proteus proto compiler (version 0.7.15)",
4+
value = "by RSocket RPC proto compiler",
55
comments = "Source: io/netifi/proteus/quickstart/service/protobuf/service.proto")
6-
@io.netifi.proteus.annotations.internal.ProteusGenerated(
7-
type = io.netifi.proteus.annotations.internal.ProteusResourceType.CLIENT,
6+
@io.rsocket.rpc.annotations.internal.Generated(
7+
type = io.rsocket.rpc.annotations.internal.ResourceType.CLIENT,
88
idlClass = HelloService.class)
99
public final class HelloServiceClient implements HelloService {
1010
private final io.rsocket.RSocket rSocket;
1111
private final java.util.function.Function<? super org.reactivestreams.Publisher<io.netifi.proteus.quickstart.service.protobuf.HelloResponse>, ? extends org.reactivestreams.Publisher<io.netifi.proteus.quickstart.service.protobuf.HelloResponse>> sayHello;
12+
private final java.util.function.Function<java.util.Map<String, String>, java.util.function.Function<? super org.reactivestreams.Publisher<io.netifi.proteus.quickstart.service.protobuf.HelloResponse>, ? extends org.reactivestreams.Publisher<io.netifi.proteus.quickstart.service.protobuf.HelloResponse>>> sayHelloTrace;
1213

1314
public HelloServiceClient(io.rsocket.RSocket rSocket) {
1415
this.rSocket = rSocket;
1516
this.sayHello = java.util.function.Function.identity();
17+
this.sayHelloTrace = io.rsocket.rpc.tracing.Tracing.trace();
1618
}
1719

1820
public HelloServiceClient(io.rsocket.RSocket rSocket, io.micrometer.core.instrument.MeterRegistry registry) {
1921
this.rSocket = rSocket;
20-
this.sayHello = io.netifi.proteus.metrics.ProteusMetrics.timed(registry, "proteus.client", "service", HelloService.SERVICE, "method", HelloService.METHOD_SAY_HELLO);
22+
this.sayHello = io.rsocket.rpc.metrics.Metrics.timed(registry, "rsocket.client", "service", HelloService.SERVICE, "method", HelloService.METHOD_SAY_HELLO);
23+
this.sayHelloTrace = io.rsocket.rpc.tracing.Tracing.trace();
2124
}
2225

26+
27+
public HelloServiceClient(io.rsocket.RSocket rSocket, io.opentracing.Tracer tracer) {
28+
this.rSocket = rSocket;
29+
this.sayHello = java.util.function.Function.identity();
30+
this.sayHelloTrace = io.rsocket.rpc.tracing.Tracing.trace(tracer, HelloService.METHOD_SAY_HELLO, io.rsocket.rpc.tracing.Tag.of("rsocket.service", HelloService.SERVICE), io.rsocket.rpc.tracing.Tag.of("rsocket.rpc.role", "client"), io.rsocket.rpc.tracing.Tag.of("rsocket.rpc.version", ""));
31+
}
32+
33+
34+
public HelloServiceClient(io.rsocket.RSocket rSocket, io.micrometer.core.instrument.MeterRegistry registry, io.opentracing.Tracer tracer) {
35+
this.rSocket = rSocket;
36+
this.sayHello = io.rsocket.rpc.metrics.Metrics.timed(registry, "rsocket.client", "service", HelloService.SERVICE, "method", HelloService.METHOD_SAY_HELLO);
37+
this.sayHelloTrace = io.rsocket.rpc.tracing.Tracing.trace(tracer, HelloService.METHOD_SAY_HELLO, io.rsocket.rpc.tracing.Tag.of("rsocket.service", HelloService.SERVICE), io.rsocket.rpc.tracing.Tag.of("rsocket.rpc.role", "client"), io.rsocket.rpc.tracing.Tag.of("rsocket.rpc.version", ""));
38+
}
39+
40+
@io.rsocket.rpc.annotations.internal.GeneratedMethod(returnTypeClass = io.netifi.proteus.quickstart.service.protobuf.HelloResponse.class)
2341
public reactor.core.publisher.Mono<io.netifi.proteus.quickstart.service.protobuf.HelloResponse> sayHello(io.netifi.proteus.quickstart.service.protobuf.HelloRequest message) {
2442
return sayHello(message, io.netty.buffer.Unpooled.EMPTY_BUFFER);
2543
}
2644

2745
@java.lang.Override
46+
@io.rsocket.rpc.annotations.internal.GeneratedMethod(returnTypeClass = io.netifi.proteus.quickstart.service.protobuf.HelloResponse.class)
2847
public reactor.core.publisher.Mono<io.netifi.proteus.quickstart.service.protobuf.HelloResponse> sayHello(io.netifi.proteus.quickstart.service.protobuf.HelloRequest message, io.netty.buffer.ByteBuf metadata) {
48+
java.util.Map<String, String> map = new java.util.HashMap<>();
2949
return reactor.core.publisher.Mono.defer(new java.util.function.Supplier<reactor.core.publisher.Mono<io.rsocket.Payload>>() {
3050
@java.lang.Override
3151
public reactor.core.publisher.Mono<io.rsocket.Payload> get() {
32-
final io.netty.buffer.ByteBuf metadataBuf = io.netifi.proteus.frames.ProteusMetadata.encode(io.netty.buffer.ByteBufAllocator.DEFAULT, HelloService.SERVICE, HelloService.METHOD_SAY_HELLO, metadata);
33-
io.netty.buffer.ByteBuf data = serialize(message);
52+
final io.netty.buffer.ByteBuf data = serialize(message);
53+
final io.netty.buffer.ByteBuf tracing = io.rsocket.rpc.tracing.Tracing.mapToByteBuf(io.netty.buffer.ByteBufAllocator.DEFAULT, map);
54+
final io.netty.buffer.ByteBuf metadataBuf = io.rsocket.rpc.frames.Metadata.encode(io.netty.buffer.ByteBufAllocator.DEFAULT, HelloService.SERVICE, HelloService.METHOD_SAY_HELLO, tracing, metadata);
55+
tracing.release();
56+
metadata.release();
3457
return rSocket.requestResponse(io.rsocket.util.ByteBufPayload.create(data, metadataBuf));
3558
}
36-
}).map(deserializer(io.netifi.proteus.quickstart.service.protobuf.HelloResponse.parser())).transform(sayHello);
59+
}).map(deserializer(io.netifi.proteus.quickstart.service.protobuf.HelloResponse.parser())).transform(sayHello).transform(sayHelloTrace.apply(map));
3760
}
3861

3962
private static io.netty.buffer.ByteBuf serialize(final com.google.protobuf.MessageLite message) {

0 commit comments

Comments
 (0)