Samples Guide

The StreamBase kit provides sample EventFlow applications to demonstrate key product features and to help you learn how to use them. Each sample has its own emphasis; for example, a sample may highlight a particular type of data processing operator, while another may describe the configuration details for a distributed environment. This topic describes the StreamBase samples, including their location and purpose, how we built them, and how to run them.

The StreamBase kit provides several types of samples to demonstrate the key product features. Each sample has its own emphasis; for example, a sample may highlight a particular type of data processing operator, while another may describe the configuration details for a distributed environment.

Contents

Installed Sample File Locations

By default, the StreamBase sample files are installed in:

  • On Windows: C:\Program Files\StreamBase Systems\StreamBase.n.m\sample\...

  • On UNIX: /opt/streambase/sample/...

Loading Samples into StreamBase Projects

To load a sample into StreamBase Studio:

  • From the top menu, click FileLoad StreamBase Sample

  • Select one or more samples from the Load Sample Projects dialog.

For example:

StreamBase Studio Load Sample Projects dialog

StreamBase Studio creates a separate project for each sample. In the case of the operator samples, one project is created and all the individual operator's *.sbapp sample applications are imported into the same project folder.

Notes

When you load a sample that contains a custom function or client into StreamBase Studio, Studio automatically sends any executable file and its configuration settings to StreamBase Server.

When you load a sample that contains JAR files, the JAR files are used when you run the sample; the Java source files are included only so that you can see the code. If you want to work on the Java source files and have StreamBase automatically build them as you work, you must add the StreamBase Client API to the project's Java build path. See StreamBase Project Properties for details.

Rebuilding Samples on Windows

A number of StreamBase samples, such as compliance and buffering, have C++ and Java code that can be modified and rebuilt. In order to rebuild the C++ executables and Java JAR files on Windows, configure Microsoft Visual Studio as follows:

  1. Add the following StreamBase include directories to the list of Include files in ToolsOptionsProjectsVC++ Directories:

    streambase-install-dir\include

    The default location of streambase-install-dir on Windows is:

    C:\Program Files\StreamBase Systems\StreamBase.n.m
    
  2. Add the Sun JDK's bin directory to the list of executable files.

    For example, add the following folder to the list:

    C:\Program Files\Java\jdk1.5.0_14\bin