Bhaskar
Just as a matter of interest, is this approach significantly faster
than a Mumps code loop that calls $r 31 times and constructs a UUID
string from the results?
Rob
On 19 May, 16:17, "K.S. Bhaskar" <
ks.bhas...@fisglobal.com> wrote:
> The only difference between a UUID and a 16-byte random number is the added formatting. If you want to get UUID in large volumes, just call out to standard library function or read /dev/random or /dev/urandom. [Caution, /dev/random on Linux is a true random number, and you can suck all the entropy out of a system unless you provide an entropy source such as an Entropy Key.]
> Since it is unlikely that VistA needs UUIDs in large quantities, my suggestion is simply to read from /proc/sys/kernel/random/uuid:GTM>set uuid="/proc/sys/kernel/random/uuid"
> GTM>for i=1:1:3 open uuid:readonly use uuid read x use $principal close uuid write x,!
> 446943e2-2349-4ffb-9944-087334f06642
> f117d430-ce59-41e5-b1d0-fde4f5ad208f
> 13c68c57-903c-41d1-b296-a7c6323594ef
> GTM>
> Note that you have to open and close it each time you need a UUID. The beauty of this approach is that VistA provides a way to package IO devices so that they can be presented to applications in a portable way across MUMPS implementations.
> Also of interest is /proc/sys/kernel/random/boot_id - every time Linux boots, it puts a new UUID and this provides a convenient way to identify "sessions".
> -- BhaskarGT.M - Rock solid. Lightning fast. Secure. No compromises.
> On 05/19/2010 09:59 AM, Ben Mehling wrote:
>
> On Wed, May 19, 2010 at 6:55 AM, JohnLeo Zimmer<
johnl...@gmail.com>wrote:
> > GTM> zsystem "uuidgen"
> > 1cf62d3b-4792-474d-98eb-e858317ce63a
> Just a note -- as previously discussed, anything that calls a GT.M or
> Cache specific method should be appropriately wrapped to abstract the
> platform.
> - Ben
> --
http://groups.google.com/group/Hardhats
> To unsubscribe, send email
toHardhats+...@googlegroups.com
>
> _____________
> The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
> _____________
>
>
>
>
>
> --
http://groups.google.com/group/Hardhats