Event Stream Programming Unplugged —Part 1

Welcome to event streaming unplugged; this is the first in a series of articles covering the topic of real-time event stream processing. This is a practical programming series with resources at unplugged part 1What you will learn in these articles:

  • The basics of unbounded event processing.
  • Functional reactive programming introducing concepts like map, filtering, groupBy, and flatMap.
  • Constructing directd acyclic execution graphs.
  • Managing event streams of heterogeneous types.
  • Imperative event programming, integrating application code.
  • Input and output.
  • Building, testing, and deploying.
  • Auditing, logging, and debugging event execution flow.
This article starts with a simple hello world and then moves on to a more complex example. The second example calculates the mark-to-market value for a set of traded currency pairs. Two independent event streams, instrument market price and execute trades, are processed. Batches of trades and reset signals are also supported. A more complex example serves as a meaningful comparison to an imperative solution.
The open-source event stream processing library Fluxtion is used to implement the examples. I hope to receive feedback on the library and make improvements.

Unplugged From What?

There are many great products and projects available that offer real-time stream processing capabilities, but in general, they come connected to an infrastructure service or some other unrelated concerns. This series is focused on processing logic, so we are unplugged from:

ServiceStarter Tutorial: Controlling Services

This article is a tutorial for a new utility ServiceStarter. The purpose of ServiceStarter is to control the lifecycle of independent services, ensuring that services start and stop in the correct order and predictably degrade if a required service fails at runtime. This tutorial is based upon a notional order processing system connected to an exchange.

As background, this is my Christmas project. Due to a COVID-cancelled skiing holiday, I was left with time on my hands. A friend, who is building an event-driven HFT trading system, asked me to help solve the problem of starting and stopping trading services in a predictable order.  The solution morphed into the ServiceStarter project.