This is a demo of a ride queueing system for Coderland, an amusement park built with the latest and greatest technologies to provide and innovative and compelling guest experience.
The name of the ride is Reactica, a thrilling roller coaster ride through another dimension. It is the basis of our tutorial Reactica: reactive programming and Vert.x.
The demo showcases the new Red Hat Application Runtimes (Red Hat OpenShift Container Platform with Red Hat Application Services) in the context of reactive systems development, showing how components work together to form truly distributed/reactive systems (not just reactive programming). It utilizes several components from Red Hat, including Eclipse Vert.x, Red Hat Data Grid, and Red Hat AMQ.
The architecture of the Reactica system looks like this:
There are several individual microservices and infrastructure components that make up this app:
- Billboard UI - A frontend based on JQuery using a Vert.x based runtime
- Event Generator (Users and Rides in the diagram) - This service generates different events such as: users entering the queue, users getting on the ride etc, these events are sent out as AMQ messages using Vert.x as its runtime
- Event Store - This service retrieves events from AMQ and stores them to the Data Grid.
- Current Line Updater - This service registers a continuous query with Red Hat Data Grid that triggers for events that are related to the line for the ride. When the line is updated, this service sends an updated version of the current line to the billboard service via AMQ.
- Queue Length Estimate - This service calculates the approximate waiting time for a person entering the line at this point based on the number of persons in line and how many people the ride can carry. This service triggers every 10 seconds and sends an updated wait time to the billboard.
The main UI looks like this:
This panel shows several users waiting in line (in blue), several users currently on the ride (in yellow), and one person who has completed the ride (in green).
Deploying the Demo
See the setup instructions.
Coderland's tutorial Reactica: reactive programming and Vert.x features a complete, sophisticated example of a system of reactive Vert.x microservices that work together.
:gift: REPO: The Reactica roller coaster source code (this page)
:page_facing_up: Reactica: reactive programming and Vert.x tutorial
Part 1: An introduction to reactive programming and Vert.x
:page_facing_up: ARTICLE: An introduction to reactive programming and Vert.x
:clapper: VIDEO: Reactive programming and Vert.x
Part 2: Building a reactive system
:page_facing_up: ARTICLE: Building a reactive system
:clapper: VIDEO: Reactica architecture
Part 3: A reactive system in action
:page_facing_up: ARTICLE: A reactive system in action
:clapper: VIDEO: Deploying Reactica
Other useful links
:page_facing_up: Andre Staltz's The introduction to Reactive Programming you've been missing
:page_facing_up: The Reactive Manifesto
:page_facing_up: The Vert.x home page
:gift: REPO: The
vertx-starter source code, a simple Vert.x verticle that shows the basics of how Vert.x works
Coderland :roller_coaster::rocket::ferris_wheel: is an imaginary theme park for learning, developer training, and Red Hat software. See the Red Hat Developer Program for more great stuff.