Overview of Running Fragments

This topic describes what it means to run an EventFlow fragment or LiveView project in StreamBase Studio.

What Running a Fragment Means

To run an EventFlow fragment in Studio means to install a StreamBase Runtime node, start the node, and deploy the fragment to that node.

To stop a fragment in Studio means to halt that fragment's deployment, but to keep its enclosing node installed and started. This provides for faster deployment of the same fragment to that node in subsequent runs for faster development turnaround. In Studio, node management is automatic; on exit, Studio stops and removes all nodes it started.

On the command line, the epadmin command supports a simpler four-stage node lifecycle of installing and starting a fragment to run it, then stopping and removing the containing node.

An EventFlow fragment consists of one or more EventFlow module files with .sbapp extension. A complex EventFlow design can consist of dozens of submodules referenced by a top-level, primary module. For compatibility with previous releases, StreamBase also supports running StreamSQL submodules with .ssql extension.

Modules in EventFlow (or StreamSQL) format are specifications in source code form. When you run a fragment, an embedded server in the StreamBase Runtime accepts and validates the EventFlow code, compiles it into Java bytecode, and then passes the compiled module to a JVM engine to run.

Run History

StreamBase Studio keeps a history of each application run or debugged. When you run or debug a fragment using a Run Configuration, an entry for that configuration is placed at the top of the history list. You can quickly re-run a fragment by invoking its Rim Configuration in the Run History list.

Studio shows separate Run History and Debug History entries in the Run menu, but Studio only preserves one history list. The same Run Configuration name is placed at the top of both history lists.

Running Compared to Debugging

There are similarities and differences between running EventFlow fragments normally 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 generates a default Run Configuration that is automatically used the first time your run or debug a fragment (if you do not specify your own configuration for the first run).

  • You can enqueue test data or live data in the same ways to a running fragment and to one being debugged.

Running and debugging have the following differences:

  • A running application stays running until you stop it, whether or not it is receiving input data. If the flow of enqueued data stops, the application continues running.

  • An application run in debug mode honors breakpoints set in your fragment, and runs until it reaches the first breakpoint. Thereafter, you can step through the application one instruction at a time with the EventFlow Debugger.

Starting and Stopping Applications

The following topics provide the details of running, using, and stopping EventFlow fragments.

Back to top ^