PCP · pcp
PCP Push — Event Bus
V4.1 push event bus with coalescing, backpressure handling, and persistent journal for capability state change events.
pcp-pushv0.2.0pcp
3.5K
Lines of Code
130
Tests
19
Files
Architecture
Implements EventBus with subscription management, overflow strategies, and journal persistence.
Overview
pcp-push implements the event bus for the Portal Capability Protocol. When apps' capabilities change state (e.g., a document becomes dirty, a button becomes enabled), the app publishes events through this bus. The bus supports event coalescing (merging rapid-fire events), backpressure handling (dropping or queuing when subscribers are slow), and a persistent journal for crash recovery. Subscribers (portal-context, portal-shell) receive filtered event streams.
Data Flow
App capability state changes → publish to event bus → coalescing/backpressure → subscribers receive filtered events
Dependencies
Internal (1)
External (7)
tokio workspaceserde workspaceserde_json workspacechrono workspacedashmap workspacetracing workspacethiserror workspace
Depends on pcp-core (event types).