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).
To deploy this demo, you need Minishift v1.33.0 or later installed and the minishift
CLI available on your $PATH
. You also need curl
and Maven v3.5.3 or later.
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.
🎁 REPO: The Reactica roller coaster source code (this page)
📄 Reactica: reactive programming and Vert.x tutorial
🎬 VIDEO: An overview of the Reactica roller coaster
📄 ARTICLE: An introduction to reactive programming and Vert.x
🎬 VIDEO: Reactive programming and Vert.x
📄 ARTICLE: Building a reactive system
🎬 VIDEO: Reactica architecture
📄 ARTICLE: A reactive system in action
📖 Clement Escoffier's excellent book Building Reactive Microservices in Java, available for free from the Red Hat Developer Program
📄 Andre Staltz's The introduction to Reactive Programming you've been missing
🎁 REPO: The vertx-starter
source code, a simple Vert.x verticle that shows the basics of how Vert.x works
Coderland 🎢🚀🎡 is an imaginary theme park for learning, developer training, and Red Hat software. See the Red Hat Developer Program for more great stuff.