NucleusPartially Implemented
Postgres, Redis, and the rest of the data plane
Nucleus provisions the data services your app needs, such as Postgres or Redis. Request a stack in a region, Gluon runs its containers, and Nucleus hands the endpoint to Valence. Add shards as the stack grows.Nucleus · src/stacks.rs
use nucleus::endpoint::resolve_db_endpoint;
use nucleus::provision::{provision, EngineStrategy, ProvisionPolicy};
use nucleus::reconcile::reconcile_stack;
use nucleus::shards::add_shard;
// us_east: the GluonCellCloudPlacement row for that region
let stack = provision(
valence,
EngineStrategy::Postgres,
ProvisionPolicy {
logical_name: "primary".into(),
replica_count: 1,
},
Some(&us_east),
)
.await?;
reconcile_stack(valence, &stack).await?;
let url = resolve_db_endpoint(valence, "primary").await?;
// Later, when it needs to grow:
add_shard(valence, &stack).await?;Ships inRemote fleet
In the Remote fleet template
The Remote fleet template mounts the Nucleus admin app. Hosts boot Nucleus after Gluon, and Spectra can watch the same stacks.Data-service intent
Implemented
Describe Postgres, Redis, NATS, Fluvio, ClickHouse, MongoDB, and RustFS stacks as desired state.
Regional placement
Implemented
Pin a data stack to a Gluon region when you provision it.
Reconciliation
Implemented
Apply desired state through Gluon until each stack reaches its active state.
Service endpoints
Implemented
Resolve the endpoint an application or Valence adapter needs after provisioning.
Shards and replicas
Implemented
Add shards, replicas and nodes to Postgres, Redis, ClickHouse and MongoDB stacks.
Streaming and object storage scale-out
In Progress
NATS scales by adding brokers, and Fluvio can add partitions. Growing a RustFS cluster isn't supported yet.
Sealed credentials
Implemented
Seal engine passwords in Neutrino when a stack is created.
Nucleus operator UI
Partially Implemented
Inspect stacks, topology and credentials, and create stacks from a guided form. Mounted in the Remote fleet template.
Code sample
Taken from the getting-started docs. See all code samples on Resources.
Nucleus stackNucleus
Provision Postgres, reconcile, then hand Valence the URL
use nucleus::endpoint::resolve_db_endpoint;
use nucleus::provision::{provision, EngineStrategy, ProvisionPolicy};
use nucleus::reconcile::reconcile_stack;
use nucleus::shards::add_shard;
// us_east: the GluonCellCloudPlacement row for that region
let stack = provision(
valence,
EngineStrategy::Postgres,
ProvisionPolicy {
logical_name: "primary".into(),
replica_count: 1,
},
Some(&us_east),
)
.await?;
reconcile_stack(valence, &stack).await?;
let url = resolve_db_endpoint(valence, "primary").await?;
// Later, when it needs to grow:
add_shard(valence, &stack).await?;