Skip to content

Applications and microservices

Quantify, Olivia Douglas Support Services BC’s in house development service.

Five services and three shared libraries that work together: Redfly for identity, Bubbl for client case management, Caulight for accessible experiences, DarkCrow for telemetry and FairFeather for background jobs.

How they fit together

Every service runs on Kubernetes as a three-replica StatefulSet. Cassandra runs inside each app’s JVM and replicates natively, SunLink gives each service a ring for leader election, locks and membership, and SeaWave backs Spring Session so the ingress needs no sticky sessions. Pulsar is the only message broker.

ServiceRoleHTTPS portEmbedded
RedflyIdentity (phone + Twilio code, TOTP for Bubbl staff), PASETO tokens, revocations, app passwords, SMS notifications, telemetry intake, master DB8443Cassandra, SunLink, SeaWave
DarkCrowTelemetry store and search, kept 1 year8444Cassandra, Solr, SunLink, SeaWave
CaulightAccessible experiences marketplace, keyspace per tenant8445Cassandra, Solr, SunLink, SeaWave
BubblClient case management, keyspace per tenant8446Cassandra, Solr, SunLink, SeaWave
FairFeatherJobs: outbox delivery, Cassandra repair and snapshots, telemetry purge8447Cassandra, SunLink, SeaWave

The request path

  1. A user signs in at Redfly with their phone and a 6-digit code (plus TOTP for Bubbl staff). Redfly opens a session (12 h idle, 30 days at most) and issues a 15-minute PASETO.
  2. The app resolves the tenant from the hostname, through its control keyspace. The token’s ten claim must include that tenant.
  3. Shiro’s RedflyTokenRealm verifies the token offline with Redfly’s public keys, checks the SeaWave deny-list fed by redfly/revocations, and loads roles from the tenant keyspace.
  4. A controller runs in the tenant keyspace. It checks permissions, assigns a UUIDv7, keeps lookups up to date, applies field encryption, writes an audit row and publishes an index event. Bubbl also writes its outbox row in the same logged batch.

Data flows

Bubbl → Redfly master DB

An outbox row goes in the same logged batch as each change. FairFeather delivers it to Redfly, which records it so it’s applied once. Encrypted fields stay ciphertext.

Telemetry

Clients send pseudonymous events to Redfly, which validates them and publishes to Pulsar. DarkCrow stores them for one year and indexes them in Solr on every replica.

Search, chat and SMS

Each write publishes an index event that every replica applies to its local Solr core. Chat is stored first, then fanned out over WebSocket. SMS goes through Redfly, so apps store no phone numbers.

Security and data residency

  • Public TLS ends at the ingress, with mutual TLS everywhere inside the cluster.
  • Files and snapshots go to a cloud provider’s S3 in a Canadian region, encrypted client-side.
  • OpenBao Transit wraps every data key.

Shared libraries

SunLink

ca.odssbc:sunlink — the ZooKeeper protocol over Apache Ratis, with Curator, for leader election, locks and membership.

SeaWave

ca.odssbc:seawave — an in-memory RESP store with peer replication, backing Spring Session in every service.

redfly-client

ca.odssbc:redfly-client — a Kotlin client for Redfly, plus a WordPress plugin for PHP 8.2 and WordPress 6.5.