Jump to content

Event*

From Wikitech

EventBlabla what?! So Many Event* services. This page disambiguates, and links to their more extensive documentation.

In all of the following, an 'event' is defined as a structured and schema-ed data object. The data object is usually serialized as JSON with the schema specified in and validated with JSONSchema.

The Modern Event Platform Program is about unifying the our analytics and production event systems into a generic event stream intake, validation, processing and consuming system.

Metrics Platform is a suite of services, standard libraries, and APIs for producing and consuming instrumentation data of all kinds from Wikimedia Foundation products. It mainly consists of standard product metrics schemas and client library implementations. It is built on top of Event Platform components.

Like EventLogging, 'EventBus' refers to a few different pieces of infrastructure. More detail can be found on the EventBus documentation page.

This is the Mediawiki extension responsible for sending events from WMF Mediawiki installations to backend event intake service (EventGate).

Event Schema Repositories and HTTP Service

Our event schemas are available via an HTTP API at https://schema.wikimedia.org/. This site simply hosts up to date schemas stored in git repositories.

WMF has 2 event schema git repositories. schemas/event/primary is for production/tier 1 events. Schemas here are more tightly controlled (and bikeshed). schemas/event/secondary is for non critical and analytics focused events.

You can learn more about WMF's Event Schemas at Event_Platform/Schemas.

EventGate is an HTTP event intake service. eventgate-wikimedia handles event validation and producing events to Kafka. It is the reference Event Platform producer implementation.

While planning the Modern Event Platform program, product managers and engineers expressed a desire to be able to configure the behavior of clients producing (and potentially consuming) event streams. EventGate also needs some configuration in order to enforce that specific event streams only include events of the same JSONSchema lineage. The EventBus extension (as well as other event producing clients) need a way to configure the destination event service (EventGate) instance where they should produce an event.

The EventStreamConfig MediaWiki extension was built to support these use cases. It uses MediaWiki's configuration to centralize the event stream configuration for all of these clients. It exposes both a PHP MediaWiki interface as well as a HTTP API to look up configs for event streams by name. The EventLogging extension uses the PHP API to load stream configuration to browser clients via ResourceLoader.

EventStreams (repository)

EventStreams is a public facing service. It exposes streams of events via HTTP SSE/EventSource. This service replaced the MediaWiki RecentChange specific service RCStream, and perhaps eventually will also deprecate irc.wikimedia.org.

EventLogging is the original event framework used by WMF. It consists of 3 main parts.

EventLogging Extension

The EventLogging Mediawiki extension is used by MediaWiki to send analytics data from web clients to EventGate.

EventLogging Service

The EventLogging python codebase consists of various services that can be mixed and matched to consume, validate, transform, and produce streams of JSON events between different endpoints. EventLogging was originally created for Mediawiki analytics purposes, but was also used to support production streams of events via an HTTP eventlogging-service used for the EventBus service.

This service is being deprecated in favor of EventGate.

EventLogging Schemas

For the original analytics EventLogging use case, all schemas are maintained and stored on meta wiki. The default EventLogging service validation logic looks for matching schemas in this online http/wiki repository.