Fragments cannot actually run in the form of a fragment outside of StreamBase Studio. So far in this guide, we have let StreamBase Studio do the work of packaging an EventFlow fragment into a node and letting the fragment run by itself—but this only works in Studio. This feature allows you to develop, test, and debug fragments independent of other components.
For real-world deployment, StreamBase and LiveView fragments but must be packaged as part of a StreamBase Application. As with fragments in Studio, StreamBase Applications must be installed into a StreamBase Runtime node. You then start the node to run the fragments contained in the node.
The next several pages go through the steps to create and run a StreamBase Application that contains a single EventFlow fragment dependency.
The primary method of deploying and running a StreamBase Application is to generate the application in Studio, then run the application on the command line.
Starting with StreamBase 10.3.0, you can also run StreamBase Applications in Studio.
Note
For QA and production deployment, deploy from the command line with the epadmin tool, as described in the Concepts Overview.
To deploy a StreamBase Application on the command line, you build an application archive file in Studio that contains the application ready to run, then use the epadmin command to install this archive into a node. The overall steps are:
- In StreamBase Studio:
-
-
Create a new, separate project in StreamBase Studio of type StreamBase Application.
-
Add a Maven dependency on the fragments you want to include in this StreamBase Application project.
-
Create an application archive file for the StreamBase Application project.
-
- At the command prompt:
-
-
Install a node containing the application archive file, using
epadmin install node
. -
Start the node, thereby starting the fragment running, using
epadmin start node
.
-
These steps are covered in more detail in the next few pages.
Running Applications in Studio provides a simple visual interface to run and debug your application, including multiple fragment applications, during development. For advanced cases, you can run two or more instances of the same StreamBase Application in Studio to verify and debug HA and partitioning configurations.
The overall steps have the same beginning: generate a StreamBase Application archive in Studio:
- In StreamBase Studio:
-
-
Create a new, separate project in StreamBase Studio of type StreamBase Application.
-
Add a Maven dependency on the fragments you want to include in this StreamBase Application project.
-
Create an application archive file for the StreamBase Application project.
-
Then still in StreamBase Studio, run the archive as follows:
-
Right-click the generated application archive file to open the Run Configuration dialog.
-
Create a Run Configuration of type StreamBase Application.
-
Specify the path to the application archive generated earlier.
-
Click
Further details can be found in Run StreamBase Application in Studio.