First Application Sample

The StreamBase documentation includes a step-by-step tutorial, Creating Your First StreamBase Application, in the Getting Started Guide. We included this copy of the firstapp.sbapp application with the installed kit so that other documentation topics can refer to it, in the event you did not go through the tutorial. However, you will find it instructive to follow the tutorial to create the application in StreamBase Studio from scratch.

The firstapp.sbapp sample itself is modest in functionality, but you a chance to become familiar with a few features in the product, including:

  • The general process of defining input streams, schemas, operators, and output streams.

  • The technique of using StreamBase Studio to connect these entities on a graphical canvas.

  • The notion of typechecking the operators to ensure that streaming data can flow through the application without errors.

  • Using additional features in the Authoring and Test/Debug perspectives of StreamBase Studio.

  • Starting the StreamBase Server (locally or remote) from StreamBase Studio and sending test data to the running application.

This firstapp sample extends the Getting Started tutorial by including three types of feed simulations, each one demonstrating a different set of options:

  • firstapp-enum.sbfs, which contains elements to enumerate values for the ITEM_NAME field in each tuple.

  • firstapp-trace1.sbfs, which specifies that the firstapp-trace1.csv (comma-separated value data file) will be used by the feed simulation.

  • firstapp-trace2.sbfs, which uses a different trace file (firstapp-trace2.csv) that adds relative timestamps in a third column.

This topic describes how to run firstapp.sbapp. For detailed information about this and other samples, please see the Samples Guide in the StreamBase Studio Help.

By default, the sample files are installed in:

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

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

In StreamBase Studio, import this sample with the following steps:

  • From the top menu, click FileLoad StreamBase Sample.

  • Select this application from the Tutorials list.

  • Click OK.

StreamBase Studio creates a project for this sample.