Platform architecture
The Ontology is a set of focused services around two stores: open tables that hold your data, and an object store and search index that serve it. This page names every service, follows a read and an action through them step by step, and states the consistency, scaling, failure and isolation properties you can design against
In the platform today
- The parts of this page in the platform today run as modules of the platform service, over Delta Lake tables and DuckDB; edge agents run on their own hosts
- Search covers keywords and, when embeddings are on, similarity
- The model gateway sends each call to a Claude or OpenAI model, Claude Opus 5.5 and Claude Haiku 5.5 by default, redacts before a call leaves and enforces budgets
- Functions run with the caller's permissions in a restricted process
- Each action checks the version of every object it read and fails with a conflict when one changed in between
- The managed cloud runs two copies of the service, one in each of two availability zones
- Object, action, edge and alert changes reach the app as server-sent events
- Writeback leaves through an outbox with an idempotency key, five attempts and then a dead letter
- Each tenant has its own ontology, lake, sign-in and keys
- Partitioning, consistency tokens, synchronous replication across three availability zones, failover to a second region, partitioned scaling, per-client rate limits and dedicated cells on this page
Services at a glance
The platform splits into a control plane, which holds definitions, identity and the catalogue, and a data plane, which moves, stores and serves your data. Clients only ever talk to the API layer. Nothing in the serving path reads a source system directly, and nothing writes to a source system except the writeback service
Control plane and data plane
The control plane holds state that changes rarely and must never be lost: the Ontology registry (every type definition as an immutable revision), Identity (users, groups and role mappings) and the Catalog (tables, schemas, grants and lineage). It is small and strongly consistent and, on request, replicated synchronously across three availability zones
The data plane holds state that changes constantly and is large: open tables, the object store, the search index and the queues between them. Its services are stateless where possible, and the stateful ones (object store, search index) are partitioned so that each partition can be moved, rebuilt or scaled on its own. The same split holds in every deployment topology: in the managed cloud, in your own cloud account and on premises
The read path
A read is any request that returns objects or values computed from them: a single object by key, a page of an object set, a link traversal, a search or an aggregation. All of them go through the object query service, so all of them get the same permission checks. Here is the path of a typical object set query, such as the shops that run short of a flavour before Sunday
- Authenticate. The API layer validates the OAuth 2.0 access token against Identity, resolves the caller's groups, roles and access labels
- Route. The request reaches a query service instance for the tenant, carrying the caller's identity and, on request, a consistency token from a previous action
- Resolve the schema. The query service loads the object type, its properties, links and security policies at the ontology's current revision. Revisions are immutable, so they are cached in memory and invalidated only when a proposal merges
- Plan. The query is compiled into a plan. Simple filters (equality, ranges, sets, text, geo) are pushed down to the search index together with the row access predicates for the caller, such as
region = 'Maritimes', and an access label filter. Predicates on derived or function-computed properties cannot be pushed down; they become a post-filter evaluated by a distributed scan, which is why filtering on computed values costs more - Match. The index returns matching primary keys in the requested order, plus aggregation buckets when asked
- Hydrate. The query service fetches the current version of each object from the object store, including edits not yet indexed
- Mask. Field access is applied: hidden properties are dropped and masked ones are replaced, per the caller's groups
- Return. The page of objects (100 by default, 1,000 at most) goes back with a
nextPageToken. Page tokens encode the snapshot, so paging through a large set is stable even while data changes
The action path
An action is the only way objects change, so its path is built for correctness first. The action service does all validation before it touches storage, commits all edits in a single transaction and uses an outbox so that writeback, notifications and the audit record can never be lost or duplicated after a commit
- Authorize. The action service checks that the caller may apply this action type and holds every access label on the action and on the object types it touches. An agent's request is checked against the person it acts for, and by default it becomes a proposal for that person to approve rather than an apply
- Validate parameters. Each parameter is checked against its base type, value type constraint, required flag and, for object parameters, the filtered set it must come from. Object parameters are re-read, so a stale form cannot pass an object the caller can no longer see
- Evaluate criteria. Every action condition is evaluated against a snapshot of the parameters and objects. All failures are returned together, each with its own message
- Compute edits. Rules compile into one edit per object; or the edit function runs in the function runtime and returns an edit list. The service records the version of every object it read
- Commit. In one transaction: each edit is checked against the version read in step 4 (optimistic concurrency), the edits are appended to the edit journal, the action log entry is written and the outbox rows for writeback and side effects are inserted. A version mismatch aborts the whole transaction with a
Conflicterror - Respond. The caller receives the action log ID, the edits if
includeEditswas set and, on request, a consistency token that guarantees read-your-writes on the next request - Deliver. The outbox relay updates the search index, hands writeback to the writeback service, sends notifications and webhooks, and appends the audit entry. Each delivery carries an idempotency key derived from the action log ID, so a retry never applies twice downstream
POST /api/v2/actions/place-hold:run
Authorization: Bearer eyJhbGciOi…
Content-Type: application/json
{
"parameters": { "batch": "B-0840", "reason": "Fat and solids retest" },
"options": { "includeEdits": false }
}
HTTP/1.1 200 OK
{
"logId": "alog_01M5Y70AFR07DVFW914EQ2P2XF",
"result": "APPLIED",
"action": "place-hold",
"objectKey": "B-0840",
"edits": 2,
"writeback": [
{ "system": "production-sheet", "status": "delivered" },
{ "system": "order-desk", "status": "delivered" }
]
}
This is the platform service's response. On request, it also carries a consistency token for read-your-writes, counts of edits by kind, and the status of each side effect
Consistency model
Different parts of the platform make different promises, and they are deliberately different. Writes are strongly consistent. Search and aggregation are eventually consistent with a short lag. A caller never loses sight of its own writes
| Scope | Guarantee | Mechanism |
|---|---|---|
| A single object | Linearizable: every committed version has a higher _version than the one before, and no two writers can commit against the same version | Version check at commit in the edit journal |
| One action | Atomic and isolated at snapshot level: all edits commit or none do, and all reads in the action see one point in time | Snapshot read, then a single journal transaction |
| Concurrent actions | Conflict on any object both write, even different properties; the later one fails with Conflict and can be retried | Per-object optimistic concurrency |
| Your own writes | On request, read-your-writes on the next request that carries the consistency token; the SDK passes it for you | Query service overlays journal entries up to the token |
| Other readers, by key | See an action's edits as soon as it commits | Key lookups read the object store and journal directly |
| Other readers, search and aggregations | See edits once indexed, after a short lag | Asynchronous index update through the outbox |
| Source data | Ordered by source commit per primary key, applied exactly once | Sync service keyed on dataset version and primary key |
| Writeback | At least once delivery with idempotency keys, so effectively once in systems that honour them | Outbox, retries, dead-letter queue |
Two actions that read the same objects but write different ones can both commit, even if together they break a rule. If two dispatchers each add the last 40 released tubs to a different run with top-up-delivery, both write new Delivery line objects and neither conflicts. Route such invariants through an object both actions must write, here the product itself with a counter of reserved tubs, so the second action conflicts and re-validates
Source data and edits
Every property value records its provenance: source or edit. When the sync service brings a new source value for a property that an action has edited, the object type's conflict policy decides the result. preferEdit (the default) keeps the edited value and opens a review task, preferSource takes the source value and latestWins compares the source commit time to the edit time. Once writeback has delivered an edit and the source reflects it, the two agree and the edit marker clears
Scaling
On request, partitioned stores scale each service on its own, so a heavy pipeline, a large index or a busy agent does not slow the rest. The heaviest load in an ontology is usually not object count but object width and many-to-many links. See limits and quotas
Failure handling
In the platform today, the managed cloud runs two copies of the service, one in each of two availability zones. On request, every service runs across three availability zones and fails over to a second region, as described below. The table lists what happens on each kind of failure and how the platform recovers
| Failure | What callers see | Recovery |
|---|---|---|
| Loss of one zone | Brief latency increase; no failed commits once a request is acknowledged | Journal and registry replicate synchronously across zones; stateless replicas reschedule |
| Index lag above threshold | Search and aggregations carry an indexLagMs field; key lookups stay current | Outbox relay and sync workers scale out; an index shard can be rebuilt from the object store |
| Bad source rows | The object type shows as degraded in Build, then Ontology; other rows keep syncing | Rows that fail type or required checks go to a quarantine dataset; the sync resumes from its checkpoint |
| Function timeout or error | The action fails with FunctionError or the function's user-facing message | Nothing is committed; the caller can retry |
| Concurrent edit | The action fails with Conflict | The caller re-reads and retries |
| Source system unavailable for writeback | The action has committed; the writeback shows as pending on the object and in the action log | Retries with backoff, then the dead-letter queue, visible and replayable in the app |
| Model provider outage | Agent steps slow or fall back | The model gateway routes to the fallback model configured for the task |
| Plant network loses its uplink | Plant data stops updating; the Ontology marks the affected types stale | Edge agents buffer up to 72 h and replay in order on reconnect |
| Regional disaster | Service unavailable in the region | On request, failover to the paired region in the same country |
The object store and search index are derived state. Open table storage, the registry and the audit log are the durable record. Any derived store can be rebuilt from them, which is also how a tenant is restored into a new region or moved to its own cloud
Multi-tenancy and isolation
A tenant is one client organization, addressed by its subdomain, as in creamery.ontology.marklandstreet.com. The tenant ID appears in every token, every resource name (msrn:ontology:creamery:…) and every storage path, and every service checks it on every request
- Storage. Each tenant has its own bucket or bucket prefix and its own data encryption keys, and its tables can be registered as a catalog of its own in your Unity Catalog. On request, they are wrapped by a tenant key that you can hold in AWS KMS, Azure Key Vault, GCP KMS or an on-premises HSM
- Serving. On request, object store partitions and index shards belong to one tenant and are never shared. Query and action replicas are shared, with per-tenant concurrency limits and fair queuing so one tenant's heavy aggregation cannot starve another's reads
- Compute. On request, TypeScript functions run in a fresh V8 isolate per invocation; Python functions and pipeline jobs run in gVisor sandboxes with no network access except allow-listed egress
- Rate limits. On request, limits per client, so one integration cannot crowd out the others
- Cells. On request, tenants with regulated data can run in a dedicated cell, a full copy of the serving and data plane with no shared replicas
- Residency. Each managed tenant is pinned to one region pair, and data does not leave it, including for backups. Canadian regions, starting with Montréal
Per-service reference
| Service | Responsibility | State | Depends on |
|---|---|---|---|
| Ontology registry | Type definitions as immutable revisions; branches and proposals | Replicated metadata store | Identity, Audit service |
| Object store | Object versions on open tables | Partitioned, durable | Open table storage |
| Search index | Full-text, fuzzy, faceted search, aggregations, vector fields | Sharded, rebuildable | Object store |
| Sync service | Change feeds to object versions and index, exactly once | Checkpoints per dataset | Catalog, Object store, Search index |
| Object query service | Object sets, traversals, search, aggregation, security on every row | Stateless | Registry, Search index, Object store |
| Action service | Validation, criteria, edits, atomic commit, action log, outbox | Stateless; writes to the journal | Registry, Object store, Function runtime |
| Function runtime | TypeScript and Python functions with a typed client | Stateless | Object query service |
| Agent runtime | Agent step loops, guardrails, traces, evaluation gates | Run state and traces | Model gateway, Query and Action services |
| Model gateway | Routing to language models, redaction, budgets, caching | Cache only | Model providers or your own models |
| Writeback service | Delivers edits to systems of record | Delivery queue, dead letters | Connector hosts |
| Connector hosts | Cloud connector workers and edge agents | Edge outbox, 72 h by default | Source systems |
| Pipeline engine | Incremental SQL and Python steps on Spark and DuckDB | Build history | Catalog, Open table storage |
| Catalog | Tables, schemas, grants, lineage; data branches with lakeFS | Metastore | Open table storage |
| Audit service | Append-only, hash-chained log, exported every 5 minutes | Durable log | Your export bucket |
| Identity | OpenID Connect sign-on and group mapping (built); the directory with SCIM 2.0 provisioning and offboarding (built); SAML 2.0 (on request) | Directory | Your identity provider |