| Copyright | (c) 2025 |
|---|---|
| License | BSD3 |
| Maintainer | nadine@example.com |
| Stability | experimental |
| Safe Haskell | None |
| Language | GHC2021 |
Hindsight.Store.PostgreSQL.Events.Parsing
Description
This module implements centralized type-safe event parsing to eliminate redundant JSON parsing across multiple subscriptions. Instead of each subscription parsing the same JSON independently, the dispatcher parses once and distributes typed events.
Performance Impact
With 100 subscriptions: - Before: 100x JSON parsing per event - After: 1x JSON parsing per event - Expected improvement: 25-50x throughput
Architecture
The key innovation is using indexed TypeRep for heterogeneous event storage while maintaining type safety through runtime type checking.