TransitAI Core

Digital twin · transfer analysis · system design · planned

Transfer analysis: the system design.

How many riders change from one agency to another, where, and how long they wait; counted at home, only totals cross. The same system as the detailed architecture and its data architecture, with the product names taken off: what each part is for, in the three custody zones the rest of the site uses.

The pictureThe detailed architectureThe data architecture

Components, not products.

Hover a component for what it does, the service it maps to and the tables it holds. Hover a connection for what moves, how often and under whose key. Hold Shift over a component for its quality attributes. Click to pin; Esc releases. Desktop only.

Hover a component to see what it sends and receives.

Blue connections cross an account border. Shapes: a cylinder is a store, a cog a job, a key or shield a control, a person a reader. Nothing is deployed; services behind the components are recommendations, not settled (decision 35).

From the abstract to the concrete.

Each generic component, the service that plays it in the detailed picture, the tables it holds or transforms, and why that choice. Derived from the detailed picture's node table, so the two cannot drift.

Generic componentIn the detailed pictureTables held or transformedWhy this choice
Open live feed
source
GTFS-Realtime feedGTFS-Realtime feedsA standard every agency already publishes; the region reads it like anyone else.
Fare system export
source
PRESTO fare exportPRESTO fare exportThe fare vendor's export is the only source of the transfer flag; it is read where it lands.
Raw landing store
store
S3 · raw landingRaw fare exportBronze is never edited, so Silver can be rebuilt; an object store is the cheapest place to keep it.
Standardising job (adapter)
job
Glue ETL · translate—A batch job the region publishes and the agency runs: one adapter per party (decision 6).
Standard tables
store
S3 + Iceberg · TIDES tablesTIDES fare_transactionsThe open standard is the table shape (decision 4); a table format gives snapshots and schema.
Counting job
job
Glue ETL · count and time—Counting at home is what keeps the card inside the agency (decision 25).
Totals outbox
store
S3 · nightly totalsNightly transfer totalsA file a night under a contract is simpler and cheaper than answering questions on demand (decision 27).
Agency key
control
KMS · MiWay's key—The agency holds the key to its own shared data, so it can leave with full control (decisions 13, 41).
Scheduler
control
EventBridge Scheduler—A cron-style trigger; any workflow tool does the same.
In-place reader
job
Athena · read arrivals—Reading in place through a grant means nothing is copied to be deleted later (decision 49).
Feed poller
job
ECS on Fargate · poller—A small always-on container; the registry tells it which feeds.
Batch writer
job
Data Firehose · archive—Turns a trickle of records into files sized for the archive; no code to run.
Feed archive
store
S3 + Iceberg · feed archiveFeed archivePublic data mirrored under the region's key; a leaver's part is one prefix delete.
Inbox
store
S3 · inboxInbox: nightly filesA drop box the agency writes to; the region never reaches into the agency's account.
Contract check
job
EventBridge · file arrived
Lambda · contract check
—Every clause of the contract compiles to a check run on each file (decision 11).
Add-up job
job
Glue ETL · add up—A nightly job that reads every agency's rows by grant and appends to the regional tables.
Query engine
job
Athena · queries—Pay per query over the same files; any engine that reads the table format will do.
Report API
control
API Gateway · report APIReport APIThe region serves JSON; each agency draws its own charts (decision 14).
Catalogue and grants
control
Catalog + Lake Formation—Grants scoped by the contract are how an agency reads the region's tables in place.
Public arrivals table
store
S3 + Iceberg · public arrivalsPublic arrivalsWait times need arrivals at stops, not positions; this table is what an agency reads back (decision 49).
Arrival-deriving job
job
Glue ETL · derive arrivals—The step the audit found missing: positions become arrivals once, for every agency.
Off-boarding workflow
job
Step Functions · off-boarding—Leaving is a job, not a promise: delete, expire, purge, rebuild (decisions 43, 50).
Rejected-file queue
store
SQS · rejected filesRejected filesA queue keeps the bad file and its reason until the agency re-sends.
Regional transfer table
store
S3 + Iceberg · regional tablesRegional transfer tableAdded-up totals at the region, but every row still under its agency's key (decision 41).
Regional planners
people
Regional planners—The readers the contract names.
Journey view
people
Journey view—The public-facing reader the contract names.
Sign-in
control
Cognito · sign-in—Shared part, costed in every use case (decision 34).
Rule check
control
Verified Permissions—A policy engine: the contract's readers clause, checked on every request.
Party registry
control
Aurora · registryRegistryOne relational store for who is in, on what terms, with which shared ids; the same table in both use cases.
Audit log
control
CloudTrail + Object Lock—Write-once storage so the record of who read what cannot be edited.
Monitoring
control
CloudWatch · monitoring—Alarms on the deadlines the contract states (decision 50).
Region key
control
KMS · region's keys—The region's key never touches an agency's rows.

Fixed by the design, free to swap.

What a different cloud or vendor would have to keep, and what it could replace without changing the story.

Fixed

  • The open standards are the table shapes: TIDES station_activities for the totals, GTFS-Realtime for the feed (decision 4).
  • Raw data and the card stay in the agency's account; the card id is hashed there and never written out (decisions 5, 48).
  • One file a night under a published contract, rows under 5 distinct cards dropped (decisions 25 to 27).
  • Each agency's rows rest under its own key; the region reads by a revocable grant (decision 41).
  • Leaving deletes, expires snapshots, purges caches and rebuilds; the agency keeps what it received (decisions 43, 50).
  • The region serves JSON behind sign-in and a rule check; it never draws the charts (decision 14).

Free to swap

  • The batch engine for the adapter, the count and the add-up: a managed ETL service today, Spark or a notebook platform on the same files tomorrow (the detailed picture marks these in orange).
  • The query engine: anything that reads the table format over an object store.
  • The table format itself is proposed, not decided: Iceberg today; Delta would carry the same rules.
  • The scheduler, the file-event trigger and the rejected-file queue: any workflow tool.
  • The catalogue and grants: the cloud's native catalogue, or an open catalogue with sharing built in.
  • Key management: any service that can grant a key across accounts and revoke the grant.
Consistent with
The detailed architecture (every box maps to one component here; every connection is one of its edges) and the data architecture (every table sits on one component).
Quality attributes
Sourced from the use-case page, the contracts and the audit where they exist; the rest are marked proposed in the Shift panel.
Decisions
4 to 7, 11, 13, 14, 25 to 28, 34, 35, 41 to 43, 48 to 50; 58 to 61 proposed

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