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.

Modules in EventFlow 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 fragment launched. When you launch 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 Run Configuration in the Run History list.

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

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 you 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 fragment stays running until you stop it, whether or not it is receiving input data. If the flow of enqueued data stops, the fragment continues running.

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

Starting and Stopping Fragments

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

Back to top ^