Core models

Box Core models

TwiceDB client libraries provide a set of core models that form the foundation of your bitemporal application, helping you to build more, faster.

Client

A Client provides read and write access to TwiceDB. It also handles authentication, service discovery, and basic reconnection and retransmission. Officially supported clients are available for Go and for Java.

Indexable

An Indexable is a self-contained object such as a class that has its own independent lifecycle. TwiceDB client libraries provide ways to index properties and methods of Indexables so that they can be retrieved quickly later.

Every Indexable has an ObjectId that is unique across the database. The ObjectId may be assigned by the user, or the client libraries can automatically generate one.

Indexables are commonly referred to by their Fqn, or fully qualified name.

Individual Indexables may be written by an application in one language and read by an application in another language.

All Indexables are bitemporal.

Equality

Two Indexables compare equal if they have the same ObjectId, and they were resolved at the same TemporalCoordinates.

Transaction

A Transaction is a group of writes that are all assigned the same tt and that all succeed or all fail. Each write may have the same or a different vt.

A Transaction is a monotemporal construct–it happens at a tt.

Event

An Event is a label for a Transaction and cannot be persisted outside of a Transaction. Besides providing metadata, an Event provides access to all of the Indexables written during the Transaction.

Every Event has an EventId that is unique across the database. The EventId may be assigned by the user, or the client libraries can automatically generate one.

As part of a Transaction, an Event is monotemporal–it happens at the tt of the Transaction to which it belongs.

Equality

Two Events compare equal if they have the same EventId and the same Tt.

Entitlement

An Entitlement is a set of access permissions for (User, Fqn), where User is identified by the Client's certificate used to connect to TwiceDB. An Entitlement provides read, write, and/or entitle (add entitlements to) access.

All Entitlements are bitemporal.

See Entitlements for more.

Copyright © 2024 TwiceDB TwiceDB