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

One service15 parts, each with one job, run today as modules of one Python service; split out on request
Under 2 sThe design target at p50 from a source commit to a queryable object
One transactionPer action, with optimistic concurrency on every object touched
Open tablesDelta Lake and Parquet in storage you control, as the system of record

In the platform today

Built
  • 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
On request
  • 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

Clients Operations view · Simple view · Assistant · Agents · Scenario planner · Build and Data · SDK and REST API layer · TLS 1.2 and 1.3 · OAuth 2.0 · rate limits · request routing IdentityOIDC and SCIM Serving plane Object query servicesets, links, security Action servicevalidate, commit, outbox Function runtimeV8 isolates, gVisor Agent runtimestep loops, traces Search indexinverted, doc values, vectors Object storeobject versions Ontology registryrevisions, branches Model gatewayrouting, redaction Data plane Sync servicechange feeds, exactly once Pipeline engineSpark and DuckDB CatalogUnity Catalog, lakeFS Writeback serviceretries, dead letters Open table storageDelta Lake on Parquet · raw, clean and backing datasets · edits table · your bucket Audit servicehash-chained log Connector hosts Cloud connector workers Edge agents: outbound only, 72 h outbox Source systems ERP · MES and historian · point of sale · LIMS telematics · scheduling · email · files
The serving plane answers requests in milliseconds; the data plane moves and reshapes data in seconds to minutes. Open table storage is the system of record for your data, and every other store can be rebuilt from it

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

Client API layer Query service Registry Search index Object store 1 query + token 2 caller, tenant 3 type at revision 4 filters + security predicates 5 matching keys 6 hydrate versions 7 rows 8 masked page + pageToken
Numbers match the steps below. Security predicates are attached in step 4, before the index is asked anything, so objects a caller cannot see are never fetched
  1. Authenticate. The API layer validates the OAuth 2.0 access token against Identity, resolves the caller's groups, roles and access labels
  2. 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
  3. 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
  4. 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
  5. Match. The index returns matching primary keys in the requested order, plus aggregation buckets when asked
  6. Hydrate. The query service fetches the current version of each object from the object store, including edits not yet indexed
  7. Mask. Field access is applied: hidden properties are dropped and masked ones are replaced, per the caller's groups
  8. 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

Clientapply request Action serviceresolve, validate, criteria Function runtimeedit function, if any One transaction in the object store journal object edits with version checks · action log entry · outbox rows committed before the caller gets a response Outbox relayat least once, deduplicated Search indexindex edited objects Writeback serviceERP, POS, WMS Notificationsin-app, email, webhooks Audit servicehash-chained entry
Everything above the outbox relay happens before the caller gets a response. Everything below it happens after, with retries, and is visible in the action log as pending, delivered or failed
  1. 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
  2. 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
  3. 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
  4. 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
  5. 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 Conflict error
  6. Respond. The caller receives the action log ID, the edits if includeEdits was set and, on request, a consistency token that guarantees read-your-writes on the next request
  7. 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

ScopeGuaranteeMechanism
A single objectLinearizable: every committed version has a higher _version than the one before, and no two writers can commit against the same versionVersion check at commit in the edit journal
One actionAtomic and isolated at snapshot level: all edits commit or none do, and all reads in the action see one point in timeSnapshot read, then a single journal transaction
Concurrent actionsConflict on any object both write, even different properties; the later one fails with Conflict and can be retriedPer-object optimistic concurrency
Your own writesOn request, read-your-writes on the next request that carries the consistency token; the SDK passes it for youQuery service overlays journal entries up to the token
Other readers, by keySee an action's edits as soon as it commitsKey lookups read the object store and journal directly
Other readers, search and aggregationsSee edits once indexed, after a short lagAsynchronous index update through the outbox
Source dataOrdered by source commit per primary key, applied exactly onceSync service keyed on dataset version and primary key
WritebackAt least once delivery with idempotency keys, so effectively once in systems that honour themOutbox, retries, dead-letter queue
Snapshot isolation allows write skew

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

FailureWhat callers seeRecovery
Loss of one zoneBrief latency increase; no failed commits once a request is acknowledgedJournal and registry replicate synchronously across zones; stateless replicas reschedule
Index lag above thresholdSearch and aggregations carry an indexLagMs field; key lookups stay currentOutbox relay and sync workers scale out; an index shard can be rebuilt from the object store
Bad source rowsThe object type shows as degraded in Build, then Ontology; other rows keep syncingRows that fail type or required checks go to a quarantine dataset; the sync resumes from its checkpoint
Function timeout or errorThe action fails with FunctionError or the function's user-facing messageNothing is committed; the caller can retry
Concurrent editThe action fails with ConflictThe caller re-reads and retries
Source system unavailable for writebackThe action has committed; the writeback shows as pending on the object and in the action logRetries with backoff, then the dead-letter queue, visible and replayable in the app
Model provider outageAgent steps slow or fall backThe model gateway routes to the fallback model configured for the task
Plant network loses its uplinkPlant data stops updating; the Ontology marks the affected types staleEdge agents buffer up to 72 h and replay in order on reconnect
Regional disasterService unavailable in the regionOn 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

ServiceResponsibilityStateDepends on
Ontology registryType definitions as immutable revisions; branches and proposalsReplicated metadata storeIdentity, Audit service
Object storeObject versions on open tablesPartitioned, durableOpen table storage
Search indexFull-text, fuzzy, faceted search, aggregations, vector fieldsSharded, rebuildableObject store
Sync serviceChange feeds to object versions and index, exactly onceCheckpoints per datasetCatalog, Object store, Search index
Object query serviceObject sets, traversals, search, aggregation, security on every rowStatelessRegistry, Search index, Object store
Action serviceValidation, criteria, edits, atomic commit, action log, outboxStateless; writes to the journalRegistry, Object store, Function runtime
Function runtimeTypeScript and Python functions with a typed clientStatelessObject query service
Agent runtimeAgent step loops, guardrails, traces, evaluation gatesRun state and tracesModel gateway, Query and Action services
Model gatewayRouting to language models, redaction, budgets, cachingCache onlyModel providers or your own models
Writeback serviceDelivers edits to systems of recordDelivery queue, dead lettersConnector hosts
Connector hostsCloud connector workers and edge agentsEdge outbox, 72 h by defaultSource systems
Pipeline engineIncremental SQL and Python steps on Spark and DuckDBBuild historyCatalog, Open table storage
CatalogTables, schemas, grants, lineage; data branches with lakeFSMetastoreOpen table storage
Audit serviceAppend-only, hash-chained log, exported every 5 minutesDurable logYour export bucket
IdentityOpenID Connect sign-on and group mapping (built); the directory with SCIM 2.0 provisioning and offboarding (built); SAML 2.0 (on request)DirectoryYour identity provider

Related