Introduction 2
A description of Fluxtion's place in the stream processing environment
Last updated
A description of Fluxtion's place in the stream processing environment
Last updated
If you are interested in writing real-time or streaming applications we hope to persuade you to investigate Fluxtion further.
Fluxtion is a routing utility for use within a stream processing application, automatically connecting event streams to processing pipelines. The application is statically analysed by Fluxtion to create an embedded router. With this approach complex real-time applications can be built more quickly, with less bugs and the end result is optimized for performance to reduce running costs.
When building a stream processing application the developer has to answer three questions:
Question | Answer |
WHAT requires processing? | Event streams are the input source to the application |
HOW does the input need processing? | Custom written logic or library functions |
WHEN does the processing take place? | Bespoke dispatch logic that connects events to functions |
Fluxtion is the automatic generation of the WHEN logic in a streaming application. Looking at the example diagram below Fluxtion acts as the arrows connecting components:
When a specific event is received only connected components are executed and always in the correct predictable order. The generated dispatcher is a highly optimized graph processing engine for embedding in the host application.
Projects and components exist that help developers answer the what and the how questions in a streaming application. Kafka for example supplies a reliable event stream, this is what we process. Many utilities exist for re-use to meet application calculation requirements, this is how we process.
Fluxtion is the missing piece in the puzzle. As an application develops over time the way we connect components changes and evolves requiring constant re-working. Manually coded dispatch logic become more fragile and increasingly complex. This leads to many bugs and time consuming maintenance, Fluxtion static analysis algorithms remove these time and money drains from the development cycle. Dispatch logic or when to connect components is generated automatically.
Fluxtion is a java utility that generates complex dispatch logic. Conceptually Fluxtion operates like a hybrid of java streams, RX java and google guava event bus. Each incoming event requires a unique execution path, those paths may combine for different events and each path is reactive. The generated dispatcher is a bespoke graph processing engines specifically tailored for the application.
The example below monitors a stadium for TurnstyleIn and TurnstyleOut events, controlling the entrances and exits based on the number of people in the stadium.
The following logic is applied:
Estimate the number of fans in the stadium = count(in) - count(out)
Control the stadium with an instance of StadiumController
if fan count > 50 invoke StadiumController.slowEntry()
if fan count > 60 invoke StadiumController.closeAllEntrances()
if fan count > 70 invoke StadiumController.evacuate()
Only call the methods on a breach to prevent log spamming