Deployment Overview

Causet is a suite of services deployed together. This section covers how to run them in production, what infrastructure they depend on, and how to move from a compiled IR artifact to a live deployment.


Services

ServiceLanguagePort(s)Role
causet-runtime-serviceJava / Spring WebFlux8080 (HTTP), 9090 (gRPC)Intent processing, ledger writes, rule evaluation
causet-query-serviceJava / Spring WebFlux8082Named query execution against projection tables
causet-projection-workerJava / Spring WebFlux— (Kafka consumer)Consumes projection events, UPSERTs into projection tables
causet-saas-cloudJava / Spring8085Control plane API: platforms, applications, releases, forks
causet-cloud-control-planeNext.js3000Web UI for the control plane
ws-gateway-goGo8081WebSocket gateway for real-time event push
causet-compilerJava— (CLI)Compiles .causet DSL files into IR artifacts
causet-cliGo— (CLI)Developer CLI: deploy, release, query

Service dependency graph


Required infrastructure

ComponentPurposeLocal equivalent
PostgreSQL (causet DB)Event store (ledger_events) + tenant schemasDocker Compose Postgres
PostgreSQL (projections DB)Projection tables per tenantSame Postgres instance, separate DB
Kafka / RedpandaEvent streaming between runtime and projection workerRedpanda in Docker Compose
RedisIR artifact cache + optional query result cacheRedis in Docker Compose
S3 / MinIOCompiled IR artifacts per release versionMinIO in Docker Compose
ClerkJWT authentication for control plane and SaaS APIClerk dev instance

Deploy artifacts

A Causet release consists of two IR artifacts produced by causet-compiler:

  • causet.runtime.json — rule definitions, action schemas, event definitions loaded by causet-runtime-service
  • causet.projections.json — projection definitions and DDL loaded by causet-projection-worker and causet-query-service

Both artifacts are uploaded to S3 under a versioned path:

s3://{bucket}/{irVersion}/causet.runtime.json
s3://{bucket}/{irVersion}/causet.projections.json

Services fetch their IR artifact from S3 on startup and when a new release is activated.


Release flow

  1. Compile — run causet-compiler against your .causet files
  2. Upload IR — push both artifacts to S3 at the versioned path
  3. Create release — register the IR version in causet-saas-cloud
  4. Deploy to fork — activate the release on a specific fork (e.g., production)
  5. Services reload — runtime and projection worker fetch new IR, DDL is applied

Deployment models

Local Docker Compose

All services run in a single docker compose up -d. Infrastructure (Postgres, Redpanda, Redis, MinIO) is included. Suitable for development and integration testing.

See Local Stack.

AWS ECS

Production deployment uses AWS ECS with:

  • RDS PostgreSQL (two instances or two databases)
  • Amazon MSK or self-managed Redpanda on EC2
  • ElastiCache Redis
  • S3 for IR artifacts
  • ECR for Docker images
  • ALB for HTTP routing

See AWS / ECS.

Any container platform

Causet services are standard Docker containers. They can run on Kubernetes, Fly.io, Railway, or any platform that supports Docker. The only requirements are network connectivity to the infrastructure listed above and the environment variables described in Environment Variables.


Section pages