Running StreamBase Applications

This page introduces the Running Applications section of the Test/Debug Guide. Use the links in the Contents section to see the other topics in this section.

Overview

The topics in this section describe the ways to run and stop a StreamBase EventFlow or StreamSQL application, both within and outside of StreamBase Studio.

What Running an Application Means

To run a StreamBase application means to send an application to an instance of StreamBase Server, which executes the application code you send, and opens any input and output ports specified in the application's design. You can start StreamBase Server from within StreamBase Studio, or you can run it from the command line with the sbd command.

StreamBase Server accepts applications in one of four forms, shown in the following table:

StreamBase Application Format Format type File extension Can be run from
An EventFlow application EventFlow source code .sbapp Studio or sbd
A StreamSQL application StreamSQL source code .ssql Studio or sbd
A precompiled application archive file Archive file containing precompiled, runnable binary code .sbar sbd or in Studio automatically (not on demand)
An application bundle Archive file containing all source files, resource files, and configuration files necessary to run an application on any StreamBase Server host. .sbbundle sbd only

Applications in EventFlow or StreamSQL format are applications in source code form. In these cases, the server accepts the application code, compiles it into runtime format, then runs the compiled application.

Precompiled application archive files are discussed in Precompiled Application Archives.

Application bundle files and the bundling process are discussed in Application Bundling.

Local and Remote StreamBase Servers

From the point of view of StreamBase Studio, an instance of StreamBase Server is local or remote:

  • A local StreamBase Server runs on the same machine currently hosting StreamBase Studio.

  • A remote StreamBase Server runs on a supported UNIX machine independent of the machine running StreamBase Studio.

StreamBase Studio can launch both local and remote instances of StreamBase Server.

When Studio starts Server locally, it runs %STREAMBASE_HOME%\bin\sbd.exe (or $STREAMBASE_HOME/bin/sbd on UNIX), passing it the name of the top-level application file to run. If a server configuration file is present in the Studio project folder, Studio parses it and generates a one-time, temporary configuration file and passes the temporary file to sbd. Studio looks for jar and dir elements in the project's configuration file and replaces them temporarily with the paths to the same JAR or class resources as determined by Studio's Java Build Path.

Before attempting to launch a Server instance remotely from Studio, set up and test SSH connectivity separately, outside of Studio. You can use the ssh utility on UNIX, or a public domain program such as PuTTY on Windows. SSH connections from Studio to a remote machine will work with both key-based and password-based authentication, but that authentication must be configured and tested before attempting to use it in Studio.

When Studio starts Server remotely, it attempts to make an SSH connection to the specified server, using a specified user name. You can specify the server and user name globally for all remote Studio launches in Studio Preferences (WindowPreferences, then StreamBase StudioLaunching). Or you can specify the server and user name separately for each project in a project-specific launch configuration, described in Editing Launch Configurations.

Once Studio successfully logs into the remote server over an SSH connection, it copies the specified EventFlow or StreamSQL application files and any required configuration file to the remote host, then attempts to run /usr/bin/sbd with the appropriate command line arguments.

Note

Because remote Studio launches require an SSH connection, StreamBase Studio does not support remotely launching StreamBase Server on Windows hosts. StreamBase Server does run on supported Windows platforms, when launched with sbd locally on the Windows host itself, or when launched locally from Studio running on that host. The only limitation is the inability to launch Server remotely on a Windows machine from Studio on a separate machine.

Running Compared to Debugging

There are similarities and differences between running StreamBase applications and running them in debug mode. Running and debugging have the following features in common:

  • In Studio, you can specify and save both run configurations and debug configurations. In both cases, a saved configuration lets you re-run or re-debug with the same runtime parameters.

  • Studio provides a default run configuration and a default debug configuration so that you can run or debug quickly with default parameters.

  • Studio provides the default run and debug configurations for both local and remote StreamBase Servers.

  • You can enqueue test or live data to send to a running application and to one being debugged.

Running and debugging have the following differences:

  • A running application stays running until you stop it, independent of received input data. If the flow of enqueued data stops, the application continues running.

  • An application run in debug mode can accept breakpoints, and will run until it reaches a breakpoint. You can step through the application one instruction at a time.

Starting and Stopping Applications

The following topics provide the details of running and stopping StreamBase applications.

See Also

See Debugging StreamBase Applications to learn about debugging instead of running your application.

Back to Top ^