Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Bacon.js | 6,443 | 8,696 | 268 | 3 months ago | 222 | November 03, 2020 | 90 | mit | TypeScript | |
Functional reactive programming library for TypeScript and JavaScript | ||||||||||
Reactive | 6,169 | 1,358 | 1,690 | 2 days ago | 37 | June 14, 2023 | 137 | mit | C# | |
The Reactive Extensions for .NET | ||||||||||
Reactive Streams Jvm | 4,680 | 361 | 767 | 25 days ago | 22 | May 22, 2022 | 26 | mit-0 | Java | |
Reactive Streams Specification for the JVM | ||||||||||
Reactor Core | 4,668 | 1,005 | 607 | 15 hours ago | 130 | July 11, 2023 | 131 | apache-2.0 | Java | |
Non-Blocking Reactive Foundation for the JVM | ||||||||||
Rxpy | 4,528 | 27 | 25 days ago | 15 | July 16, 2022 | 38 | mit | Python | ||
ReactiveX for Python | ||||||||||
Reactor | 3,545 | 58 | 166 | 11 days ago | 118 | July 11, 2023 | 10 | apache-2.0 | ||
Reactor Bill Of Materials (tracking reactor-core, reactor-netty and more) | ||||||||||
Most | 3,453 | 1,070 | 306 | a year ago | 79 | October 08, 2020 | 48 | mit | JavaScript | |
Ultra-high performance reactive programming | ||||||||||
Rsocket Java | 2,269 | 43 | 91 | 4 months ago | 46 | June 06, 2023 | 37 | apache-2.0 | Java | |
Java implementation of RSocket | ||||||||||
Marble | 2,081 | 9 | 21 | 7 months ago | 159 | March 06, 2023 | 5 | mit | TypeScript | |
Marble.js - functional reactive Node.js framework for building server-side applications, based on TypeScript and RxJS. | ||||||||||
Kefir | 1,828 | 9,210 | 262 | 7 months ago | 86 | November 28, 2020 | 38 | mit | JavaScript | |
A Reactive Programming library for JavaScript |
RSocket is a binary protocol for use on byte stream transports such as TCP, WebSockets, and Aeron.
It enables the following symmetric interaction models via async message passing over a single connection:
Learn more at http://rsocket.io
⚠️ The master
branch is now dedicated to development of the 1.2.x
line.
Releases and milestones are available via Maven Central.
Example:
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' } // Reactor milestones (if needed)
}
dependencies {
implementation 'io.rsocket:rsocket-core:1.2.0-SNAPSHOT'
implementation 'io.rsocket:rsocket-transport-netty:1.2.0-SNAPSHOT'
}
Snapshots are available via oss.jfrog.org (OJO).
Example:
repositories {
maven { url 'https://maven.pkg.github.com/rsocket/rsocket-java' }
maven { url 'https://repo.spring.io/snapshot' } // Reactor snapshots (if needed)
}
dependencies {
implementation 'io.rsocket:rsocket-core:1.2.0-SNAPSHOT'
implementation 'io.rsocket:rsocket-transport-netty:1.2.0-SNAPSHOT'
}
Install the google-java-format in Intellij, from Plugins preferences. Enable under Preferences -> Other Settings -> google-java-format Settings
Format automatically with
$./gradlew goJF
Frames can be printed out to help debugging. Set the logger io.rsocket.FrameLogger
to debug to print the frames.
package io.rsocket.transport.netty;
import io.rsocket.Payload;
import io.rsocket.RSocket;
import io.rsocket.core.RSocketConnector;
import io.rsocket.transport.netty.client.WebsocketClientTransport;
import io.rsocket.util.DefaultPayload;
import reactor.core.publisher.Flux;
import java.net.URI;
public class ExampleClient {
public static void main(String[] args) {
WebsocketClientTransport ws = WebsocketClientTransport.create(URI.create("ws://rsocket-demo.herokuapp.com/ws"));
RSocket clientRSocket = RSocketConnector.connectWith(ws).block();
try {
Flux<Payload> s = clientRSocket.requestStream(DefaultPayload.create("peace"));
s.take(10).doOnNext(p -> System.out.println(p.getDataUtf8())).blockLast();
} finally {
clientRSocket.dispose();
}
}
}
By default to make RSocket easier to use it copies the incoming Payload. Copying the payload comes at cost to performance
and latency. If you want to use zero copy you must disable this. To disable copying you must include a payloadDecoder
argument in your RSocketFactory
. This will let you manage the Payload without copying the data from the underlying
transport. You must free the Payload when you are done with them
or you will get a memory leak. Used correctly this will reduce latency and increase performance.
RSocketServer.create(new PingHandler())
// Enable Zero Copy
.payloadDecoder(PayloadDecoder.ZERO_COPY)
.bind(TcpServerTransport.create(7878))
.block()
.onClose()
.block();
RSocket clientRSocket =
RSocketConnector.create()
// Enable Zero Copy
.payloadDecoder(PayloadDecoder.ZERO_COPY)
.connect(TcpClientTransport.create(7878))
.block();
For bugs, questions and discussions please use the Github Issues.
Copyright 2015-2020 the original author or authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.