Konard / LinksPlatform

Holistic system for storage and transformation of information based on associative model of data. Целостная система для хранения и обработки информации, основанная на ассоциативной модели данных.
https://linksplatform.github.io/Documentation/
GNU Lesser General Public License v3.0
57 stars 8 forks source link

Complex identity #651

Open Konard opened 1 year ago

Konard commented 1 year ago

There are simple identity examples, like integer identifiers. Complex identity can consist of multiple values. In distributed systems node can mean either a server or a client.

Sync identities

These identities require server to handle generation of new identities, for example sequence in PostgreSQL can be used to generate sync identities for tables.

In distributed system there may be identity server that generates identities for the entire data cluster.

These identities can be:

  1. Single integer number of an object in the system.
  2. Single timestamp of the moment of an object in the system.
  3. Timestamp and additional integer number that represents the ordinal number of the object that is created at the same moment.
  4. Timestamp and random integer number that represents unique number of the object.

Async identities

In some special cases it is possible to generate identities at the same time on different standalone nodes in the network.

For example sufficiently large random numbers can represent objects in the system, and there will be a very little chance of getting the same number on different nodes. Hardware implemented real random numbers are recommended.

These identities can be:

  1. Single large random number that represents an object.
  2. A number of a node combined with a number of an object.
  3. A number of a node, timestamp and an ordinal number of an object created at the same node and with the same timestamp.
  4. A number of a node, timestamp and a random number that represents unique number of the object.

Partially synchronized identities

Instead of sharing generation of id of an object it is possible to share generation of id of the node in network. So the server that generates identities is required for node identities, which are generated less frequently than regular objects.

These identities can be:

  1. A number of a node combined with a number of an object.
  2. A number of a node combined with a random number representing an object.
  3. A number of a node, timestamp and an ordinal number of an object created at the same node and with the same timestamp.
  4. A number of a node, timestamp and a random number that represents unique number of the object.