Skip to content
sproatesPublic

Repository files navigation

ZooGlass

Configurable live views from independent event sources

Validation

ZooGlass maintains live views when source reports arrive late, conflict, go missing or are corrected. Applications configure how contributions are mapped, selected and combined. ZooGlass applies those rules, retains the resulting state and serves snapshots through HTTP and WebSocket subscriptions.

A view includes more than values: it exposes the selected sources, publication sequences, known delivery gaps and freshness status. Consumers can distinguish what has been reported from what is missing, stale or still waiting for required contributions.

For example, order, payment and stock systems can use different identifiers for the same order. A configured view maps their contributions together, while a smaller tracking view waits for its required inputs. In a sports view, a goal correction can change the scorer, or a withdrawal can change the total; another view can deliberately retain the first report. These policies are implemented in the runtime and exercised by acceptance tests.

ZooGlass is under active development. The capabilities below are implemented; the bounded deterministic timeline is also delivered. A measured 100/s baseline covers a specific single-instance memory/SQLite workload. The roadmap sets out broader performance measurement and future distributed capabilities. The first HA profile is accepted for bounded process failover. Its HA transport and client recovery have passed the bounded two-process and proxy qualification. The profile uses one active service and a takeover candidate sharing PostgreSQL; it does not distribute workload or qualify database or proxy redundancy.

What ZooGlass handles

Application problem Delivered capability
Reports arrive out of order or are retried Per-field sequence ordering, bounded history and identified publications with retained retry outcomes.
Sources use different keys or disagree Explicit entity mappings and configured source priority, with provenance for selected contributions.
Inputs are missing or a source goes quiet Required-contribution gates, partial views, sequence-gap tracking, source watermarks and receipt-age freshness.
Facts are corrected or withdrawn Retained fact revisions, active-fact collections and sums; separate views can select different revision policies.
The service restarts In-memory or SQLite storage, with durable state, publication identities and outcomes recovered in SQLite mode.
Viewers reconnect or cannot keep up Fresh subscription snapshots and bounded per-connection queues, with overflow disconnection or latest-state coalescing.
Access changes while a viewer is connected Application-supplied access decisions, tenant ownership and active grant enforcement, including revocation.

The capability delivery record links each behaviour to its configuration, contract and executable evidence. Start with the runtime guide for interfaces and the configuration guide for runnable examples and settings, and the publication guide for source identities and view definitions. Progress, freshness, storage and protected deployment have dedicated guides linked from those pages.

Applications still own source integration, meaningful identities, domain policy, permission decisions, presentation and operations. ZooGlass supplies the configured reconciliation and delivery machinery. The developer-value comparison explains that boundary using a working vehicle example.

Try the demos

With JDK 25 and Node.js 26 installed, run these commands from the repository root:

cd workbench
npm ci
npm run prepare:client
npm run prepare:service
npm run demo -- vehicle-tracker --continuous

Open the URL printed by the command. Six simulated cars move around Gibraltar while their reports encounter delays, duplicates, loss and interruptions. Open a second browser or reconnect a viewer to see current-state snapshots. Ctrl+C stops the demo and its owned processes.

prepare:service explicitly builds the Java service. Demo startup uses that prepared JAR and compiles the TypeScript viewer; it does not trigger a Java build. The continuous demo opens in your own browser and needs no Playwright browser installation. See the walkthrough for setup, map-provider details, private-LAN access and limitations.

The interactive vehicle demos provide Step, Play, Pause and Reset controls for inspecting scripted scenarios. They demonstrate a subset of the runtime: the map's older-report labels are application observation age, not a demonstration of every runtime freshness or completeness policy.

Choose a demo after the shared setup above. Each supports --continuous for automatic source activity and --interactive for a checked walkthrough:

Demo Command (from workbench/) What to watch
Fleet npm run demo -- vehicle-tracker --continuous Six cars, late and duplicate position reports, source silence and returning viewers.
Orders npm run demo -- order-tracker --continuous Five independent sources, entity mapping, required inputs, courier priority, gaps and freshness.
Sports npm run demo -- live-sports --continuous Goals, corrections and withdrawals; corrected versus first-reported results and independent markets.

Replace --continuous with --interactive to use Step, Play, Pause and Reset. The Order acceptance record and Sports acceptance record link repeated operation, recovery, bounded state and clean setup evidence. The cross-domain comparison explains what changes between applications and which responsibilities remain with their developers.

How the project fits together

ZooGlass architecture: events flow from simulated sources through ZooGlass to demo applications, with Workbench alongside generating faults and checking outcomes.

ZooGlass is the runtime. Demo applications make its behaviour visible. Workbench generates controlled inputs and faults, then checks results through real service and client interfaces. In an application deployment, your sources and consumers replace the demo systems; Workbench is development and verification tooling.

Component Role
zooglass/ Java 25 / Spring Boot runtime: reconciliation, retained state, access enforcement and snapshot delivery.
workbench/ TypeScript / Node.js 26 scenario runner: scripted inputs, delivery faults, client actions and observable checks.
demos/ Browser applications consuming ZooGlass views, with domain-specific presentation.
docs/ Product explanation, designs, contracts and verification records.

Publication explanations turn supported timeline evidence into offline text or JSON reports, using reasons recorded by the real runtime. The bounded qualification checks those reasons, replay and memory/SQLite duplicate history.

Workbench's scenarios have a defined action order and can be run repeatedly. Its real-process execution does not make network delivery, service scheduling or wall-clock timing deterministic. The timeline guide explains that distinction. The accepted deterministic timeline design defines virtual time, runtime execution boundaries and reproducible replay. This integration adds the completed bounded timeline alongside all three live demos. It supports explicit memory/SQLite lifecycle and qualified Fleet, Order and Sports profiles. PR #179 adds a reusable static-memory family with explicit conversion and six qualified fixtures. Ordinary demos retain real process/network timing. The separate host shares production runtime code without shipping simulation controls in the service. The combined Workbench was delivered in PR #172; see the integration qualification. See the roadmap. The architecture guide shows the implemented vehicle-demo stack and its boundaries.

Guarantees and limits

  • Reconnecting consumers receive current snapshots, not a replay of every missed transition. Independent views do not form an atomic multi-view read.
  • A source watermark can confirm gaps within its declared scope. Silence alone proves neither missing events nor source failure; receipt age is not observation age.
  • Source priority is configured explicitly. A stale primary does not automatically yield to a fresh backup. Supported mappings and aggregates are not arbitrary joins or a general query engine.
  • Identity, history, gap and fact state have configured bounds. Runtime view registration has no historical backfill.
  • SQLite recovery is single-instance recovery. Protected deployment requires the documented TLS, tenant and operator boundaries; access revocation cannot retract data a client has already received.

See the delivery evidence and boundaries and protected deployment guide before choosing a deployment or relying on a particular guarantee.

Verification and contributing

Java tests verify runtime strategies, transaction boundaries, persistence, crash recovery and delivery contracts. Workbench scenarios exercise real source and client interfaces; browser checks verify rendering, connection behaviour and protected-data clearing. Demos illustrate behaviour, while the tests provide correctness evidence.

The testing guide describes the layers and commands. CONTRIBUTING.md covers setup, checks and review expectations. Report suspected vulnerabilities privately using SECURITY.md.

Licence

ZooGlass is licensed under the MIT licence. Copyright (c) 2026 Ian Sproates.

Integration planning now includes source and consumer guide designs and an accepted publication client/outbox contract. The Node publication client implements the bounded standalone transport and receipt policy. Its separate durable order outbox example demonstrates application-owned transactions and crash recovery. The Kafka and RabbitMQ upstream adapter proposal plans both sources feeding ZooGlass. The Java publication client provides the bounded publication boundary for the selected Kafka Java client. The Kafka input adapter implements journalled input, checkpoint recovery and the qualified TLS/SCRAM broker profile. The three-source order example provides configuration, staged inputs and an executable lost-receipt recovery walkthrough. PR #255 completed bounded Kafka acceptance; RabbitMQ implementation remains next.

The proposed RabbitMQ client qualification pins the first broker/client contract. It is API evidence, not a delivered adapter.

Releases

Packages

Contributors

Languages