TransitAI Core

Track 3 · Phase 2, second draft

The exchange, as a system.

The first draft said who holds what. This one keeps those rules and asks how the exchange itself would be built, through the lenses of the system design course: tiers, queues, the right store for each job, and a consistency choice per class of data.

Open the annotated diagramCompare with the first draft

Three pictures first.

One idea each. The whole system follows.

1 · How data moves

Inside the agency

Agency

raw data stays

Adapter

filters, reshapes
The exchange

Front door

checks who asks

Two lanes

seconds or hours

Stores

one per job
Readers

Apps

allowed ones only
Restricted fields stop at the adapter. They never reach the exchange.

2 · What the exchange does

  • Contracts

    agreed shapes
  • Shared names

    one stop, one id
  • Policy

    who may see what
  • Audit

    every access logged
  • Onboarding

    a joining checklist
Five small services that pass messages. None of them holds raw data.

3 · Where data rests

  • Live

    seconds old
  • History

    years deep
  • Registry

    always exact
  • Audit log

    never changes
Each kind of data gets the store that suits it. A bus position can be a moment stale. A rule cannot.

The whole system, moving.

Pick a story and follow the dots. Tap any part for one line about it.

Draft v0.2. Service names are candidates, not decisions. The annotated diagram carries the full notes, and the third draft answers its three open points.

Five tiers, top to bottom.

  1. Edge

    One gateway every call crosses. Federated sign-in, scopes from the agreement, quotas, deny by default.

  2. Ingress

    An event lane for seconds and a batch lane for hours, both behind a queue. Conformance workers scale on queue depth.

  3. Core services

    Contracts, semantics, policy, audit and onboarding as bounded contexts that talk through events.

  4. Data

    A live store, a lakehouse, a small strong registry, an immutable audit log, and a knowledge index. One store per job.

  5. Serving

    The read side: cached public feeds, live feeds, pre-aggregated history, and a clean room for anything restricted.

Where each course lens lands.

The concepts from CSCI 5411, and the box they decided.

Well-architected pillars
The cross-cutting rail: reliability, security, observability, cost and operations
CAP and PACELC
Chosen per data class, not once. Live positions are eventual; contracts and policies are strong
Replication and sharding
The stream is partitioned by party and route key, the lakehouse by party and date. Multi-AZ synchronous, cross-region asynchronous
Little's law and percentiles
The sizing footer, and a p95 budget per endpoint instead of an average
Load balancing and autoscaling
L7 at the edge, least-connections for live feeds, scaling on queue lag rather than CPU
Protocols
REST for reference data, GTFS-Realtime polling for live data, SSE or WebSocket for dashboards
Microservices and events
Tier 3. Each service owns its data; onboarding is a saga; party endpoints sit behind circuit breakers
Queues
Both ingress lanes. At-least-once delivery, idempotent consumers, a dead-letter queue for rejects
Caching
CDN TTLs set by the field label, and a 60-second cache on policy decisions
Reliability and disaster recovery
SLOs and error budgets, a warm standby region, RPO and RTO per store, 3-2-1 backups with tested restores
AI stack
A RAG assistant over contracts and policies with read-only tools and a token budget, plus a model lifecycle tied to contract versions
Authentication and authorization
OIDC federation to each party's identity provider, ABAC at one policy decision point, zero trust inside, STRIDE per service

Nothing from the first draft is withdrawn. Raw data still never leaves a party, the region still holds contracts and policy rather than copies, and coupling still runs one way. What is new is the inside of the middle box.

The sizing numbers at the foot of the diagram are assumptions, written down so they can be replaced by measurements in Phase 5. The AWS services named are candidates.

Still open
Which region is the warm standby, and the RPO and RTO each party will accept
Still open
The minimum group size for clean-room outputs
Still open
Whether the live store is one shared cluster or one per party
Still open
Where the assistant's guardrails are tested, and against what

↑ ↓ to move · ↵ to open · esc to close