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 icon 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 arrow 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 another Streams environment, outside of Bluemix.¬† If you don’t already have a Streams environment where you can develop and test applications, the Quick Start Edition provides a full Streams environment, free-of-charge.)
After identifying the Streams Application Bundle, click Next.
On¬†the next page, specify any submission time parameters or other information as required by your application. Click Submit to deploy the application to the 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.
Programmatic Approach – Using the Streaming Analytics REST API
The Streaming Analytics service provides a REST API to allow Bluemix applications to interact with the Streams instance programmatically.¬† The API provides several operations allowing an application to submit Streams application bundles, control the instance, query statuses, etc.
The NYCTraffic starter application is a Bluemix application written using the Liberty for Java Bluemix runtime that provides an example of how to use the Streaming Analytics service programmatically.¬† Please reference the¬†Bluemix Streaming Analytics Starter Application guide¬†for an example of a Bluemix application using the REST API to interact with the Streams instance, and the¬†REST API documentation¬†for more information about the REST API.¬† (For a starter application that uses the SDK for Node.js Bluemix runtime, see the¬†EventDetection starter application.)