![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Creating create mirrored disk files systems using mkfs command | GLJ@USC | UNIX for Dummies Questions & Answers | 4 | 11-07-2006 01:52 PM |
| Grid vs. Parallel vs. Distributed | Heathe_Kyle | High Performance Computing | 2 | 10-30-2006 12:23 PM |
| creating unique lists from user input | annie | Shell Programming and Scripting | 1 | 11-20-2005 01:22 AM |
| Creating user ids on multiple systems simultaneously | darthur | UNIX for Dummies Questions & Answers | 1 | 08-07-2003 03:22 PM |
| Distributed | veitcha | UNIX for Dummies Questions & Answers | 3 | 11-06-2000 09:58 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 |
|
||||
|
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. |
|
||||
|
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
Maybye generate /etc/unique_id from the mac address then just use the file thereafter? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|