Skip to content

Commit 4162bca

Browse files
committed
Merge branch 'release/1.3.1'
2 parents 0ecdf87 + e67399e commit 4162bca

File tree

19 files changed

+288
-93
lines changed

19 files changed

+288
-93
lines changed

README.md

Lines changed: 60 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,83 +7,95 @@
77

88
![RSocket-JVM implementations](readme/impls_stripe.png)
99

10-
## TL;DR
10+
Very fast GRPC-like & GRPC-compatible services on JVM with rich streaming models over multiple data-center and internet transports [[1]](https://jauntsdn.com/mstreams/).
1111

12-
>lean & very fast GRPC-like [services](https://github.com/jauntsdn/rsocket-jvm-interop-examples/tree/feature/oss/jaunt-rsocket-reactor-service/src/generated/main/rsocketRpc/trisocket) on JVM with rich streaming model;
13-
>
14-
>multiple APIs: CompletableFuture; streaming with reactor, rxjava, mutiny, helidon;
12+
## Summary
13+
14+
>multiple APIs: CompletableFuture; traditional streaming with GRPC-API (StreamObserver), or flavor of reactive: smallrye-mutiny, rxjava, reactor;
1515
>
16-
>pluggable networking: tcp, unix sockets, grpc, websockets-over-http2;
16+
>pluggable networking: TCP, unix sockets, GRPC, websockets, websockets-over-http2;
1717
>
18-
>service APIs / codegen stubs (Message-Streams) are split from library runtime (including network transports, load estimators, metrics);
18+
>service APIs / RPC codegen stubs (Message-Streams) are split from library runtime (RSocket-JVM, including network transports, load estimators, metrics);
1919
>
2020
>transparent origin (RPC) & proxy load estimation which enables cpu-efficient load balancers;
2121
>
2222
>native image support with graalvm
2323
24-
RSocket-JVM is [very fast](https://jauntsdn.com/post/rsocket-summary/) (millions of messages per core with each interaction) alternative to
24+
`RSocket-JVM` is [very fast](https://jauntsdn.com/post/rsocket-summary/) (millions of messages per core with each interaction) alternative to
2525
projectreactor-only RSocket/RSocket-java from "Reactive Foundation" -
2626
which is plagued by number of performance and security [problems](https://jauntsdn.com/post/rsocket-vs-spring/).
2727

28-
RSocket is low latency/high throughput L5 network protocol
29-
intended for high-performance services communication. It is transport agnostic, and runs on top
30-
of any reliable byte stream transport.
31-
32-
This repository hosts Message-Streams - API part of RSocket-JVM, suite of libraries for fast interprocess/network communication using CompletableFutures & major
33-
Reactive Streams implementations.
28+
This repository hosts `Message-Streams` - API part of `RSocket-JVM`: suite of libraries for interprocess/network communication over
29+
multiple transports using multiple APIs.
3430

35-
RSocket-JVM includes RSocket-RPC: remote procedure call system on top of Protocol Buffers.
31+
`Message-Streams` includes RPC: code-generation based remote procedure call system on top of Protocol Buffers.
3632

37-
### CompletableFuture, project-reactor, rxjava, helidon, smallrye-mutiny
33+
RSocket is low latency/high throughput L5 network protocol intended for high-performance services communication.
34+
It is transport agnostic, and runs on top of any reliable byte stream transport.
3835

39-
RSocket-JVM is currently comprised of RSocket-futures(CompletableFuture), RSocket-rxjava (rxjava3), RSocket-reactor (project-reactor), RSocket-helidon (helidon-commons-reactive)
40-
and smallrye-mutiny (mutiny).
36+
### CompletableFuture; GRPC StreamObserver; smallrye-mutiny, rxjava, project-reactor
4137

4238
**Multiple vendor libraries**. [Shared protocol core](https://jauntsdn.com/post/rsocket-jvm/) with minimal dependencies
43-
(netty-buffer only) streamline development process for each next vendor library.
44-
45-
**Non-intrusive**. API ([MessageStreams](https://github.com/jauntsdn/rsocket-jvm/blob/1.1.4/rsocket-reactor/src/main/java/com/jauntsdn/rsocket/MessageStreams.java)) & runtime ([RSocket](https://github.com/jauntsdn/rsocket-jvm/blob/1.1.4/rsocket-reactor/src/main/java/com/jauntsdn/rsocket/RSocket.java)) are clearly split so from end-user perspective there is
46-
only defined set of basic interactions on buffers/messages:
39+
(`netty-buffer` only) streamlined development process for each vendor library & reduced maintenance cost of multiple libraries to feasible level.
40+
41+
Project supports 3 kinds of APIs:
42+
* request-response with RSocket-futures (JDK only CompletableFuture);
43+
* traditional streaming with RSocket-GRPC (GRPC-stubs StreamObserver);
44+
* flavors of reactive with RSocket-mutiny (smallrye-mutiny), RSocket-rxjava (rxjava3), and RSocket-reactor (project-reactor).
45+
46+
**GRPC compatible**. All implementations are directly compatible with GRPC via MessageStreams-RPC & GRPC transport.
47+
GRPC clients can access such services without separate "gateway" binaries and IDL sharing schemes.
48+
49+
**Non-intrusive**. [MessageStreams](https://github.com/jauntsdn/rsocket-jvm/blob/1.3.0/rsocket-reactor/src/main/java/com/jauntsdn/rsocket/MessageStreams.java) API & [RSocket-JVM](https://github.com/jauntsdn/rsocket-jvm/blob/1.3.0/rsocket-reactor/src/main/java/com/jauntsdn/rsocket/RSocket.java) runtime are clearly split so from end-user perspective there is
50+
only set of streaming & non-streaming interactions on buffers/messages:
51+
52+
```groovy
53+
void requestResponse(Message message, StreamObserver<Message> responseObserver);
54+
void requestStream(Message message, StreamObserver<Message> responseObserver);
55+
StreamObserver<Message> requestChannel(StreamObserver<Message> responseObserver);
56+
void fireAndForget(Message message, StreamObserver<Message> responseObserver);
57+
```
58+
4759
```groovy
4860
Publisher<Message> requestResponse(Message message);
4961
Publisher<Message> requestStream(Message message);
5062
Publisher<Message> requestChannel(Publisher<Message> messages);
5163
Publisher<Void> fireAndForget(Message message);
5264
```
5365

54-
**GRPC compatible**. All implementations are directly compatible with GRPC via RSocket-RPC & GRPC transport.
55-
GRPC clients can access such services without separate "gateway" binaries and awkward IDL sharing schemes.
66+
### RPC
5667

57-
### Shared transports
68+
[MessageStreams-RPC](https://jauntsdn.com/post/rsocket-grpc/) is reflection-free, codegen based remote procedure call system
69+
relying on single data format - protocol buffers. This combination opened many optimization opportunities and enabled
70+
GRPC interop via respective GRPC transport.
71+
72+
Each vendor library has RPC module accompanied by compiler binary.
5873

59-
Message transports are based on `netty` only so usable by each vendor library, and are considered part
60-
of (not yet publicly available) RSocket-JVM runtime.
74+
### Multiple network transports
6175

62-
Currently they are comprised of
76+
Network transports are based on `Netty` only for compatibility with each vendor library, and are part of RSocket-JVM runtime.
6377

64-
* `TCP` & `UNIX domain sockets` - known efficient byte stream protocols for datacenter / inter-process communication,
78+
Currently comprised of
79+
80+
* `TCP` & `UNIX domain sockets` - known efficient byte stream protocols for datacenter / inter-process communication;
6581

6682
and Http2 streams based transports for interop:
6783

6884
* `GRPC-RSocket-RPC` for communication with internet clients / external services;
6985

70-
* `Websocket-over-http2` for cross-cloud communication with Internet Standards transport.
71-
72-
### RSocket-RPC
86+
* `WebSocket` & `Websocket-over-http2` for cross-cloud communication with Internet Standards transport.
7387

74-
[RSocket-RPC](https://jauntsdn.com/post/rsocket-grpc/) is reflection-free, codegen based remote procedure call system
75-
relying on single data format - protocol buffers. This combination opened many optimization opportunities and enabled
76-
GRPC interop via respective GRPC transport.
88+
### Examples
7789

78-
Each vendor library has RSocket-RPC API module accompanied by compiler binary.
90+
[messagestreams-interop-examples](https://github.com/jauntsdn/messagestreams-grpc-interop-examples) demonstrate all implementations interop.
7991

80-
### Examples
92+
[messagestreams-grpc-examples](https://github.com/jauntsdn/messagestreams-grpc-examples) demonstrate GRPC-stub StreamObserver based services.
8193

82-
[RSocket-jvm-interop-examples](https://github.com/jauntsdn/rsocket-jvm-interop-examples).
94+
[messagestreams-futures-examples](https://github.com/jauntsdn/messagestreams-futures-examples) demonstrate jdk CompletableFuture based services.
8395

8496
## Build
8597

86-
Building `jauntsdn/RSocket-jvm` requires java11 for helidon, and java8 for rxjava/reactor/mutiny.
98+
Building `jauntsdn/RSocket-jvm` requires java11+ (for helidon-commons-reactive), while the rest (futures/grpc-stubs/rxjava/reactor/mutiny) are java8+.
8799
```
88100
./gradlew
89101
```
@@ -95,7 +107,7 @@ Building & installing artifacts into local maven repository
95107

96108
## Binaries
97109

98-
Binary releases are published on Maven Central for java futures (CompletableFuture), reactor, rxjava, helidon & mutiny libraries.
110+
Binary releases are published on Maven Central for grpc, futures (CompletableFuture), reactor, rxjava, helidon & mutiny libraries.
99111

100112
```groovy
101113
@@ -104,29 +116,29 @@ repositories {
104116
}
105117
106118
dependencies {
107-
implementation "com.jauntsdn.rsocket:rsocket-messages:1.1.4"
108-
implementation "com.jauntsdn.rsocket:rsocket-rpc-idl:1.1.4"
109-
implementation "com.jauntsdn.rsocket:rsocket-<VENDOR>:1.1.4"
110-
implementation "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>:1.1.4"
119+
implementation "com.jauntsdn.rsocket:rsocket-messages:1.3.0"
120+
implementation "com.jauntsdn.rsocket:rsocket-rpc-idl:1.3.0"
121+
implementation "com.jauntsdn.rsocket:rsocket-<VENDOR>:1.3.0"
122+
implementation "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>:1.3.0"
111123
}
112124
```
113125

114-
RSocket-RPC compiler binaries are linux, windows(x86) only
126+
MessageStreams-RPC compiler binaries are linux, windows(x86) only
115127
```groovy
116128
protobuf {
117129
plugins {
118130
rsocketRpc {
119-
artifact = "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>-compiler:1.1.4"
131+
artifact = "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>-compiler:1.3.0"
120132
}
121133
}
122134
}
123135
```
124136

125137
### Message streams. Design goals & scope
126138

127-
**Fast transparent networking with practically useful set of reactive streams libraries, solely for JVM serverside applications**
139+
**Fast transparent networking with practically useful set of streams libraries, solely for JVM serverside applications**
128140

129-
Currently rxjava3, projectreactor, smallrye-mutiny, helidon-reactive-streams.
141+
Currently CompletableFuture, GRPC-stubs (StreamObserver), smallrye-mutiny, rxjava3, projectreactor.
130142

131143
Languages and platforms other than JVM lack framework ecosystem (and most lack single reactive streams compatible library),
132144
so there are no substantial (except populist) reasons for commitment.
@@ -149,7 +161,7 @@ is essential for JVM-only Message Streams (RSocket-JVM) libraries.
149161

150162
Transports are shared, and considered part of runtime due to tight contract with RSocket-JVM for performance reasons.
151163
This project offers strictly few highly optimized transports for interprocess/datacenter (TCP, UNIX sockets)
152-
and cross-datacenter (GRPC-RSocketRPC, websocket-over-htp2) communication, instead of user-friendly APIs for
164+
and cross-datacenter (GRPC-RSocketRPC, websocket, websocket-over-htp2) communication, instead of user-friendly APIs for
153165
external implementors. This way if supported transports are extended or replaced, transport contract
154166
is free to change to accommodate new needs.
155167

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
group=com.jauntsdn.rsocket
2-
version=1.3.0
2+
version=1.3.1
33

44
dependencyManagementPluginVersion=1.1.0
55
protobufPluginVersion=0.9.2
66
googleJavaFormatPluginVersion=0.9
77
gitPluginVersion=0.13.0
88
versionsPluginVersion=0.45.0
99

10-
nettyBomVersion=4.1.89.Final
10+
nettyBomVersion=4.1.90.Final
1111
grpcStubVersion=1.53.0
1212
reactorBomVersion=Dysprosium-SR22
1313
rxjavaVersion=3.1.6
@@ -19,7 +19,7 @@ javaxAnnotationVersion=1.3.2
1919
jakartaInjectVersion=2.0.1
2020
jakartaAnnotationVersion=2.1.1
2121

22-
protobufVersion=3.22.0
22+
protobufVersion=3.22.2
2323

2424
release=false
2525
org.gradle.parallel=true

rsocket-bom/gradle.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a Gradle generated file for dependency locking.
22
# Manual edits can break the build and are not advised.
33
# This file is expected to be part of source control.
4-
io.netty:netty-bom:4.1.89.Final=classpath
4+
io.netty:netty-bom:4.1.90.Final=classpath
55
io.projectreactor:reactor-bom:Dysprosium-SR22=classpath
66
empty=

rsocket-futures/gradle.lockfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
77
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
88
com.google.guava:guava:22.0=googleJavaFormat1.6
99
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
10-
io.netty:netty-buffer:4.1.89.Final=compileClasspath,runtimeClasspath
11-
io.netty:netty-common:4.1.89.Final=compileClasspath,runtimeClasspath
10+
io.netty:netty-buffer:4.1.90.Final=compileClasspath,runtimeClasspath
11+
io.netty:netty-common:4.1.90.Final=compileClasspath,runtimeClasspath
1212
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
1313
empty=annotationProcessor

rsocket-grpc/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ plugins {
1010

1111
dependencies {
1212
api project(":rsocket-messages")
13-
api "io.grpc:grpc-stub"
13+
api ("io.grpc:grpc-stub") {
14+
exclude group: "com.google.guava", module: "guava"
15+
exclude group: "com.google.errorprone", module: "error_prone_annotations"
16+
}
1417

1518
compileOnly "com.google.code.findbugs:jsr305"
1619
}

rsocket-grpc/gradle.lockfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,14 @@
33
# This file is expected to be part of source control.
44
com.google.code.findbugs:jsr305:3.0.2=compileClasspath,googleJavaFormat1.6,runtimeClasspath
55
com.google.errorprone:error_prone_annotations:2.0.18=googleJavaFormat1.6
6-
com.google.errorprone:error_prone_annotations:2.14.0=compileClasspath,runtimeClasspath
76
com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
87
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
9-
com.google.guava:failureaccess:1.0.1=compileClasspath,runtimeClasspath
108
com.google.guava:guava:22.0=googleJavaFormat1.6
11-
com.google.guava:guava:31.1-android=compileClasspath,runtimeClasspath
12-
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=compileClasspath,runtimeClasspath
139
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
14-
com.google.j2objc:j2objc-annotations:1.3=compileClasspath,runtimeClasspath
1510
io.grpc:grpc-api:1.53.0=compileClasspath,runtimeClasspath
1611
io.grpc:grpc-context:1.53.0=compileClasspath,runtimeClasspath
1712
io.grpc:grpc-stub:1.53.0=compileClasspath,runtimeClasspath
18-
io.netty:netty-buffer:4.1.89.Final=compileClasspath,runtimeClasspath
19-
io.netty:netty-common:4.1.89.Final=compileClasspath,runtimeClasspath
20-
org.checkerframework:checker-qual:3.12.0=compileClasspath,runtimeClasspath
13+
io.netty:netty-buffer:4.1.90.Final=compileClasspath,runtimeClasspath
14+
io.netty:netty-common:4.1.90.Final=compileClasspath,runtimeClasspath
2115
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
2216
empty=annotationProcessor

rsocket-grpc/src/main/java/com/jauntsdn/rsocket/AbstractRSocket.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.util.concurrent.CompletionStage;
2626
import javax.annotation.Nullable;
2727

28-
public abstract class AbstractRSocket implements RSocket {
28+
public abstract class AbstractRSocket implements RSocketHandler {
2929

3030
@Override
3131
public void metadataPush(Message message, StreamObserver<Message> responseObserver) {
@@ -57,6 +57,14 @@ public StreamObserver<Message> requestChannel(StreamObserver<Message> responseOb
5757
return MessageStreamsHandler.noopServerObserver();
5858
}
5959

60+
@Override
61+
public StreamObserver<Message> requestChannel(
62+
Message message, StreamObserver<Message> responseObserver) {
63+
message.release();
64+
responseObserver.onError(new UnsupportedOperationException("request-channel not implemented"));
65+
return MessageStreamsHandler.noopServerObserver();
66+
}
67+
6068
@Override
6169
public void dispose() {}
6270

rsocket-helidon/gradle.lockfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ io.helidon.common:helidon-common-mapper:2.5.6=compileClasspath,runtimeClasspath
1111
io.helidon.common:helidon-common-reactive:2.5.6=compileClasspath,runtimeClasspath
1212
io.helidon.common:helidon-common-service-loader:2.5.6=compileClasspath,runtimeClasspath
1313
io.helidon.common:helidon-common:2.5.6=compileClasspath,runtimeClasspath
14-
io.netty:netty-buffer:4.1.89.Final=compileClasspath,runtimeClasspath
15-
io.netty:netty-common:4.1.89.Final=compileClasspath,runtimeClasspath
14+
io.netty:netty-buffer:4.1.90.Final=compileClasspath,runtimeClasspath
15+
io.netty:netty-common:4.1.90.Final=compileClasspath,runtimeClasspath
1616
jakarta.annotation:jakarta.annotation-api:1.3.5=compileClasspath,runtimeClasspath
1717
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
1818
empty=annotationProcessor

rsocket-messages/gradle.lockfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
77
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
88
com.google.guava:guava:22.0=googleJavaFormat1.6
99
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
10-
io.netty:netty-buffer:4.1.89.Final=compileClasspath,runtimeClasspath
11-
io.netty:netty-common:4.1.89.Final=compileClasspath,runtimeClasspath
10+
io.netty:netty-buffer:4.1.90.Final=compileClasspath,runtimeClasspath
11+
io.netty:netty-common:4.1.90.Final=compileClasspath,runtimeClasspath
1212
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
1313
empty=annotationProcessor

rsocket-mutiny/gradle.lockfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
77
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
88
com.google.guava:guava:22.0=googleJavaFormat1.6
99
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
10-
io.netty:netty-buffer:4.1.89.Final=compileClasspath,runtimeClasspath
11-
io.netty:netty-common:4.1.89.Final=compileClasspath,runtimeClasspath
10+
io.netty:netty-buffer:4.1.90.Final=compileClasspath,runtimeClasspath
11+
io.netty:netty-common:4.1.90.Final=compileClasspath,runtimeClasspath
1212
io.smallrye.common:smallrye-common-annotation:1.13.0=compileClasspath,runtimeClasspath
1313
io.smallrye.reactive:mutiny:1.8.0=compileClasspath,runtimeClasspath
1414
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6

0 commit comments

Comments
 (0)