For clusters of computers, or widely distributed applications, UUIDs are better.
</para>
<para>
The functions that can return a UUID are: <code>uuid()</code>, <code>uuid.bin()</code>, <code>uuid.str()</code>.
The functions that can convert between different types of UUID are: <code>:bin()</code>, <code>:str()</code>, <code>uuid.fromstr()</code>, <code>uuid.frombin()</code>.
The function that can determine whether a UUID is an all-zero value is: <code>:isnil()</code>.
</para>
<variablelistxml:id="x-uuid"xreflabel="x-uuid">
<varlistentry>
<term>
<emphasisrole="lua">uuid()</emphasis>
</term>
<listitem>
<para>
Returns: a UUID with type = cdata.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasisrole="lua">uuid.bin()</emphasis>
</term>
<listitem>
<para>
Returns: a 128-bit (16-byte) unique id in binary form.
Returns: a UUID with type = 16-byte binary string.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasisrole="lua">uuid.str()</emphasis>
</term>
<listitem>
<para>
Possible errors: The server tries to load the <emphasis>libuuid</emphasis> library
when it starts. If the library is not available, which can happen if it was not
found when the server was built from source, then uuid.bin() returns an error.
Parameters: byte-order can be 'l' (little-endian), 'b' (big-endian), 'h' (endianness depends on host) (default), or 'n' (endiannes depends on network).
</para>
<para>
Returns: UUID with type = 16-byte binary string converted from cdata input value.