This is a repository containing a demo based on transport.opendata.ch and sbb.ch data to show how to work with streaming data. The aim of the demo is to show how to use OpenShift, together with Vert.x and Infinispan to analyse such streaming data. It uses RxJava2 APIs for transforming data and coordinate the actions.
The necessary tooling varies depending on your target environment.
- OpenShift Origin 3.7.2
- Docker 1.13.1 (recommended, but should work with higher versions too). This demo has been tested with Docker 17.09 too.
- Maven 3
- Node.js 4.2 or higher. If not already using Node.js, you can install Node Version Manager to easily switch between different versions.
This demo could be run alternatively using Minishift.
Paths and URLs
Local paths and URLs
When running in a local environment, use these paths or URLS for accessing components:
- It is recommended that you use Google Chrome or Firefox for accessing it.
Dashboard HTTP host path:
Start OpenShift by calling:
Head to OpenShift Console, click on
Select from Project and select
Select Infinispan ephemeral template and give it these parameters, leaving the rest of parameters as they are:
Next, then click
While the data grid loads, start the graphical Infinispan visualizer:
cd visual ./deploy.sh
Verify the visualizer shows 3 nodes via Infinispan visualizer URL.
Next, build and deploy the main application:
cd app ./first-deploy.sh
Go to the visualizer and switch to
Then, switch to terminal and execute:
It should return something similar to this:
Value was: world
You should also see one dot appearing in each of the nodes in the visualizer for cache
This represents that each node has an entry, which is what the test endpoint does.
Next, switch the visualizer to the
Call up the injector so that data is injected:
Once the injector started, check the visualizer and see how each node has more and more dots around it.
dashboard.Dashboard from the IDE passing in the correct
You should see a dashboard appearing with delayed trains.
For the final visualization, there's a Google Maps based web application that tracks positions of delayed trains. First, start the web application by calling:
cd web-viewer npm install npm start
Alternatively, if using Node Version Manager you can simply call
Then, open a browser to address
It should show an empty Google Maps.
Next, restart the dashboard and you should start seeing blue dots representing positions of delayed trains.
Here's a list of conferences and user groups where this demo has been presented.
live-coding folder contains step-by-step live coding instructions of the demos, as presented in these live events: