Hasty Briefsbeta

Designing EventQL, an Event Query Language

a day ago
  • #EventSourcing
  • #QueryLanguage
  • #Database
  • EventQL was created to address the gap between predefined projections and ad hoc event queries.
  • EventSourcingDB's custom storage engine necessitated a purpose-built query language, leading to EventQL's development.
  • EventQL's syntax starts with FROM to match the natural flow of exploring event streams, differing from SQL's SELECT-first approach.
  • The language emphasizes explicit typing and conversions to prevent subtle bugs, especially with event data.
  • EventQL supports complex queries like combining streams, grouping, aggregation, and subqueries but is honest about performance trade-offs.
  • Designed specifically for event streams, EventQL allows querying across subjects without predefined paths, supporting advanced patterns like Dynamic Consistency Boundaries.
  • EventQL is deeply integrated into EventSourcingDB, with a dedicated parser and execution engine, and is accessible via HTTP API.
  • The language avoids unnecessary syntax variations to reduce confusion and focuses on clear, intentional design choices.
  • EventQL is ideal for ad hoc analysis, debugging, and dynamic consistency checks but not for high-frequency reads or critical latency paths.
  • The development of EventQL reflects practical needs and lessons from real-world event-sourced systems, with plans for careful future evolution.