Repository navigation
feat(ontology): classes and properties over a Domain model - #3873
Draft
sam-goodwin wants to merge 18 commits into
Draft
sam-goodwin wants to merge 18 commits into
sam-goodwin wants to merge 18 commits into
Conversation
Contributor
|
Install the packages built from this commit: alchemypnpm install https://pkg.alchemy.run/alchemy/pr:3873:ef405fb@alchemy.run (37)pnpm install https://pkg.alchemy.run/@alchemy.run/better-auth/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/git/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/drizzle/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/acme/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/archil/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/boat/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/axiom/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/doppler/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/infisical/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/1password/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/turso/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/convex/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/e2b/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/daytona/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/modal/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/planetscale/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/neon/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/prisma/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/hetzner/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/digitalocean/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/railway/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/fly/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/github/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/stripe/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/gcp/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/aws/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/domain/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/ontology/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/kubernetes/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/docker/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/redis/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/sql/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare-runtime/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/frontend-frameworks/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/node-utils/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/pkg/pr:3873:ef405fbTransitive Dependencies (30)pnpm install https://pkg.alchemy.run/@distilled.cloud/aws/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/acme/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/archil/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/core/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/boat-dev/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/axiom/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/doppler/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/infisical/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/turso/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/convex/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/e2b/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/daytona/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/modal/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/planetscale/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/neon/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/s3/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/prisma/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/hetzner/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/digitalocean/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/railway/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/fly-io/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/github/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/stripe/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/aws4signer/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/cloudflare/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/iceberg/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/gcp/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/effect-cluster/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@alchemy.run/rivet/pr:3873:ef405fbpnpm install https://pkg.alchemy.run/@distilled.cloud/rivet/pr:3873:ef405fbPublished |
…a-package # Conflicts: # pnpm-lock.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@alchemy.run/ontology: a@alchemy.run/domainmodel says what happens; its ontology says what things mean. You define the classes and properties once, over the aggregates and events you already have, and the tables, views, guarded reads and agent tools come from that definition.An aggregate is a class and its id is the individual. A property goes from an aggregate to another aggregate or to a Schema, and names the events that set it.
A class is defined by an expression over those, across aggregate boundaries:
Filled by the model's events
Each term is a class, like the aggregates and events it is defined over. A
Facts.Projectionis an ordinaryDomain.Projection, listed in the model like any other. It writes each property as its events arrive, and a new one is backfilled from history.Expressions are evaluated closed-world, so
not,only,maxand counts have answers.In a SQL database
Swap the store Layer and the same projection fills tables: one per aggregate, a column per functional property, a pair table per many-valued one, and a view per defined class. Postgres and SQLite, on any
SqlClient.store.members,has,values,subjectsandviolationscompile to queries, chains and transitive properties included. A property added later is a column added on first use. A schema check SQL has no words for fails the read and names the check.In a lake
An Iceberg table written by a stream is only appended to, so the lake is one table with a row per statement, and the same tables and class views are views over it.
Lake.toLayeris the same projection with a different Layer.A property added later is new rows and a new view, never a change to the table.
Lake.SqlWriterandLake.Storekeep the layout in Postgres or SQLite.On Cloudflare the writer is a Pipelines stream, and the table is an Iceberg table of an R2 Data Catalog:
On AWS the writer puts rows straight into an Iceberg table of an S3 table bucket (
PutRows, from #3905, which this branch includes until it merges):Reads on behalf of a caller
A rule is a class expression, applied inside the query. A kind with no rule is read by nobody.
Mentioned by an
AI.ProcessEach tool's description carries the term's definition, and each call reads as whoever the session was started as.
As text
The expressions are OWL 2's, so the definition prints in its notations.