juddi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Hablutzel" <...@hablutzel.com>
Subject RE: [jUDDI-developers] JavaUUIDGen
Date Wed, 23 Jan 2002 05:44:05 GMT
Maarten -

    The basic idea was to use a system resource that imposes locking
semantics, since Java doesn't provide direct access to low-level system-wide
locking constructs. So, for example, a TCP/IP port can only be bound by one
thread of execution at once; a file can atomically be created if it didn't
exist, and so forth.
    The implementation I was working on used server sockets as the locking
mechanism. It looks something like this:

	obtain lock:		ServerSocket lock = new ServerSocket( 8090 );
      release lock:           lock.close(); lock = null;

    So far, it's worked on both NT and Linux; I can test it under Solaris in
a day or so. Interestingly, the latency isn't bad at all. I was worried
about the reopen time-out of TCP ports, but that seems to only apply only if
you actually accept connections. Since the lock only requires a bind (which
is system-wide locking), you can obtain pretty good lock performance.

    Let me know if you want me to code this up further, or if you have any
other comments.

take care,


-----Original Message-----
From: juddi-developers-admin@lists.sourceforge.net
[mailto:juddi-developers-admin@lists.sourceforge.net]On Behalf Of
Maarten Coene
Sent: Wednesday, January 23, 2002 3:29 AM
To: Bob Hablutzel; juddi-developers@lists.sourceforge.net
Subject: RE: [jUDDI-developers] JavaUUIDGen

sounds interesting, and it seems a good idea since you'll probably get 2
equal UUIDs when you call the nextUUID() method at the same time twice on
the same node (since the time and the ethernet address are the same)


At 20:15 22/01/2002 -0500, you wrote:
>Maarten - I was just starting to look at putting in place a global locking
>mechanism to ensure that you never got duplicate UUIDs on a node. If you
>want to talk about the idea I had, it would be pretty quick to implement -
>drop me a note.

Maarten Coene
Katholieke Universiteit Leuven
Dept. Computerwetenschappen             Tel: ++32 (0)16/32 78 25
Celestijnenlaan 200A
B-3001 Heverlee

juddi-developers mailing list

View raw message