GithubHelp home page GithubHelp logo

hhtiger / rsocket-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dsibilio/rsocket-demo

0.0 1.0 0.0 978 KB

RSocket demo, showing examples of usage for: Java RSocket server, Java RSocket client and Javascript RSocket client.

JavaScript 95.94% HTML 0.13% Java 3.82% Dockerfile 0.11%

rsocket-demo's Introduction

Getting Started

What's this?

A Spring Boot 2.2 reactive application to be used as an RSocket demo, including the following features:

  • Java RSocket server
  • Java RSocket client
  • Javascript RSocket client

The Java backend exposes the following APIs:

  • HTTP http://localhost:8080/socket/{author} : the HTTP request triggers the Java RSocket client to pull data from the Java RSocket server
  • HTTP http://localhost:8080/tweets/{author} : the same API as above but without any socket interaction, pure SSE over HTTP
  • WS ws://localhost:8080/tweetsocket - route: tweets.by.author : WebSocket transport employed by the Javascript RSocket client to pull data from the Java RSocket server

The Javascript client can be used by requesting http://localhost:8080/index.html

*the possible {author} values are linustorvalds, robertmartin, martinfowler.

Quickstart

Spin up both the backend and the frontend by running: mvn spring-boot:run.

NOTE: when started this way, the demo will try to run an Embedded Redis Server instance on the specified port. If a Redis Server instance is already running on your machine you can either a) change the specified redis port in the application.yml file, or b) run the demo with the prod profile enabled, which disables the Embedded Redis Server (eg. mvn spring-boot:run -Dspring-boot.run.profiles=prod).

Running with Docker

...or if you want, you can run the app within docker by running: docker-compose up

(this will use a dockerized Redis server rather than embedded Redis!)

Reference Documentation

For further reference, please consider the following resources:

rsocket-demo's People

Contributors

dsibilio avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.