Beyond the database: building a decoupled analytics layer for Drupal
Beyond the database: building a decoupled analytics layer for Drupal
Bram ten Hove
Event-driven architecture isn't just for big tech. We built it into Drupal and it changed how we think about integrations.
Prerequisite
Attendees will get the most value if they have experience building Drupal modules or custom Drupal code, and a basic familiarity with the concept of events or hooks in software architecture. No prior knowledge of Kafka, ClickHouse, or event-driven architecture is necessarily required.
Target Audience
Drupal developers and technical architects who are interested in analytics, integrations or event-driven patterns
Outline
Most Drupal analytics solutions query the application database directly. That can be slow, brittle, and tightly couple your reporting layer to your CMS. Or they use 3rd party tools like Simple Analytics or Google Analytics. In this session we share how we designed and built a fully decoupled, event-driven analytics pipeline for a large-scale Drupal-based community platform.
Instead of querying the database, we let Drupal emit structured activity events using the CloudEvents specification, which are transported asynchronously through Kafka. Performant, extensible, privacy-aware, and decoupled from Drupal's request cycle.
What makes this worth talking about is what such an architecture unlocks. The event model powers not just the reporting layer but also our webhooks system with no changes needed in Drupal. Build the event model right once, and multiple consumers follow naturally.
We'll also be honest about the choices we made along the way: why we chose custom event code over ECA, what surprised us in production, and what we'd do differently.
Learning Objectives
- Understand what event-driven architecture is and how it applies to a Drupal project
- Understand why an event-driven architecture can be a better fit than querying Drupal's database directly
- See how one well-designed event model can serve multiple consumers, from analytics to webhooks
- Learn how Kafka acts as the backbone of a decoupled, multi-consumer architecture in a real Drupal project
- Take away practical lessons from production: scaling, historical backfills, tenant isolation, and more
Experience level
Intermediate