Whylogs can be seamlessly integrated into your event-driven Kafka architecture. Shown below is the heart of a simple shim layer written in Kotlin that consumes events from a Kafka topic and processes them through whylogs. Each Kafka event represents a row of named features in an endless stream of training data.
There are many ways to structure such an integration with Kafka. This example assumes that events are encoded with Avro, and a single Kafka topic corresponds to a single whylogs model. It is easy to modify this example to consume multiple Kafka topics and process them into separate whylogs models.
Whylogs will automatically produce a statistical profile of batches of events, and the batches maybe configured to span a minute, an hour, or an entire day. Profiles are mergeable, so it is easy to horizontally scale your event processing across multiple Kafka partitions. Just fire up more consumers to produce multiple profiles and they can be merged to form a statistical picture of your entire event stream.