All Projects → bclozel → Spring Flights

bclozel / Spring Flights

Demo application showcasing RSocket support in Spring

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Spring Flights

Spring Vue Sample
Stars: ✭ 69 (-9.21%)
Mutual labels:  spring-boot
Sample Boot Micro
Spring Cloud + Gradle Multi Project + Java8
Stars: ✭ 72 (-5.26%)
Mutual labels:  spring-boot
Cas
Apereo CAS - Enterprise Single Sign On for all earthlings and beyond.
Stars: ✭ 9,154 (+11944.74%)
Mutual labels:  spring-boot
Blog
SpringBoot + Mybatis + thymeleaf 搭建的个人博客 http://www.54tianzhisheng.cn/
Stars: ✭ 1,156 (+1421.05%)
Mutual labels:  spring-boot
Blog
一款简洁响应式博客系统
Stars: ✭ 72 (-5.26%)
Mutual labels:  spring-boot
Spring Boot Angular4 Authentication
spring-boot and angular 4 basic authentication with spring security
Stars: ✭ 74 (-2.63%)
Mutual labels:  spring-boot
Spring Boot Building Api Backend
Code of the 'Practical Guide to Building an API Back End with Spring Boot' book
Stars: ✭ 69 (-9.21%)
Mutual labels:  spring-boot
Mybatis Spring Boot Jpetstore
A sample web application built on MyBatis 3, Spring Boot and Thymeleaf 3.
Stars: ✭ 75 (-1.32%)
Mutual labels:  spring-boot
Springboot React Jwt
JSON Web Token / React / Spring Boot example
Stars: ✭ 72 (-5.26%)
Mutual labels:  spring-boot
Okta Blog Archive
Okta Developer Blog
Stars: ✭ 74 (-2.63%)
Mutual labels:  spring-boot
Wechat Operation
运营星(微信第三方平台): 微信公众号深度运营平台,使公众号运营更加灵活,快速提升用户体验感。
Stars: ✭ 70 (-7.89%)
Mutual labels:  spring-boot
Spring Boot Webflux Jjwt
Example Spring Boot and WebFlux (Reactive Web) with Spring Security and JWT for token Authentication and Authorization
Stars: ✭ 71 (-6.58%)
Mutual labels:  spring-boot
Maintain
springboot + springmvc +Spring Security + mybatis + PageHelper(Mybatis分页插件) + druid + (maven/gradle) + thymeleaf + bootstrap 组成的框架,基于Jersey, Swagger,SwaggerUi的restful API
Stars: ✭ 74 (-2.63%)
Mutual labels:  spring-boot
Cas Gradle Overlay Template
CAS Gradle Overlay: Generic CAS gradle war overlay to exercise the latest versions of CAS
Stars: ✭ 69 (-9.21%)
Mutual labels:  spring-boot
Spring Boot Api Project Seed
🌱🚀一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目~
Stars: ✭ 8,979 (+11714.47%)
Mutual labels:  spring-boot
Spring React Boilerplate
Boilerplate application to demonstrate how to wire up Spring, JWT Authentication, React, Redux and Websockets
Stars: ✭ 70 (-7.89%)
Mutual labels:  spring-boot
Labs
Research on distributed system
Stars: ✭ 73 (-3.95%)
Mutual labels:  spring-boot
Spring Ws
Spring WS Tutorials
Stars: ✭ 75 (-1.32%)
Mutual labels:  spring-boot
Ixortalk.aws.cognito.jwt.security.filter
Spring Boot security filter for decoding Cognito JWT IdTokens
Stars: ✭ 75 (-1.32%)
Mutual labels:  spring-boot
Curso Sistemas Web Com Spring Javascript Bootstrap
Stars: ✭ 74 (-2.63%)
Mutual labels:  spring-boot

Spring Flights Application

This is a demo application showcasing RSocket support in Spring.

This application is made of 3 modules:

  • radar-collector, an app that provides information about airport radars and the aircraft signals they collect.
  • flight-tracker and flight-client, an app that displays an interactive map with radars and aircrafts.

As a first contact with the RSocket protocol, check out the demo-backpressure application.

Running the applications

First, run the collector application:

$ ./gradlew :radar-collector:build
$ java -jar radar-collector/build/libs/radar-collector-0.0.1-SNAPSHOT.jar

Then, run the tracker web application:

$ ./gradlew :flight-tracker:build
$ java -jar flight-tracker/build/libs/flight-tracker-0.0.1-SNAPSHOT.jar

The tracker application is available at http://localhost:8080/

Radar Collector

This application stores the name, code and location of airports around the world in a MongoDB database. For each airport, it is able to generate random aircraft signals data received by the local airport radar.

Clients can then request for a list of airport radars within a particular area and get a stream of aircraft signals for airport radars.

The application starts an RSocket server with TCP transport, at localhost:9898.

Currently you cannot use the rsocket-cli because it does not yet support composite metadata. However you can use the following tests.

Flight Tracker

This application displays an interactive map showing radars and aircraft flying around them. It stores user profile and preferences, like favorite airport, in a local database.

The application starts a WebFlux server at localhost:8080, with an RSocket over websocket endpoint on /rsocket. The flight-client module builds the JavaScript client using Leaflet and the the websocket client from rsocket-js.

The browser will first locate all radars in the current view box; you can do the same on the CLI with:

rsocket-cli --stream \
--metadataFormat=application/vnd.spring.rsocket.metadata+json -m='{"route":"locate.radars.within"}' \
--dataFormat=json -i='{"viewBox": {"first":{"lng": 3.878915, "lat": 46.409025}, "second": {"lng": 6.714843, "lat": 44.365644}}, "maxRadars": 10}' \
--debug ws://localhost:8080/rsocket

Once all the radars are retrieved, we can ask a merged stream of all aircrafts for those radars to the server.

rsocket-cli --stream \
--metadataFormat=application/vnd.spring.rsocket.metadata+json -m='{"route":"locate.aircrafts.for"}' \
--dataFormat=json -i='[{"code":"LYS"}, {"code":"CVF"}, {"code":"NCY"}]' \
--debug ws://localhost:8080/rsocket

The browser will perform similar requests and update the aircrafts' positions live.

The Leaflet map has a number input (bottom left) which controls the reactive streams demand from the client. Decreasing it significantly should make the server send less updates to the map. Increasing it back should catch up with the updates.

The map also has a text input (bottom right) where users can enter another user's login to go to their favorite airport and see them on the map.

Also, once the RSocket client is connected to the server, a bi-directionnal connection is established: they're now both able to send requests (being a requester) and respond to those (being a responder). Here, this demo shows how the JavaScript client can respond to requests sent by the server.

Sending the following request to the web server will make it send requests to all connected clients to let them know that they should change their location to the selected radar:

curl -X POST localhost:8080/location/CDG
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].