Skip to content

paszed/event-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Event Platform

Shared infrastructure for event-driven communication, contracts, delivery, and integration.

Event Platform provides reusable primitives for systems to communicate through events without becoming tightly coupled to one another.

Rather than allowing every application and service to invent its own event formats, delivery conventions, and integration patterns, this repository establishes shared contracts and infrastructure behind provider-agnostic interfaces.

Its purpose is to make asynchronous communication a reliable platform capability.


Why

As systems become more modular, direct dependencies become increasingly expensive.

One system performs an action.

Another system needs to react.

Several other systems may need the same information.

Retries need to be handled.

Failures need to be observable.

Event schemas need to evolve without silently breaking consumers.

Without shared infrastructure, these concerns quickly become scattered across applications and services.

Event Platform exists to provide a consistent foundation for event-driven communication.


Scope

Event Platform may include:

  • Event contracts
  • Event envelopes
  • Producers
  • Consumers
  • Publishers
  • Subscribers
  • Topics
  • Event routing
  • Serialization
  • Schema validation
  • Event versioning
  • Delivery semantics
  • Retry policies
  • Idempotency primitives
  • Dead-letter handling
  • Correlation identifiers
  • Causation identifiers
  • Provider adapters
  • Event metadata
  • Testing primitives

Repository Structure

```text event-platform/ ├── adapters/ ├── contracts/ ├── consumers/ ├── delivery/ ├── events/ ├── producers/ ├── routing/ ├── serialization/ ├── testing/ └── utils/ ```

The structure will evolve as concrete event-driven requirements emerge across consuming systems.


Core Model

An event represents something that has already happened.

```text Producer │ ▼ Event │ ▼ Event Platform │ ├── Consumer ├── Consumer └── Consumer ```

Producers publish facts.

Consumers decide independently how to react to those facts.

This allows systems to collaborate without requiring direct knowledge of one another.


Event Contracts

Events should have explicit, versioned contracts.

A typical event may contain:

```text Event ├── id ├── type ├── version ├── timestamp ├── source ├── actor ├── correlation ├── causation └── payload ```

The exact envelope may evolve, but event metadata should remain predictable across the ecosystem.

Contracts should make compatibility visible rather than implicit.


Delivery

Event delivery should assume distributed systems can fail.

Consumers may receive duplicate events.

Networks may become unavailable.

Providers may temporarily reject messages.

Processes may terminate during execution.

The platform should therefore provide primitives for:

  • Idempotent consumption
  • Retry strategies
  • Failure classification
  • Dead-letter handling
  • Delivery acknowledgement
  • Duplicate detection
  • Recovery

Exactly-once behavior should not be assumed where the underlying infrastructure cannot guarantee it.


Correlation and Causation

Events should preserve enough context to reconstruct how work moved through the system.

```text Request │ ▼ Event A │ ▼ Event B │ ├── Event C └── Event D ```

Correlation identifiers connect related operations.

Causation identifiers describe which operation caused another event.

Together with observability infrastructure, these relationships make distributed workflows easier to understand and diagnose.


Provider Independence

Applications should not need to couple their domain logic directly to a specific message broker or transport.

Provider-specific behavior belongs behind adapters.

```text Producer / Consumer │ ▼ Event Platform │ ├── In-Memory Adapter ├── Broker Adapter └── Queue Adapter ```

The platform defines semantics and contracts.

External infrastructure provides transport and persistence.


Boundaries

Event Platform owns shared event semantics and communication infrastructure.

It does not own the business workflows that consume events.

For example:

  • Identity may attach actor context to events.
  • Trust Platform may publish moderation or policy events.
  • Data Platform may publish synchronization events.
  • Agent Network may exchange lifecycle and execution events.
  • Observability may trace event production and consumption.

Event Platform provides the communication substrate connecting those capabilities.


Events vs Commands

Events and commands represent different semantics.

A command requests that something happen.

```text GenerateReport ```

An event records that something happened.

```text ReportGenerated ```

Event Platform should preserve that distinction rather than treating every message as an interchangeable payload.

Command infrastructure may share transport primitives where appropriate, but semantic boundaries should remain explicit.


Observability

Event-driven systems must be diagnosable.

Event Platform should expose enough information to answer questions such as:

  • Which system produced this event?
  • Which consumers received it?
  • Was processing successful?
  • Was the event retried?
  • What caused the event?
  • Which workflow does it belong to?
  • How long did delivery and processing take?

Telemetry belongs in Observability.

Event Platform provides the context necessary to generate it.


Non-Goals

Event Platform intentionally does not contain:

  • Application business logic
  • Domain-specific workflows
  • General-purpose job orchestration
  • A custom message broker
  • A custom distributed log
  • Application-specific event handlers
  • General observability infrastructure
  • Deployment infrastructure

Established brokers, queues, databases, and cloud services should provide commodity transport where appropriate.

Event Platform owns the contracts and integration model around them.


Ecosystem

Event Platform is foundational communication infrastructure within the broader ecosystem.

It can integrate with:

  • Identity — Actor and principal context
  • Observability — Distributed tracing, metrics, and diagnostics
  • Trust Platform — Moderation and policy events
  • Data Platform — Data synchronization and integration events
  • Agent Network — Agent communication and lifecycle events
  • Search — Indexing and document-change events
  • Content Engine — Content lifecycle events
  • Testkit — Event fixtures, harnesses, and assertions
  • Bootstrapper — Event infrastructure integration during project scaffolding

Applications can communicate through shared event contracts without creating direct dependencies between systems.


Long-Term Vision

The long-term goal is to provide a consistent event model across applications, services, infrastructure, and autonomous agents.

Systems should be able to publish and consume events through stable contracts regardless of the underlying transport.

Event history should remain understandable.

Failures should remain diagnosable.

Schema evolution should remain controlled.

Consumers should remain independently deployable where architecture requires it.

Event Platform should provide the semantics around event-driven systems without attempting to replace mature messaging infrastructure.


Status

Event Platform is in early development.

Its architecture will grow from concrete communication requirements across consuming systems rather than speculative distributed-systems complexity.


License

Licensed under the MIT License.

About

Event contracts and infrastructure for communication between systems

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors