Skip to content

Commit

Permalink
Merge branch 'release/1.5.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
mostroverkhov committed Mar 11, 2024
2 parents c617b79 + db9f849 commit 88188f4
Show file tree
Hide file tree
Showing 35 changed files with 455 additions and 76 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Project supports 3 kinds of APIs:
**GRPC compatible**. All implementations are directly compatible with GRPC via MessageStreams-RPC & GRPC transport.
GRPC clients can access such services without separate "gateway" binaries and IDL sharing schemes.

**Non-intrusive**. [MessageStreams](https://github.com/jauntsdn/rsocket-jvm/blob/1.5.2/rsocket-reactor/src/main/java/com/jauntsdn/rsocket/MessageStreams.java) API & [RSocket-JVM](https://github.com/jauntsdn/rsocket-jvm/blob/1.5.2/rsocket-reactor/src/main/java/com/jauntsdn/rsocket/RSocket.java) runtime are clearly split so from end-user perspective there is
**Non-intrusive**. [MessageStreams](https://github.com/jauntsdn/rsocket-jvm/blob/1.5.3/rsocket-reactor/src/main/java/com/jauntsdn/rsocket/MessageStreams.java) API & [RSocket-JVM](https://github.com/jauntsdn/rsocket-jvm/blob/1.5.3/rsocket-reactor/src/main/java/com/jauntsdn/rsocket/RSocket.java) runtime are clearly split so from end-user perspective there is
only set of streaming & non-streaming interactions on buffers/messages:

**traditional streaming**
Expand Down Expand Up @@ -125,10 +125,10 @@ repositories {
}
dependencies {
implementation "com.jauntsdn.rsocket:rsocket-messages:1.5.2"
implementation "com.jauntsdn.rsocket:rsocket-rpc-idl:1.5.2"
implementation "com.jauntsdn.rsocket:rsocket-<VENDOR>:1.5.2"
implementation "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>:1.5.2"
implementation "com.jauntsdn.rsocket:rsocket-messages:1.5.3"
implementation "com.jauntsdn.rsocket:rsocket-rpc-idl:1.5.3"
implementation "com.jauntsdn.rsocket:rsocket-<VENDOR>:1.5.3"
implementation "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>:1.5.3"
}
```

Expand All @@ -137,7 +137,7 @@ MessageStreams-RPC compiler binaries are linux, windows(x86) only
protobuf {
plugins {
rsocketRpc {
artifact = "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>-compiler:1.5.2"
artifact = "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>-compiler:1.5.3"
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
group=com.jauntsdn.rsocket
version=1.5.3
version=1.5.4

dependencyManagementPluginVersion=1.1.0
protobufPluginVersion=0.8.19
googleJavaFormatPluginVersion=0.9
gitPluginVersion=0.13.0
versionsPluginVersion=0.45.0

nettyBomVersion=4.1.106.Final
grpcStubVersion=1.61.0
reactorBomVersion=2023.0.2
nettyBomVersion=4.1.107.Final
grpcStubVersion=1.62.2
reactorBomVersion=2023.0.3
rxjavaVersion=3.1.8
helidonCommonReactiveVersion=2.5.6
mutinyVersion=2.5.6
mutinyVersion=2.5.8
jsr305Version=3.0.2
javaxInjectVersion=1
javaxAnnotationVersion=1.3.2
jakartaInjectVersion=2.0.1
jakartaAnnotationVersion=2.1.1
protobufVersion=3.25.2
protobufVersion=3.25.3

junitVersion=5.10.1
assertjVersion=3.25.2
junitVersion=5.10.2
assertjVersion=3.25.3

release=false
virtualthreads=true
Expand Down
4 changes: 2 additions & 2 deletions rsocket-bom/gradle.lockfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.netty:netty-bom:4.1.106.Final=classpath
io.projectreactor:reactor-bom:2023.0.2=classpath
io.netty:netty-bom:4.1.107.Final=classpath
io.projectreactor:reactor-bom:2023.0.3=classpath
empty=
4 changes: 2 additions & 2 deletions rsocket-futures/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
com.google.guava:guava:22.0=googleJavaFormat1.6
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
io.netty:netty-buffer:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
empty=annotationProcessor
6 changes: 3 additions & 3 deletions rsocket-grpc/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
com.google.guava:guava:22.0=googleJavaFormat1.6
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
io.grpc:grpc-stub:1.61.0=compileClasspath,runtimeClasspath
io.netty:netty-buffer:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.106.Final=compileClasspath,runtimeClasspath
io.grpc:grpc-stub:1.62.2=compileClasspath,runtimeClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
empty=annotationProcessor
4 changes: 2 additions & 2 deletions rsocket-helidon/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ io.helidon.common:helidon-common-mapper:2.5.6=compileClasspath,runtimeClasspath
io.helidon.common:helidon-common-reactive:2.5.6=compileClasspath,runtimeClasspath
io.helidon.common:helidon-common-service-loader:2.5.6=compileClasspath,runtimeClasspath
io.helidon.common:helidon-common:2.5.6=compileClasspath,runtimeClasspath
io.netty:netty-buffer:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,runtimeClasspath
jakarta.annotation:jakarta.annotation-api:1.3.5=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
empty=annotationProcessor
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import io.helidon.common.reactive.Single;
import java.util.concurrent.Flow;

/** Deprecated for removal since helidon-common-reactive project seems inactive/abandoned. */
@Deprecated
public abstract class AbstractRSocket implements RSocketHandler {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import java.util.function.Function;

/** Deprecated for removal since helidon-common-reactive project seems inactive/abandoned. */
@Deprecated
public interface ClientAcceptor {

RSocket accept(SetupMessage setup, RSocket requesterRSocket);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.jauntsdn.rsocket;

/** Deprecated for removal since helidon-common-reactive project seems inactive/abandoned. */
@Deprecated
public interface ClientStreamsAcceptor {

MessageStreams accept(SetupMessage setup, MessageStreams requester);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import io.helidon.common.reactive.Single;

/** Deprecated for removal since helidon-common-reactive project seems inactive/abandoned. */
@Deprecated
public interface Closeable extends GracefulCloseable {

Single<Void> onClose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@
import java.util.concurrent.Flow;
import java.util.concurrent.ScheduledExecutorService;

/** Channel interactions for async exchange of binary messages using Helidon-common-reactive API. */
/**
* Deprecated for removal since helidon-common-reactive project seems inactive/abandoned.
*
* <p>Channel interactions for async exchange of binary messages using Helidon-common-reactive API.
*/
@Deprecated
public interface MessageStreams extends Closeable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import io.helidon.common.reactive.Multi;
import java.util.concurrent.Flow;

/** Deprecated for removal since helidon-common-reactive project seems inactive/abandoned. */
@Deprecated
public interface MessageStreamsHandler extends MessageStreams {

default Multi<Message> requestChannel(Message message, Flow.Publisher<Message> messages) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@
import java.util.function.Function;

/**
* Models RSocket interactions as described in
* Deprecated for removal since helidon-common-reactive project seems inactive/abandoned.
*
* <p>Models RSocket interactions as described in
* https://github.com/rsocket/rsocket/blob/master/Protocol.md#stream-sequences-and-lifetimes
*/
@Deprecated
public interface RSocket extends MessageStreams, Availability {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@

package com.jauntsdn.rsocket;

/** Deprecated for removal since helidon-common-reactive project seems inactive/abandoned. */
@Deprecated
public interface RSocketHandler extends RSocket, MessageStreamsHandler {}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import java.util.concurrent.Flow;
import java.util.concurrent.ScheduledExecutorService;

/** Deprecated for removal since helidon-common-reactive project seems inactive/abandoned. */
@Deprecated
public class RSocketProxy implements RSocket, RSocketHandler {
protected final MessageStreams source;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import io.helidon.common.reactive.Single;
import java.util.function.Function;

/** Deprecated for removal since helidon-common-reactive project seems to be inactive/abandoned. */
@Deprecated
public interface ServerAcceptor {

Single<RSocket> accept(SetupMessage setup, RSocket requesterRSocket);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import io.helidon.common.reactive.Single;

/** Deprecated for removal since helidon-common-reactive project seems inactive/abandoned. */
@Deprecated
public interface ServerStreamsAcceptor {

Single<MessageStreams> accept(SetupMessage setup, MessageStreams requester);
Expand Down
6 changes: 3 additions & 3 deletions rsocket-messages/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
com.google.guava:guava:22.0=googleJavaFormat1.6
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
com.google.protobuf:protobuf-java:3.25.2=compileClasspath
io.netty:netty-buffer:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.106.Final=compileClasspath,runtimeClasspath
com.google.protobuf:protobuf-java:3.25.3=compileClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
empty=annotationProcessor
40 changes: 34 additions & 6 deletions rsocket-messages/src/main/java/com/jauntsdn/rsocket/Headers.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,19 @@
public final class Headers {
public static int HEADER_LENGTH_MAX = 8192;

private static final Headers EMPTY = new Headers(false, Collections.emptyList(), 0);
private static final Headers DEFAULT_SERVICE = new Headers(true, Collections.emptyList(), 0);
private static final Headers EMPTY = new Headers(false, 0, Collections.emptyList(), 0);
private static final Headers DEFAULT_SERVICE = new Headers(true, 0, Collections.emptyList(), 0);

private final boolean isDefaultService;
private final int serializedSize;
private final long timeoutMillis;
private final List<String> keyValues;
private volatile ByteBuf cache;

private Headers(boolean isDefaultService, List<String> keyValues, int serializedSize) {
private Headers(
boolean isDefaultService, long timeoutMillis, List<String> keyValues, int serializedSize) {
this.isDefaultService = isDefaultService;
this.timeoutMillis = timeoutMillis;
this.keyValues = keyValues;
this.serializedSize = serializedSize;
}
Expand All @@ -52,6 +55,10 @@ public boolean isDefaultService() {
return isDefaultService;
}

public long timeoutMillis() {
return timeoutMillis;
}

public String header(String name) {
if (!isValidKeySize(name)) {
return null;
Expand Down Expand Up @@ -155,7 +162,7 @@ public static Headers create(boolean isDefaultService, String... headers) {
if (headers.length == 0) {
return isDefaultService ? DEFAULT_SERVICE : EMPTY;
}
return new Headers(isDefaultService, Arrays.asList(headers), serializedSize);
return new Headers(isDefaultService, 0, Arrays.asList(headers), serializedSize);
}

public static Headers empty() {
Expand All @@ -166,6 +173,14 @@ public static Headers withDefaultService() {
return DEFAULT_SERVICE;
}

public static Headers withTimeout(long timeoutMillis) {
requireNonNegative(timeoutMillis, "timeoutMillis");
if (timeoutMillis == 0) {
return EMPTY;
}
return new Headers(false, timeoutMillis, Collections.emptyList(), 0);
}

public static Headers.Builder newBuilder() {
return new Builder(4, Collections.emptyList());
}
Expand All @@ -179,7 +194,7 @@ static Headers create(List<String> headers) {
if (headers.isEmpty()) {
return EMPTY;
}
return new Headers(false, headers, serializedSize);
return new Headers(false, 0, headers, serializedSize);
}

ByteBuf cache() {
Expand All @@ -203,6 +218,7 @@ public int serializedSize() {
public static final class Builder {
private final List<String> nameValues;
private boolean isDefaultService;
private long timeoutMillis;
private int serializedSize;

private Builder(int size, List<String> headers) {
Expand All @@ -225,6 +241,11 @@ public Builder defaultService(boolean isDefaultService) {
return this;
}

public Builder timeout(long timeoutMillis) {
this.timeoutMillis = requireNonNegative(timeoutMillis, "timeoutMillis");
return this;
}

public Builder add(String name, String value) {
requireValidKeySize(name, " name");
requireValidValueSize(value, " value");
Expand Down Expand Up @@ -278,7 +299,7 @@ public Builder remove(String name, String value) {
}

public Headers build() {
return new Headers(isDefaultService, nameValues, serializedSize);
return new Headers(isDefaultService, timeoutMillis, nameValues, serializedSize);
}
}

Expand Down Expand Up @@ -316,6 +337,13 @@ private static int requireValid(List<String> keyValues, String message) {
return size;
}

private static long requireNonNegative(long value, String message) {
if (value < 0) {
throw new IllegalArgumentException(message + " must be non-negative");
}
return value;
}

private static int requireValid(String[] keyValues, String message) {
Objects.requireNonNull(keyValues, "keyValues");
int length = keyValues.length;
Expand Down
6 changes: 3 additions & 3 deletions rsocket-mutiny/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
com.google.guava:guava:22.0=googleJavaFormat1.6
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
io.netty:netty-buffer:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,runtimeClasspath
io.smallrye.common:smallrye-common-annotation:2.2.0=compileClasspath,runtimeClasspath
io.smallrye.reactive:mutiny:2.5.6=compileClasspath,runtimeClasspath
io.smallrye.reactive:mutiny:2.5.8=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
empty=annotationProcessor
6 changes: 3 additions & 3 deletions rsocket-reactor/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
com.google.guava:guava:22.0=googleJavaFormat1.6
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
io.netty:netty-buffer:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.106.Final=compileClasspath,runtimeClasspath
io.projectreactor:reactor-core:3.6.2=compileClasspath,runtimeClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,runtimeClasspath
io.projectreactor:reactor-core:3.6.3=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
org.reactivestreams:reactive-streams:1.0.4=compileClasspath,runtimeClasspath
empty=annotationProcessor
4 changes: 2 additions & 2 deletions rsocket-rpc-futures/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
com.google.guava:guava:22.0=googleJavaFormat1.6
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
io.netty:netty-buffer:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.106.Final=compileClasspath,runtimeClasspath
io.netty:netty-buffer:4.1.107.Final=compileClasspath,runtimeClasspath
io.netty:netty-common:4.1.107.Final=compileClasspath,runtimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
empty=annotationProcessor
Loading

0 comments on commit 88188f4

Please sign in to comment.