Developer Defined Replication
Open source database replication defined from your code
Asynchronous
Stop chaining fragile service calls. ReJot decouples communication by letting data flow asynchronously between services, using your database's changelog as the queue. It's reliable, resilient, and naturally tolerant to failure unlike synchronous APIs.
Lightweight by Design
No brokers, no partitions, no outboxes. ReJot avoids the operational weight of event streaming platforms by reusing your existing infrastructure. You get the benefits of asynchronous communication, without the overhead or complexity.
Developer-Defined
With ReJot, you define what to publish and consume using your database's query language, similar to defining your tables or writing a migration. It lives in your codebase and fits naturally into your dev workflow.
ReJot vs. Internal APIs
ReJot shines in a service-oriented architecture where distinct teams are working on separate products, where each team owns their own database. In this comparison, we compare ReJot to communicating using internal synchronous APIs.
Public Schema Definition
Public Schemas are defined by the data owner. They describe the shape of the data that is published to other teams. They are referenced by the combination of their name, data store, and manifest.
createPublicSchema("publish-account", {
source: { dataStoreSlug: "account-service-db" },
outputSchema: z.object({
id: z.number(),
emails: z.array(z.string()),
firstName: z.string(),
lastName: z.string(),
}),
config: new PostgresPublicSchemaConfigBuilder()
.addTransformation(
createPostgresPublicSchemaTransformations(
"insertOrUpdate",
"account",
`SELECT
a.id,
(
SELECT ARRAY_AGG(e.email)
FROM account_emails e
WHERE e.account_id = a.id
) as emails,
a.first_name as "firstName",
a.last_name as "lastName"
FROM
account a WHERE a.id = :id`,
),
).build(),
version: { major: 1, minor: 0 },
});
Consumer Schema Definition
Consumer Schemas are defined by the consuming team. They contain the query to execute when a change is pushed from the source Public Schema.
createConsumerSchema("consume-account", {
source: {
manifestSlug: "rejot",
publicSchema: {
name: "publish-account",
majorVersion: 1,
},
},
config: createPostgresConsumerSchemaConfig(
"default-postgres",
`INSERT INTO account_destination
(id, full_name, email)
VALUES (
:id,
:firstName || ' ' || :lastName,
(:emails::text[])[1] -- select first
) ON CONFLICT (id) DO UPDATE
SET full_name = :firstName || ' ' || :lastName,
email = (:emails::text[])[1];`,
{
deleteSql: `
DELETE FROM
account_destination
WHERE id = :id`,
},
),
});
How we integrate
Bring-your-own-infrastructure
Your data, your network
An Essay on the Burdens of Data
Data is valuable to organizations, but also a burden to software engineers. This essay is core to the philosophy of ReJot, it explores how to unburden software engineers while extracting value from data.
Read the essayGet notified
Receive email updates from ReJot