GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome Java
  • Reactive libraries

This view

  • Original page
  • New address

GeezerVison is showing java.libhunt.com — RSocket Alternatives - Java Reactive libraries | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

RSocket

Java implementation of RSocket

rsocket logo
rsocket.io    Source Code    Docs    Changelog
Suggest Changes
Popularity
7.3
Stable
Activity
6.1
-
Stars 2,384
Watchers 103
Forks 353
Last Commit almost 2 years ago

Description

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:

Programming language: Java
License: Apache License 2.0
Tags: Networking     Reactive Libraries     API    
Latest version: v1.1.5

RSocket alternatives and similar libraries

Based on the "Reactive libraries" category.
Alternatively, view rsocket-java alternatives based on common mentions on social networks and blogs.

  • RxJava

    9.9 9.5 L2 RSocket VS RxJava
    RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
    ReactiveX logo
  • Reactor Core

    8.5 9.1 RSocket VS Reactor Core
    Non-Blocking Reactive Foundation for the JVM
    reactor logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • Reactive Streams

    8.2 1.9 L4 RSocket VS Reactive Streams
    Reactive Streams Specification for the JVM
    reactive-streams logo
  • mutiny

    5.6 9.2 RSocket VS mutiny
    An Intuitive Event-Driven Reactive Programming Library for Java
    smallrye logo
  • Reactor

    4.1 0.0 L2 RSocket VS Reactor
    DISCONTINUED. Library for building reactive fast-data applications.
  • rpc

    1.2 RSocket VS rpc
    Lightweight library for service-based RPC and public APIs

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of RSocket or a related project?

Add another 'Reactive libraries' Library

Popular Comparisons

  • RSocket
    vs
    Reactor
  • RSocket
    vs
    RxJava
  • RSocket
    vs
    Reactive Streams
  • RSocket
    vs
    mutiny
  • RSocket
    vs
    rpc

README

RSocket

Join the chat at https://gitter.im/RSocket/RSocket-Java

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:

  • request/response (stream of 1)
  • request/stream (finite stream of many)
  • fire-and-forget (no response)
  • event subscription (infinite stream of many)

Learn more at http://rsocket.io

Build and Binaries

Build Status

⚠️ 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](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'
}

Development

Install the google-java-format in Intellij, from Plugins preferences. Enable under Preferences -> Other Settings -> google-java-format Settings

Format automatically with

$./gradlew goJF

Debugging

Frames can be printed out to help debugging. Set the logger io.rsocket.FrameLogger to debug to print the frames.

Requirements

  • Java 8 - heavy dependence on Java 8 functional APIs and java.time, also on Reactor
  • Android O - https://github.com/rsocket/rsocket-demo-android-java8

Trivial Client

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();
        }
    }
}

Zero Copy

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.

Example Server setup

RSocketServer.create(new PingHandler())
        // Enable Zero Copy
        .payloadDecoder(PayloadDecoder.ZERO_COPY)
        .bind(TcpServerTransport.create(7878))
        .block()
        .onClose()
        .block();

Example Client setup

RSocket clientRSocket =
        RSocketConnector.create()
            // Enable Zero Copy
            .payloadDecoder(PayloadDecoder.ZERO_COPY)
            .connect(TcpClientTransport.create(7878))
            .block();

Bugs and Feedback

For bugs, questions and discussions please use the Github Issues.

LICENSE

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.


*Note that all licence references and agreements mentioned in the RSocket README section above are relevant to that project's source code only.

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome Java is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.