Table of contents

Streams Quick Start Edition VM Guide

Getting Streams Quick Start Edition VM:

  1. Download the Streams Quick Start Edition VM image here: IBM InfoSphere Streams 4.0 Java API Beta QuickStart VM Image
  2. Extract and use a VM player of your choice to play the VM image

The VM image has the com.ibm.streamsx.topology toolkit installed. The toolkit is located at: /home/streamsadmin/streamx.topology/streamsx.topology

This directory contains two sub-directories:

Running the sample applications

To try out the samples, follow these steps:

  1. Double click on the InfoSphere Streams Studio (Eclipse) icon on the desktop to start Streams Studio.
  2. When prompted for a workspace, specify this as the workspace to open: /home/streamsadmin/Workspaces/topology/

You should see the JavaFunctionalAPISamples project in the Project Explorer tab on the left. In its src directory, you should see several packages - parallel, simple, topic, twitter, and Vwap. Brief explanations for each may be found in the sample's Javadoc.

To start, let's run the "Hello World" sample application. In the Project Explorer tab, right click on src->simple->HelloWorld, and select Run As -> Run Configurations. In the Run Configurations 'Main' tab, make sure that the Main class field is set to simple.HelloWorld. In the arguments tab, set the Program arguments field to EMBEDDED.

The EMBEDDED argument causes the HelloWorld application to create an EMBEDDED context, which contains information as to how the application is submitted. In this case, an EMBEDDED context runs the application in a single JVM, and does not use the IBM Stream's C++ runtime. This has the benefit of being faster to deploy, and allows a developer to develop, run, and test entirely within Eclipse. While this is great for prototyping and debugging, it should be noted that EMBEDDED applications are limited to a single process, and can't use the full functionality of the IBM Streams runtime. For a full list of contexts and their functionality, view the Streams context Javadoc hosted on Github.

After you have set the required arguments, run the application. You should see the following output:

    Hello
    world!
	      
Feel free to try the other sample applications. Be sure to read the comments for how they should be run!