Running Your Module

To Run Your Module

  1. In the Project Explorer, select the firstapp project folder.

  2. Navigate into src/main/eventflow/packagenameand double-click to open firstapp.sbapp.

  3. Click the Run button in Studio's main toolbar, or right-click any blank space on the canvas and select Run AsEventFlow Fragment.

    Studio prompts for permission to switch from the Authoring perspective to the SB Test/Debug perspective.

  4. Click Yes.

  5. A Performance Information dialog may be displayed, informing you that running modules in StreamBase Studio does not support high data rates. If so, click OK.

  6. Studio now installs and starts a node of the StreamBase Deployment Runtime and loads the firstapp fragment into that node.

In the SB Test/Debug perspective, notice:

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

  • A message displays on the canvas that reports information about the running module. This includes the StreamBase URI, including the StreamBase listening port if not the default port, 10000. You must use the URI and port number when communicating with your running module from outside of Studio.

  • The Console view also show listening port used for the Runtime connection, and its process ID, and the version of the running StreamBase Runtime process.

    During execution, the Console continues to display status messages and any error messages from the StreamBase Deployment Runtime.

Using the Manual Input View

There are several ways to run test data through your module, including simulations that can feed large amounts of data at high rates. The Manual Input view offers the simplest way. You send tuples to an input stream one at a time, and observe the module output.

  1. Notice that the Field Values area is preloaded with the symbol and quantity fields from your schema, waiting for you to enter values. By default, they contain the null value.

  2. Replace null with IBM in the symbol field, and with 10000 in the quantity field. Click Send Data to send a new tuple to the module. Watch for output in the Application Output view.

  3. Because the quantity 10000 satisfies the Filter predicate, your tuple is passed through on the BigTrades stream.

  4. Now change the quantity to 100 and click Send Data again.

    This time, your output appears in the AllTheRest output stream, because the quantity is below the predicate's threshold of 10000.

  5. Continue to enter different values and notice how your module responds. For example, try entering invalid data for quantity, such as alpha.

Clusters View

By default, the Clusters view shows the currently installed nodes in the cluster defined by your user name. You can change this cluster name in Studio Preferences: in WindowPreferences (Windows) or StreamBase Studio n.mPreferences (macOS), open StreamBase StudioCluster and edit the Cluster name field.

Click the Show Clusters button () to view other clusters and nodes running in the same local subnet, if any.

The currently selected node, usually designated with a single uppercase letter, shows (started) or (stopped) to indicate whether than node contains a running fragment.

Select Engine to see details about the currently running fragment.

Stop the Module in Studio

To stop the EventFlow fragment currently running in the installed node, click the Stop button in Studio's main toolbar, choose RunStop StreamBase Module, or press the F9 function key. By default, this restores the SB-Authoring perspective.

Studio leaves the currently node started, but in (stopped) state, so that it can reuse the same node for the next launch of the same or another fragment.