Back to glossary

Event Sourcing

An architectural pattern that stores the full history of state changes as an immutable sequence of events rather than only the current state. The current state is derived by replaying events, providing a complete audit trail and enabling temporal queries.

In event sourcing, every change to application state is captured as an event object and appended to an immutable event log. The current state of any entity can be reconstructed by replaying its events from the beginning. This approach provides a complete audit trail, enables point-in-time state reconstruction, and naturally supports event-driven architectures where downstream systems react to state changes.

For AI product teams, event sourcing is valuable because it preserves the complete behavioral history that models need for training and evaluation. Instead of only knowing a user's current preferences, the system retains every preference change, enabling models to learn from temporal patterns. Growth teams benefit because event sourcing makes it possible to retroactively analyze user journeys in ways that were not anticipated when the data was collected. If a new hypothesis emerges about which early behaviors predict long-term retention, the event history supports that analysis without needing new instrumentation. The trade-off is increased storage requirements and the complexity of maintaining event schemas as the system evolves.

Related Terms

Content Delivery Network

A geographically distributed network of proxy servers that caches and delivers content from locations closest to end users. CDNs reduce latency, improve load times, and absorb traffic spikes by serving content from edge nodes rather than a single origin server.

Edge Computing

A distributed computing paradigm that processes data closer to the source of generation rather than in a centralized data center. Edge computing reduces latency, conserves bandwidth, and enables real-time processing for latency-sensitive applications.

Serverless Computing

A cloud execution model where the provider dynamically manages server allocation and scaling. Developers deploy functions or containers without provisioning infrastructure, paying only for actual compute time consumed rather than reserved capacity.

Function as a Service

A serverless computing category where developers deploy individual functions that execute in response to events. FaaS platforms like AWS Lambda, Google Cloud Functions, and Azure Functions handle all infrastructure management, scaling each function independently.

Platform as a Service

A cloud computing model that provides a complete development and deployment environment without managing underlying infrastructure. PaaS offerings like Heroku, Vercel, and Google App Engine handle servers, storage, networking, and runtime configuration.

Infrastructure as a Service

A cloud computing model that provides virtualized computing resources over the internet. IaaS offerings like AWS EC2, Google Compute Engine, and Azure Virtual Machines give teams full control over servers, storage, and networking without owning physical hardware.