Thank You Geert.
We will go through your library as well. Regards Abhinav ________________________________ From: general-boun...@developer.marklogic.com <general-boun...@developer.marklogic.com> on behalf of Geert Josten <geert.jos...@marklogic.com> Sent: Tuesday, February 13, 2018 9:53 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Unique GUID generation in MarkLogic Hi Abhinav, sem:uuid-string() generates a 123-bit size random string, which makes changes on collisions extremely rare. If you prefer being paranoid, and want to check anyhow (there are various ways tocheck if an id or uri is taken or not), you’d typically do that in one database only. You could also do it across multiple databases, but the more you check and include, the slower it obviously gets. There are some brief notes on this topic in the README of my ml-unique library: https://github.com/grtjn/ml-unique [https://avatars2.githubusercontent.com/u/611397?s=400&v=4]<https://github.com/grtjn/ml-unique> GitHub - grtjn/ml-unique: MarkLogic library for generating ...<https://github.com/grtjn/ml-unique> github.com ml-unique - MarkLogic library for generating unique database URIs and IDs Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "abhinav.mish...@cognizant.com<mailto:abhinav.mish...@cognizant.com>" <abhinav.mish...@cognizant.com<mailto:abhinav.mish...@cognizant.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Tuesday, February 13, 2018 at 9:39 AM To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: Re: [MarkLogic Dev General] Unique GUID generation in MarkLogic Hi Geert, Thank you for your response. I guess it is just something we are wondering about. If we changed Servers or hardware, would there be a chance for duplicates. There is no other specific reason though. Regards, Abhinav ________________________________ From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of Geert Josten <geert.jos...@marklogic.com<mailto:geert.jos...@marklogic.com>> Sent: Tuesday, February 13, 2018 8:55 AM To: MarkLogic Developer Discussion; general-requ...@developer.marklogic.com<mailto:general-requ...@developer.marklogic.com> Subject: Re: [MarkLogic Dev General] Unique GUID generation in MarkLogic Hi Abhinav, Can you elaborate on what you mean with ‘unique across environments’? Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of abhinav mishra <abhinavmishr...@gmail.com<mailto:abhinavmishr...@gmail.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Tuesday, February 13, 2018 at 8:40 AM To: "general-requ...@developer.marklogic.com<mailto:general-requ...@developer.marklogic.com>" <general-requ...@developer.marklogic.com<mailto:general-requ...@developer.marklogic.com>>, "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: [MarkLogic Dev General] Unique GUID generation in MarkLogic Hi All, We are exploring ways to generate GUIDs. We just want to be sure that the GUIDs are unique always and we have a requirement that these GUIDs should be even unique across environments. There should not be same GUID in two MarkLogic environments We found sem:uuid-string() function from documentation and seems like a good point to start with. However we are not sure if this method returns unique across environments. Can someone guide or provide more information on GUID generation, any third party open source library which we can use. Regards, Abhinav -- Sent from my iPhone This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general