Namespace on Datanodes

The Datanode is the underlying data type that hold the data of most higher level data types in RealEquity.

As RealEquity is build as a highly configurable platform, there is no one-to-one relationship between a given data type (e.g. a Request) and an underlying database table designed specifically for that data type. Rather, data structures of different types are persisted as JSON documents into a flexible no-SQL storage layer.

When a data structure is created, read, updated, or deleted, it’s the inherited core plumbing from the Datanode that describes, amongst other things, the identity (property “id”, type of guid) and higher level data type (property “namespace”, type of string) of the data structure. The higher level data type of the data structure determines how it’s validated, retrieved, and presented.

For example, let’s look at creating a new Contact Person Actor. A Contact Person is a type of Actor and an Actor is a Datanode.

{
  "namespace": "dk.realequity.actor.contact.person",
  "firstName": "John",
  "lastName": "Doe",
  "displayName": "John Doe"
}

Without the namespace property specified in the JSON payload above, RealEquity wouldn’t know what data type the data structure that the object in the payload was intended to represent, and against which rules to validate it’s contents.

Furthermore, the system wouldn’t be able to retrieve and present it afterwards, because the data structure would - figuratively speaking - fall through the sieves of it’s queries. Fortunately, we have validations in place to prevent the creation of Datanodes without Namespaces. The real risk is creation of Datanodes with incorrect Namespaces.