Skip to main content

Overview

Unified User Actions (UUA) is a centralized, real-time stream of user actions on Twitter, consumed by various product, ML, and marketing teams. UUA reads client-side and server-side event streams that contain the user’s actions and generates a unified real-time user actions Kafka stream.
The Kafka stream is replicated to multiple storage systems including HDFS, GCP Pubsub, GCP GCS, and GCP BigQuery for downstream consumption.

Action Types

UUA captures both public and implicit user actions:

Public Actions

  • Favorites: User likes on tweets
  • Retweets: Sharing tweets to followers
  • Replies: Direct responses to tweets

Implicit Actions

  • Bookmarks: Saved tweets for later
  • Impressions: Tweet views in timeline
  • Video Views: Video playback events

Architecture Components

The UUA system is organized into four main components:

Adapter

Transforms raw input events to UUA Thrift output format

Client

Kafka client utilities for stream consumption

Kafka

Specialized Kafka utilities including custom serialization/deserialization

Service

Deployment modules and service configuration

Data Flow

Integration Points

UUA serves as the foundational data layer for:
ML models consume UUA events as training labels and real-time features for candidate retrieval and ranking.
Product teams track user engagement metrics and behavioral patterns.
Marketing teams leverage action data for campaign optimization and user segmentation.

Real-Time Processing

UUA is designed for real-time streaming with low latency requirements:
  • Events are processed as they occur
  • Multiple downstream consumers can read from the same stream
  • Replication ensures data availability across different platforms
  • Unified schema provides consistency across all action types
All user actions are processed in real-time, so downstream systems must be designed to handle high-throughput streaming data.

User Signal Service

Processes UUA data into standardized signals

Retrieval Signals

Uses UUA for candidate sourcing

Build docs developers (and LLMs) love