IBM Streaming Analytics is available on Bluemix (www.bluemix.net). Streaming Analytics is built upon the IBM Streams technology. Streams is an advanced analytic platform allowing user-developed applications to quickly ingest, analyze, and correlate information as it arrives from a wide variety of real-time sources. The Streaming Analytics service gives you the ability to deploy Streams applications to run in the Bluemix cloud.
Finding the service
- Visit the Bluemix web portal at www.bluemix.net.
- LOG IN (or SIGN UP for Bluemix.)
- Once you are logged in to Bluemix, open the CATALOG link.
- Browse the catalog to find the “Streaming Analytics” service
- Select the Streaming Analytics entry in the catalog.
Once you’ve selected the Streaming Analytics icon in the Bluemix catalog, the Streaming Analytics catalog page is displayed:
You can give your service instance a custom name or accept the default. Clicking CREATE on the Streaming Analytics catalog page will create an instance of the service for you. This provides you with your own Streams instance, started and ready to run Streams Applications. Each instance is created with two dedicated application nodes, but you can add nodes to the instance or remove nodes from the instance as you require.
Using the Streaming Analytics Service
There are two ways that you can use your Streaming Analytics instance:
- Interactively – through the Streaming Analytics console
- Programmatically – through the Streaming Analytics REST API
You can also combine the two usage methods. For example, you could submit Streams applications through the REST API and explore the running applications using the Streams console.
Interactive Approach – Using the Streams Console with the Streaming Analytics Service
You can launch the Streams console from the Streaming Analytics instance, and submit applications to your instance from the console. You may also explore, monitor, and control your running applications from the console. To access the Streams Console, perform the following steps:
- Bring up the Streaming Analytics service dashboard by clicking on the tile in the Bluemix web portal associated with your instance.
- Click on the LAUNCH button to launch the Streams console.
This version of the Streams Console is specifically tailored for the Cloud environment. Instead of showing all information about a Streams domain, this Streams Console will only show information related to your instance. The Application Dashboard view gives you an overview of your Streams instance. It shows a summary of all of the jobs and PEs that are running on the instance. From the dashboard, you can see the load average of the hosts that are assigned to your instance. You can monitor various metrics like CPU and memory from here.
Below is the initial view of the Streams Console, just as it would appear after you launch it from the service dashboard for your new instance.
The Streams Console can be used to submit a Streams application to your instance in the cloud. Select the “play” icon from the top menu bar and then select Submit Job.
When submitting a job, you are prompted to identify a Streams Application Bundle (.sab file) to upload and submit to your Streams instance. Below, a .sab file is chosen for an application that was developed locally on a laptop using the Streams Quick Start Edition. (The Streaming Analytics service in Bluemix requires you to develop your Streams application in Streams environment outside of Bluemix. If you don’t already have a Streams environment where you can develop and test applications, the Streams Quick Start Edition provides a full Streams environment, free-of-charge. See the Streaming Analytics Development Guide for instructions on downloading and setting up the Streams Quick Start Edition.)
After identifying the Streams Application Bundle, click Configure.
On the next page, specify any submission time parameters or other submission information as required by your Streams application. Click Submit to deploy the application to your Streams instance.
In addition to submitting applications, the console can be used to explore and manage your applications. For example, the Streams graph for the instance in the cloud is shown below, displaying the live status of the application in the form of a flow graph.
Putting it all together: Deploy a starter application
This short video demonstrates the features and concepts just discussed. You can follow along simply by downloading the sample application and submitting it to the service, no coding required!
Download the application, and then watch the video. It shows how to:
- Create an instance of the Streaming Analytics Service (00:22)
- Run the starter application in the service (00:56)
- See the actual data being processed by an application (02:13)
- Look at the applications logs and any data printed to stdout/stderr (03:17)
Programmatic Approach – Using the Streaming Analytics REST API
The Streaming Analytics service provides a REST API to allow Bluemix applications to interact with a Streams instance programmatically. The API provides several operations allowing an application to submit Streams application bundles, control the instance, query statuses, etc. See the Streaming Analytics REST API documentation for more information about the REST API.
Bluemix starter applications have been provided as working examples of how to use the Streaming Analytics REST API. The starter applications listed below are examples of Bluemix applications that use the REST API to interact with a Streams instance hosted in Bluemix:
- The EventDetection Starter Application is a Bluemix web application written in Node.js
- The NYCTraffic Starter Application is a Bluemix web application written in Java