Developer workflow

Description of developer use of Fluxtion in day to day development

Introduction

Creating a Static Event processor involves three distinct phases for a developer:

  1. Definition - User supplied configuration to Fluxtion.

  2. Generation - Fluxtion processes the configuration and applies processing inference to generate a static event processor (SEP).

  3. Integration – Integrate the generated SEP into a user application or library.

  An example of the steps covered is in the [quick start](../untitled.md) example.

Maven integration

Fluxtion integrates with the standard maven workflow, we offer two maven integration methods:

  • Fluxtion maven plugin

  • Programmatic generation

Fluxtion maven plugin

The steps a developer should follow to execute the Fluxtion event stream compiler via a maven plugin as part of the standard workflow are:

setup

definition

generation

integration

Programmatic generation

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.

Maven classpath

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.

Developer process

The developer process is the same as that set out previously, except for a few small changes.

setup

definition

generation

  • Write programmtic definition in a test, specifying the output directories.

  • Run a mvn build.

integration

Last updated

Was this helpful?