LDS 3.0 is in development

A time machine for your documents and the links between them

Linked Data Store (LDS) keeps every version of every document, each valid from its own time. Read any instant, past, present or future, and every document comes back as it was then, with its links followed to the same instant.

Get startedRead the concepts

The time machineThe document Company/fjord has three versions: Fjord Fish from 2020, Fjord Seafood from 2023 and Fjord Group from 2030. A read moves along the timeline. At 2019 it finds nothing, at 2021 Fjord Fish, at 2024 Fjord Seafood, and at 2031 Fjord Group.GET /ns/Company/fjord?timestamp=2019-06-01T00:00:00Z404 Not FoundGET /ns/Company/fjord?timestamp=2021-06-01T00:00:00Z{"name": "Fjord Fish"}GET /ns/Company/fjord?timestamp=2024-06-01T00:00:00Z{"name": "Fjord Seafood"}GET /ns/Company/fjord?timestamp=2031-06-01T00:00:00Z{"name": "Fjord Group"}the versions of Company/fjord, each valid from its own timeFjord FishFjord SeafoodFjord Group20192021202320252027202920312033
Company/fjord has three versions. A read at each instant gets the version valid then, or nothing before the first.

The problem

Most stores keep the present state of their data. When a record changes, the value before it is gone, and a question such as "where did this person live on 1 June 2021" needs an audit table, a copy of the database or a history put together afterwards. Data that refers to other data makes it harder still: a reference has to mean the version that was valid at the time asked about.

The time machine

Every write adds a version of a document, and the version holds from its valid time: the time given with the write, in the past, the present or the future, or else the time LDS receives it. A version holds until the next one begins.

A read at an instant is an as-of read: it gives the document as it was then, or nothing before its first version. Read a whole namespace at one instant and you have a snapshot: every document at its version valid then, and every link resolved then. A delete is a version too: the document is not there from that time until its next version. Concepts

What a document is made of

A document is a JSON object of an entity type of the model, at an address such as /ns/Person/ola. A field holds a value, an embedded object that is part of the document and versioned with it, or a link to another document. A link is the address of that document, /Company/nordlys, which has versions of its own. A read follows it to the version that was valid at the same instant. The model

What a document is made ofThe document Person/ola holds a name, an embedded address that is part of it, and a field employer that links to another document. Its first version, from 2020, is in Bergen with the employer Company/nordlys; its second, from 2023, in Oslo with Company/acme. Nordlys has a version from 2021 and is deleted from 2025. A read at an instant follows the link to the other document as it was at the same instant: in June 2020 Nordlys has no version yet and the employer is null, in June 2022 it is Nordlys, in June 2024 it is Acme.Person/olaname: "Ola"address:city: "Bergen"employer: "/Company/nordlys"city: "Bergen"employer: "/Company/nordlys"city: "Oslo"employer: "/Company/acme"Company/nordlysno version yet → nullCompany/nordlysname: "Nordlys"Company/acmename: "Acme"a link: another document, readat the same instantthe address is embedded: part of ola, versioned with itolaBergenOslonordlysNordlysdeletedacmeAcme20192021202320252027202920312033as of 2020-06as of 2022-06as of 2024-06
Person/ola holds an embedded address and a link to a company. A read at each instant gives ola as it was then, and follows the link to the company as it was at the same instant.

How it works

A model, read at start

You describe the entity types as a GraphQL schema or as JSON Schema 2020-12 files. LDS makes its REST addresses and its GraphQL schema from the model, and checks every document against it before the document is written. The model

A write is a saga

The transaction log is written first, then the store and the search index side by side. Each step is recorded in a saga log, and a write that did not complete, because a step failed or LDS stopped, is run again from it later. The write path

Storage you choose

Documents are kept in memory, in PostgreSQL 18 or in Neo4j 2026, and searched with Solr 10. Every persistence provider passes the same suite of tests against the real engine. Architecture

See it

Read Company/fjord as of 1 June 2021:

Shell
curl 'http://localhost:9090/ns/Company/fjord?timestamp=2021-06-01T00:00:00Z'
JSON
{"name": "Fjord Fish"}

Without timestamp the same address gives the version valid now, and ?timeline lists every version with its valid time. Getting started runs a session like it from the start.

When it fits

LDS fits when the history of the data is part of the data: registers, master data and reference data that change over time and are read as they were, and models whose documents link to each other.

It does not fit, as it is today, when:

  • you need a released product: nothing is released yet;
  • you need to know when a version was recorded as well as when it holds: LDS keeps valid time only and is not bitemporal, and a version written again at the same valid time replaces the one before;
  • you need a write to be refused when its link points at nothing: links are not checked when written.

Status

LDS 3.0 is in development. Nothing is released yet: it is built from the repository on JDK 27. What is unfinished is said in the documentation where a reader meets it, in a paragraph that starts with "Not finished:".