Running Your First StreamBase Application

Purpose

In this topic we will run the application that we created earlier.

To Run Your Application

  1. In the Package Explorer, select the MyFirstApp application that you developed earlier in the tutorial: either the EventFlow or the StreamSQL version.

  2. Click the Run button. StreamBase Studio switches to the SB Test/Debug perspective.

    A Performance Information dialog may be displayed, informing you that running applications in StreamBase Studio do not support high data rates. After all, StreamBase Studio is an authoring and testing tool that imposes a certain amount of overhead. The highest data rates are normally seen in deployed applications, run by StreamBase Server without StreamBase Studio.

    Click OK to dismiss this dialog.

You may notice the following additional changes:

  • Your application either runs directly in StreamBase Studio on your system. If you are running remotely, the connection waits for your remote StreamBase Server to start.

  • When the application starts, a message appears at the bottom left of the Studio window, confirming that the application is running.

  • The Console displays a message (in red text) that the sbd server is listening. This means that it is waiting for input from the application. The message also shows the URI and port used for the server connection, and its process ID. For example:

    [notice] sbd at mycompany.com:10000; pid=10401; version=5.2.0; Listening
    

    The Console continues to all output from the running sbd server, such as status and any errors.

Note

You can also run your application with sbd from a terminal window while working in StreamBase Studio. However, that method is beyond the scope of this tutorial. That topic and many others are covered in the other sections of StreamBase Help.

Discussion

Before we go on, let's examine some of the SB Test/Debug perspective features that we will use in the rest of the tutorial.

  • At the top of the Studio window, notice that the toolbar has changed, as you should expect when you change perspectives: some buttons that were present in the SB Authoring perspective are now gone or disabled, leaving buttons that are most useful in Test/Debug mode, such as the Stop, Debug, and Run buttons.

  • Your application remains open in the EventFlow or StreamSQL Editor (assuming that you opened it in the SB Authoring perspective). It displays a text message that the application is running and also gives the port number used for the StreamBase server connection.

  • On the left (by default), three views should be open:

    • The Manual Input view enables you to send any data you want to the any application input stream, one tuple at time. Next to the Manual Input view's tab is a tab labeled Feed Simulations. By using a feed simulation, you can send canned data to the application instead of entering it manually. In general, the manual input method is useful for tracing the processing of individual tuples through the application; feed simulations are useful for seeing the results of quickly sending large amounts of data through the application. A third tab, Recordings, enables you to record the input and output of your testing, and later play them back at the original speed or accelerated speeds.

    • The Application Input view will show the data going into the application, listing each tuple enqueued on the input streams. You can sort the list by the order received, by input stream, or by field name.

    • The Application Output view will list tuples as they are emitted on the application's output streams.

Tip

Don't forget, if a view is not open for some reason, you can open it by clicking WindowShow View and navigating the submenus to choose the view you want.

Summary and Next Steps

In this topic you have learned how to start an application in StreamBase Studio. In the next topic you will create a feed simulation that you can use to feed test data through your application.

Click Next to go to the next topic.

Back to Top ^