Attaching to a Running Application

StreamBase Studio supports attaching to a running remote or local StreamBase Server instance to analyze applications on that server.

Once connected, you can use most features of the SB Test/Debug perspective on the running application, including:

  • Manual Input view

  • Feed Simulations view

  • Input Streams view

  • Output Streams view

  • Profiler view

This feature is implemented as a launch configuration type, Attach to EventFlow Fragment. You must create and configure a launch configuration of this type to attach to a running server. Follow these steps:

  1. Invoke Run>Run Configurations to open the Run Configurations dialog.

  2. In the left pane, select Attach to EventFlow Fragment and click the New button.

    This creates a new, empty launch configuration of the selected type.

  3. In the Main tab:

    1. In the Name field, replace New_configuration with a name that reflects the hostname to which you will attach.

    2. In the Target StreamBase Server URI field, enter a URI in the format described in the sburi(5) reference page.

      The URI must be a valid StreamBase URI for a host with a running application. You can use the sbc -u sburi list command at the command prompt to test connectivity in advance.

      You can specify a StreamBase Server running on a Windows or UNIX machine. The remote or local host does not need to be configured with SSH access control (as is required when Studio launches an application on a remote server). Attaching to a running application requires only client access to the StreamBase URI.

      The URI does not need to be on a remote host: you can specify a StreamBase Server instance running on the same machine, perhaps at an alternate port, using a URI such as sb://localhost:9999

    3. In the Main EventFlow module (.sbapp) field, specify or browse for a local copy of the application running on the remote server. This does not need to be an exact match; for example, your local copy might be an earlier or newer version of the same application.

  4. Click Apply to save the configuration.

  5. Click Run to run the configuration and attach to the specified application.

    Studio connects to the remote application and announces success in the information bar in the EventFlow Editor canvas:

    You can confirm connection to the remote server by hovering the mouse over the StreamBase status icon in the lower left corner of the Studio window:

  6. To disconnect, right-click the remote application and click the Disconnect option. The option is hidden by default, but can be enabled by right-clicking and selecting the Show Debug Toolbar option.

If the attached remote application is connected to a live data input stream or is running a feed simulation, the Output Streams view shows the emitted tuples as soon as you make the connection.

Once connected, you can:

  • Send individual tuples to one or more streams in the Manual Input view, even if the input streams are already accepting input on the remote host.

  • Send tuples with a feed simulation.

  • Profile the running application's operator and queues in the Profiler view.

  • In general, use the facilities of the SB Test/Debug perspective to examine the running application.

To re-run the remote connection, select the name of the configuration in the Run or Run History lists of recently run configurations.