clearified UUID

This commit is contained in:
Jeena Paradies 2011-05-12 20:57:34 +02:00
parent 0d4d02376e
commit 277677ea4b

View file

@ -2949,9 +2949,9 @@ Inside the GGS everything needs a unique identifier.
When players communicate amongst each other or with tables, they need to When players communicate amongst each other or with tables, they need to
be able to uniquely identify all of these resources. be able to uniquely identify all of these resources.
Within one machine, this is mostly not a problem. Within one machine, this is mostly not a problem.
A simple system with a counter can be imagined, where each request for A simple systems a counter can be imagined, where each request for a new
a new ID increments the previous identifier and returns the new identifier ID increments the previous identifier and returns the new identifier based
based on the old one; see algorithm on the old one; see algorithm
\begin_inset CommandInset ref \begin_inset CommandInset ref
LatexCommand ref LatexCommand ref
reference "alg:A-simple-generator" reference "alg:A-simple-generator"
@ -2974,8 +2974,8 @@ reference "alg:A-simple-generator"
\begin_layout Standard \begin_layout Standard
The obvious solution to this problem is to ensure mutual exclusion by using The obvious solution to this problem is to ensure mutual exclusion by using
some sort of a lock, which may work well in many concurrent systems. some sort of a lock, which may work well in many concurrent systems.
In a distributed system, like the GGS, this lock, along with the state, In a distributed system like the GGS however, this lock, along with the
would have to be distributed. state, would have to be distributed.
If the lock is not distributed, no guaranties can be made that two nodes If the lock is not distributed, no guaranties can be made that two nodes
in the distributed system do not generate the same identifier. in the distributed system do not generate the same identifier.
\end_layout \end_layout
@ -3029,31 +3029,19 @@ Ds generated until 3400 A.D.
\begin_layout Standard \begin_layout Standard
The generation of a UUID is accomplished by gathering several different The generation of a UUID is accomplished by gathering several different
sources of information, such as: time, MAC addresses of network cards, sources of information, such as: time, MAC addresses of network cards;
and operating system data, such as percentage of memory in use, mouse cursor and operating system data such as; percentage of memory in use, mouse cursor
position and process IDs. position and process IDs.
The gathered data is then The gathered data is then
\emph on \emph on
hashed hashed
\emph default \emph default
using an algorithm such as SHA-1.
\begin_inset space ~
\end_inset
using an algorithm such as SHA-1.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
When using system wide unique identifiers, such as the ones generated by When using system wide unique identifiers it is extremly unlikely to have
algorithm identifier collisions when recovering from network splits between GGS clusters.
\begin_inset CommandInset ref
LatexCommand ref
reference "alg:A-simple-generator"
\end_inset
with mutual exclusion, it is extremly unlikely to have identifier collisions
when recovering from network splits between the GGS clusters.
Consider figure Consider figure
\begin_inset CommandInset ref \begin_inset CommandInset ref
LatexCommand ref LatexCommand ref
@ -3082,7 +3070,7 @@ reference "alg:A-simple-generator"
\end_inset \end_inset
, even when mutual system-wide exclusion is implemented. , even when mutual system-wide exclusion was implemented.
This is exactly the problem UUIDs solve. This is exactly the problem UUIDs solve.
\begin_inset ERT \begin_inset ERT
status open status open
@ -3148,20 +3136,6 @@ end{centering}
\end_inset \end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Note Note
status open
\begin_layout Plain Layout
Add clients on each side, and replace the cloud with pole-landlines being
cut by a pair of scissors
\end_layout
\end_inset
\end_layout \end_layout
\begin_layout Plain Layout \begin_layout Plain Layout