Local Model

The NPS system controls the complete life cycle of a local AE. At query time, the NPS system automatically launches the local AE in a new process. In a successful run, the AE processes input, produces output, and terminates normally. For unsuccessful runs, the NPS system terminates the AE if the query is complete, or has been terminated, and the AE has not shut down. In this model, the NPS system ensures that for each function call there is one running AE process per dataslice. The NPS system does not allow an orphan AE, that is, an AE in which the query has ended, to keep running. If the Linux command ps -H -e is executed while an AE is running, the AE is shown as a child process of the NPS system process. Local AEs have a lifespan that is less than a query and technically less than a subset of a query. This life cycle model is similar to that of UDXs. A local AE always processes the input from exactly one SQL function call.

Connecting to a Local AE

The NPS system automatically connects the SQL function to exactly one AE per dataslice. Because the NPS system starts the AE processes a priori for the SQL function, it already has the information on which AE process to use for a given dataslice.