This tutorial aims to teach how to run a real-time banking example with your first Joule.
Who this tutorial is intended for
We have tailored this tutorial for anyone who wants to learn how to use Joule for the first time and who wishes to learn how to deploy a first use case given that your environment is setup already.
What we will learn
By the end of this tutorial, we will have learned:
How to start and stop Joule.
Deploy a first real-time use case.
Access the Redpanda interface to see the deployed use case in action.
Prerequisites
Understanding of how to navigate with the command line through directories. Not sure how to navigate with command line? Follow this tutorial.
The following steps will guide us on setting up our environment to deploy our images and containers with Joule.
We will clone the repository with this command.
Once cloned go in to the directory.
Now we need to setup the environment by build and copying required files in to the quickstart directory by executing gradle buildJouleDemoEnv, see below.
And should generate the below output
We will navigate to the quickstart directory.
We will make sure that Docker or an alternative is running.
We are now ready to start running Joule. To start Joule, we need to run the following command which will start building our images and containers.
Within the getting started root directory four projects are provided. In the case of this use case, we will run the following command from the ~/quickstart directory:
The command will start up the following containers ready for use case deployment:
Joule Daemon
Joule Database
Redpanda
We should expect this output
Expected result when images built
Expected result when containers built
Step 2 - Run the Getting Started example
The banking demo directories provides a set of examples in the form of a postman collection and environment. These can be found under the examples directory.
We will now get started running the banking Getting Started demo example using Postman.
First we will import the use case demos and environment files from the banking-demo examples directory. Import the PostMan collection by selecting “Import” from the Collections tab and select the file Joule.postman_environment.json from fractalworks-stream-gettingstarted/banking-demo/examples
Postman collection
We will set the Postman environment to Joule.
Setting the environment
From the Getting started \ Deploy folder click Run folder from the menu.
Deploying the example
Finally execute the run order by clicking the Run Joule - Banking demo button.
Running the example
This will deploy the source, stream, sink and the use case binding definition to the platform.
Note on a restart these setting will be rehydrated and will automatically start.
We should expect this output
Expected result in Postman
Step 3 - Will start the quote publisher
The banking demo is provided with a quote simulator which is seeded using
This command will generate a continuous set of quote and publish them to the quotes topic. We will see how to access the topic on the next step.
We should expect this output
Press return to continue.
Expected result when the quote publisher has started
Step 4 - Now review our use case outputs
Once the processing pipeline completes its tasks, the resulting events are published on to the analytics_view topic ready for further consumption (i.e. distribution, dashboard, dynamic portfolio risk measures etc).