IBM Streams 4.2

Running applications in distributed execution environments

You run an application in a distributed execution environment by submitting an application bundle file to an IBM® Streams instance.

When an application is compiled, an application bundle file is created. Except for system libraries, the application bundle file includes all toolkit artifacts and libraries that are needed to run the application.

When you submit an application bundle file, the IBM Streams instance automatically transfers the file to the hosts where the job runs. Because your application bundle file contains all of the necessary toolkit artifacts, it can run on a file system different from where it was compiled. Thus, you can place the application bundle file on any IBM Streams instance. IBM Streams defines how your application is fused into processing elements (PEs) at submission time. This is based on the information provided at compile time and the runtime resources available.

Tip: For some application workflows, setting the domain.preloadApplicationBundles domain property or the instance.preloadApplicationBundles instance property to deploy an application bundle file on every application host within the instance can improve performance. The amount of improvement depends on how often the PE placements on the hosts get adjusted. Consider, however, that use of the preload feature might incur an additional storage requirement for the hosts, because the application bundle will be deployed on every host in the instance, whether the application is currently running on that host or not.

The following directories can be defined in the environment where the application runs.

Data directory
If your application reads or writes data from files, you need to define the data directory. It is a path to an existing directory, which is specified at compile or submission time, that operators can use to write files into or read files from. Your application can create or read a file relative to the data directory path. There is no default data directory. Before you run an application that requires a data directory, that data directory needs to be created and, if necessary, populated with the data files that the application processes. In a non-shared file system, the PEs containing operators that access the data directory need to be placed on resources that contain the data directory.
Application directory
When you run your application, the application directory points to a directory hierarchy that is determined by the domain where your application runs. This directory forms the root of the directory hierarchy to reference toolkit artifacts in the application bundle file. The domain.applicationBundlesPath domain property determines the location of the application directory. At compile time, the application directory refers to the directory within which the sc command is run, and where the compile artifacts are produced. At run time, the application directory refers to the location in the file system where the executable artifacts are placed and from which the application is run.
Working directory
When your application is run, the current directory is set to a working directory. The root location of a working directory is determined for each instance of your application with the domain.applicationCurrentWorkingPath domain property.