Creating a Unique ID on distributed systems


 
Thread Tools Search this Thread
Top Forums Programming Creating a Unique ID on distributed systems
# 1  
Old 05-03-2006
Creating a Unique ID on distributed systems

Hi,

How do you actually create a unique ID on a distributed system. I looked at gethostid but the man page says that its not guaranteed to be unique. Also using the IP address does not seem to be a feasible solution. Is there a function call or mechanism by which this is possible when even the time is not synchronized using NTP ?

Thanks
# 2  
Old 05-03-2006
Whan you install the system, create a file called /etc/unique_id and put a unique_id in it. Then you just read that file. I don't know why you think that time has anything to do with this, but yes, this technique is possible even when the time is not synchronized using NTP.
# 3  
Old 05-09-2006
If you have access to a database, such as Oracle, you may find this useful. However, that would of course cause all the processes using said unique ID to potentially block each another up. There are ways around that too, pre-fetching UIDs etc.

The other way, as Pederabo said, is to assign each distributed machine some machine ID. Then as it feeds transactions (or whatever needs to be uniquely identified) it can prepend/append its unique ID to a machine independant unique ID.
# 4  
Old 05-09-2006
use your ip address + local time + a huge random number to generate a Unique ID

many programs use this kind of technology.
# 5  
Old 05-10-2006
Why not use your network card's mac address? That's a big very-unique number that comes with your PC. The only caveat would be, upgrade your network card and it changes Smilie Maybye generate /etc/unique_id from the mac address then just use the file thereafter?
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Linux

Creating file systems (LVM v Multipath)

Hi all I have a system running: uname -o GNU/Linux that has already some file systems created: df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_outsystemdb-lv_root 50G 2.7G 45G 6% / tmpfs 28G 72K 28G 1%... (5 Replies)
Discussion started by: fretagi
5 Replies

2. Shell Programming and Scripting

Identifying dupes within a database and creating unique sub-sets

Hello, I have a database of name variants with the following structure: variant=variant=variant The number of variants can be as many as thirty to forty. Since the database is quite large (at present around 60,000 lines) duplicate sets of variants creep in. Thus John=Johann=Jon and... (2 Replies)
Discussion started by: gimley
2 Replies

3. Shell Programming and Scripting

Creating array with non-duplicate / unique elements in ksh

Hi all, I have created 3 arrays which can have common elements in each like- arr_a contains str1 str2 str3 str4 str5 arr_b contains str3 str6 str7 str1 str8 arr_c contains str4 str9 str10 str2 each array is created with "set -A arr_name values" command. I want to create a resultant array-say... (1 Reply)
Discussion started by: sanzee007
1 Replies

4. Shell Programming and Scripting

Creating unique mapping from multiple mapping

Hello, I do not know if this is the right title to use. I have a large dictionary database which has the following structure: where a b c d e are in English and p q r s t are in a target language., the two separated by the delimiter =. What I am looking for is a perl script which will take... (5 Replies)
Discussion started by: gimley
5 Replies

5. Shell Programming and Scripting

Change unique file names into new unique filenames

I have 84 files with the following names splitseqs.1, spliseqs.2 etc. and I want to change the .number to a unique filename. E.g. change splitseqs.1 into splitseqs.7114_1#24 and change spliseqs.2 into splitseqs.7067_2#4 So all the current file names are unique, so are the new file names.... (1 Reply)
Discussion started by: avonm
1 Replies

6. UNIX for Dummies Questions & Answers

Creating create mirrored disk files systems using mkfs command

What is the correct mkfs syntax to create mirrored disk files systems? I need to make the file system 20gb. For example: machine# mkfs -F ufs /dev/md/dsk/d40 size not specified ufs usage: mkfs special size(sectors) \ -m : dump fs cmd line used to make this partition -V : print this... (4 Replies)
Discussion started by: GLJ@USC
4 Replies

7. Shell Programming and Scripting

creating unique lists from user input

hi all, I'm trying to resolve a scenario where we prompt the user to enter 1 or more disk names. From there we would run a command on each disk which would give its location. This would allow us to create a list of disks at location A, a list of disks at location B,....etc... Any help... (1 Reply)
Discussion started by: annie
1 Replies

8. UNIX for Dummies Questions & Answers

Creating user ids on multiple systems simultaneously

I am trying to think of a way to create user ids on multiple Linux systems in one fell swoop without logging onto each system indivually. Is there a way to do this with ssh commands? I don't want to use NIS/LDAP solution just a simple shell script utilitarian methodoloy would suffice. Also, I am... (1 Reply)
Discussion started by: darthur
1 Replies
Login or Register to Ask a Question