Developer workflow
Description of developer use of Fluxtion in day to day development
Last updated
Description of developer use of Fluxtion in day to day development
Last updated
Creating a Static Event processor involves three distinct phases for a developer:
Definition - User supplied configuration to Fluxtion.
Generation - Fluxtion processes the configuration and applies processing inference to generate a static event processor (SEP).
Integration – Integrate the generated SEP into a user application or library.
Fluxtion integrates with the standard maven workflow, we offer two maven integration methods:
Fluxtion maven plugin
Programmatic generation
The steps a developer should follow to execute the Fluxtion event stream compiler via a maven plugin as part of the standard workflow are:
Create a maven project declaring Fluxtion libraries as dependencies.
Add the fluxtion maven plugin to the build plugins, setting configuration.
Write application classes representing nodes and events to fulfill event processing requirement.
Create meta-data describing the construction of the execution graph.
Run a mvn build.
Integrate the generated SEP into the application.
EXPERIMENTAL FEATURE, multiple classloaders are used by Fluxtion, testing is required
Building a SEP using the tools provided (mvn plugin or cli) maybe inconvenient as this requires more upfront development effort. Fluxtion provides a library for building a SEP programmatically in the current process. The library generates the same code and classes as the out of process solutions. The SEP artifacts generated in process are transient and will not persist between startups, unless the generated sources are copied into the source base and compiled.
A BOM is provided that simplifies selecting compatible versions of Fluxtion libraries. The Fluxtion BOM sets the scope of libraries as follows:
library | maven scope |
api | compile |
builder | provided |
generator | provided |
Simple appraoch, use a maven test to generate programmaically. Enable test when new generation is required.
Provided dependencies are not included as transitive maven dependencies, they can be accessed during compilation. To use in process building all libraries must be on the class path, we can achieve this in two ways leveraging maven functionality:
Generate in test scope - test classes have access to provided artifacts, allowing programmatic generation.
Override maven scope - set all Fluxtion dependencies as compile scope. Generate as part of the execution of the application.
The developer process is the same as that set out previously, except for a few small changes.
Create a maven project declaring Fluxtion libraries as dependencies.
Write application classes representing nodes and events to fulfill event processing requirement.
Create meta-data describing the construction of the execution graph.
Write programmtic definition in a test, specifying the output directories.
Run a mvn build.
Integrate the generated SEP into the application.