Unique key generation on a network
-
Looking for a way to generate unique keys on clients in a network. Currently its done via a request to a server which assigns the keys, but want to move to a system where the client assigns them, to take a load of the server, and to allow for a redesign. Its a controled network. Looked at GUID's but I'm not satified with the size of the key, and the potential time in creating something so bulky. Anyone had a similar problem. Thought about a hybrid where a client can request a group of keys in advance as well. Any ideas welcome. The reason is that the request latency can be reduced in half by using a client generated key, which is useful, as instead of doing 2 things in sequence, they can then be done in paralel. The first server request does need the key (but does assign the key), and the second needs the key, but lives on a number of different servers. Server aggregation is not an option.
-
Looking for a way to generate unique keys on clients in a network. Currently its done via a request to a server which assigns the keys, but want to move to a system where the client assigns them, to take a load of the server, and to allow for a redesign. Its a controled network. Looked at GUID's but I'm not satified with the size of the key, and the potential time in creating something so bulky. Anyone had a similar problem. Thought about a hybrid where a client can request a group of keys in advance as well. Any ideas welcome. The reason is that the request latency can be reduced in half by using a client generated key, which is useful, as instead of doing 2 things in sequence, they can then be done in paralel. The first server request does need the key (but does assign the key), and the second needs the key, but lives on a number of different servers. Server aggregation is not an option.
Hi The 'pattern' here is choosing whether to have; a) unique ids generated by a central authority (and relative to itself) - eg. having an autoincrement id in a database table, or similar - or... b) generate unique ids that are absolute (using UuidCreate/UuidCreatSequential) - can be created anywhere and doesn't require contacting an authority Option a) in a distributed environment not only introduces a bottle-neck (consider many clients asking for ids, or even ranges thereof, at the same time), but also in terms of performance cannot compete with client local GUID generation (network time typically cannot compete with local CPU/HW time). Unless the GUID generation causes a technical barrier, or you require ids with predictable values, I suggest you use it. Also, you might want to design it such that you can afford to start using GUIDs now, and capitalise on this known, proven feature in your implementation, and at a later stage, if you still find the performance or size of the ids too large, change it to something bespoke without compromising the design. In other words, ids are opaque and of variable size. HTH Martin
-
Hi The 'pattern' here is choosing whether to have; a) unique ids generated by a central authority (and relative to itself) - eg. having an autoincrement id in a database table, or similar - or... b) generate unique ids that are absolute (using UuidCreate/UuidCreatSequential) - can be created anywhere and doesn't require contacting an authority Option a) in a distributed environment not only introduces a bottle-neck (consider many clients asking for ids, or even ranges thereof, at the same time), but also in terms of performance cannot compete with client local GUID generation (network time typically cannot compete with local CPU/HW time). Unless the GUID generation causes a technical barrier, or you require ids with predictable values, I suggest you use it. Also, you might want to design it such that you can afford to start using GUIDs now, and capitalise on this known, proven feature in your implementation, and at a later stage, if you still find the performance or size of the ids too large, change it to something bespoke without compromising the design. In other words, ids are opaque and of variable size. HTH Martin
-
Do you know of any platform indepedent versions of UuidCreate & UuidCreatSequential? Would need to work in a consitent manner across, Windows, Linux & Solaris.
No, Sorry