Dictionary

The following list contains definitions specific for ThingsDB:

Keyword Definition
Collection The collection is the root thing. Every collection has its own scope.
Closure A Closure is a user defined method which can be saved. It can be used as a prepared piece of code or to consume items from a thing, list, tuple or set.
Event ThingsDB creates an event when a query modifies something. Events are applied in order by each node to guarantee consistency.
Function Function in ThingsDB means a built in function. A function needs the exact number of arguments that is expected, which is different for a closure or procedure.
Node Node is the process running ThingsDB. ThingsDB can work with a single node but is designed to work with multiple nodes. Running on at least three nodes brings redundancy and ensures the database stays operational.
Procedure A procedure in ThingsDB is a named closure that is attached to a scope (@thingsdb or @collection) and available to use in an API call.
Scope When sending a query, calling a procedure or subscribing to a thing, the request will require you to provide a scope. ThingsDB has three scope categories: @thingsdb, @node and @collection.
Thing A thing is an object to which properties can be assigned.
Quorum ThingsDB ensures consistency across multiple nodes. This is achieved by events. Events get an ID which are in applied order. Before a node can assign an ID to an event, it needs approval of the majority of the existing nodes. Once a node has connected to the others, it takes part in the quorum. If a node goes down it still gets accounted for, but will negatively influence the quorum as it cannot respond. When a node is deleted it does not take part in the quorum anymore.
Zone When a node is in “away” mode, queries to a collection or ThingsDB scope will be forwarded to another node. If zones are configured, the node will first try a node within the same zone; only if no other node in the same zone is available, another node in another zone will be used.