rxp

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

README

rxp - Reliable eXecution Primitives

Go Reference Test Status Contributor Covenant

rxp provides building blocks used to construct a Reliable Execution platform.

This source code repository contains the core rxp library. There are separate source code repositories for rxp backend implementations -- for example, the rxp-pg repository contains the rxp implementation using PostgreSQL as the primary persistence store.

At its core, a Reliable Execution platform must be able to:

  • Guarantee uniqueness of names within some scope
  • Safely evolve the definition of a thing
  • Safely mutate desired state of a thing
  • Safely archive managed things
  • Provide auditability for managed things

Name uniqueness

All things managed by rxp have a name.

A thing's name is a special attribute.

Because names are easier to remember than globally-unique string identifiers like UUIDs, things are often looked up by their name. This is why names must be treated with care by the system.

Human-readable names for various things in the rxp system are guaranteed to be unique within a particular Namescope.

Renaming

Humans change their mind, sometimes often. Because of this, the ability to rename something is a critical piece of functionality for long-lived systems.

rxp treats the action of renaming something as a special operation. When a thing is renamed, rxp guarantees that the renaming of done in a safe, audited and complete fashion. Partly, this means that renaming is isolated to its own mutation event. rxp ensures that you cannot modify the desired state of something and change its name at the same time.

Safe definition evolution

As business requirements change, developers need to evolve the definition and schema of structures used by their applications.

Reliable Execution platforms faciliate the execution of code that is designed to potentially run over very long periods of time. rxp understands when the definition of something changes and provides guardrails that prevent unsafe changes to that definition from potentially breaking application clients.

Safe desired state mutation

Safe archival

Things managed by rxp do not get deleted. This is so that rxp can ensure that the history of changes to some thing under its management are always persisted in order to restore a particular version or generation of the thing at some point in the future.

Instead of deletion, things managed by rxp can be archived. Archival marks the thing as not being in the active data set, which means the thing will no longer be returned from Read operations unless the caller indicates rxp should include archived items in its lookup actions.

Auditability

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	// SystemRead reads a System from persistent storage.
	SystemRead(
		context.Context,
		system.Selector,
	) (*system.System, error)
	// SystemWrite atomically writes the supplied System to persistent storage.
	SystemWrite(
		context.Context,
		system.System,
	) error
	// SystemQuery queries zero or more Systems from persistent storage.
	SystemQuery(
		context.Context,
		query.Expression,
		...query.Option,
	) (*query.Result[*system.System], error)
	// DomainRead reads a Domain from persistent storage.
	DomainRead(
		context.Context,
		domain.Selector,
	) (*domain.Domain, error)
	// DomainWrite atomically writes the supplied Domain to persistent storage.
	DomainWrite(
		context.Context,
		domain.Domain,
	) error
	// DomainQuery queries zero or more Domains from persistent storage.
	DomainQuery(
		context.Context,
		query.Expression,
		...query.Option,
	) (*query.Result[*domain.Domain], error)

	// KindRead reads a Kind from persistent storage.
	KindRead(
		context.Context,
		kind.Selector,
	) (*kind.Kind, error)
	// KindWrite atomically writes the supplied Kind to persistent storage.
	KindWrite(
		context.Context,
		kind.Kind,
	) error
	// KindQuery queries zero or more Kinds from persistent storage.
	KindQuery(
		context.Context,
		query.Expression,
		...query.Option,
	) (*query.Result[*kind.Kind], error)
	// KindVersionRead reads a KindVersion from persistent storage.
	KindVersionRead(
		context.Context,
		kindversion.Selector,
	) (*kindversion.KindVersion, error)
	// KindVersionWrite atomically writes the supplied KindVersion to
	// persistent storage.
	KindVersionWrite(
		context.Context,
		kindversion.KindVersion,
	) error
	// KindVersionQuery queries zero or more KindVersions from persistent
	// storage.
	KindVersionQuery(
		context.Context,
		query.Expression,
		...query.Option,
	) (*query.Result[*kindversion.KindVersion], error)

	// ObjectRead reads a single Object from persistent storage.
	ObjectRead(
		context.Context,
		api.KindVersionName,
		object.Selector,
	) (*object.Object, error)
	// ObjectWrite persists a single supplied Object to backend storage, Note
	// that on successful write, the newly-created or updated Object is
	// returned.
	ObjectWrite(
		context.Context,
		object.Object,
	) (*object.Object, error)
	// ObjectQuery queries zero or more Objects of a specified kind or
	// kindversion from persistent storage.
	ObjectQuery(
		context.Context,
		api.KindVersionName,
		query.Expression,
		...query.Option,
	) (*query.Result[*object.Object], error)
}

Driver is the primary interface that rxp backends implement.

Directories

Path Synopsis
api
run
testing module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL