in reply to Generate a unique ID
If you have a RDBMS nearby, delegate the problem to the database. Create a sequence and fetch a value from it for each running instance. Sure, it looks like overkill, but all major RDBMS have solved all of those nasty litte problems (like parallel access from several systems, atomic updates of the sequence value, running on multiple CPUs in parallel, locking ...).
Actually, I wonder why you would need that unique ID outside a database.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Generate a unique ID
by BrowserUk (Patriarch) on Nov 15, 2010 at 16:13 UTC | |
by zwon (Abbot) on Nov 15, 2010 at 17:18 UTC | |
by dHarry (Abbot) on Nov 15, 2010 at 16:42 UTC | |
by BrowserUk (Patriarch) on Nov 15, 2010 at 17:25 UTC |