Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex identity #651

Open
Konard opened this issue Oct 23, 2022 · 0 comments
Open

Complex identity #651

Konard opened this issue Oct 23, 2022 · 0 comments

Comments

@Konard
Copy link
Owner

Konard commented Oct 23, 2022

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant