[Mailman-Developers] User id - integer or UUID?
Barry Warsaw
barry at list.org
Tue Feb 10 04:06:19 CET 2015
On Feb 02, 2015, at 10:04 AM, Andrew Stuart wrote:
>The other possibility, distasteful as it may be, is to make the changes to
>publish the UUID to the REST API and deprecate the use of the user_id as
>integer. I suggest this because others who come after me will have the same
>question and may run into the same issues as I have in trying to work out a
>“broadly compatible” way of handling/storing integers. They’ll probably come
>up with their own solution - perhaps to store user ID’s as a variety of
>integer types/lengths - perhaps to convert to UUID - perhaps to store
>integer-as-string, and the question might be raised again.
>
>Short term pain now to move to UUID and deprecate user_id as integer,
>possibly longer term gain with clarity that a user_id is a UUID.
I'm not sure we have a lot of options, given that JSON doesn't support UUIDs
natively (IIUC) and Python's UUID objects have only these fields:
https://docs.python.org/3/library/uuid.html
Is a 32-character hex string better than a 128-bit integer? Does a urn string
provide any benefit? 16-bytes doesn't seem helpful given that it would have
to be encoded anyway.
Cheers,
-Barry
More information about the Mailman-Developers
mailing list