Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] uuid generation (was Re: Scope of namespaces)

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Steve Loughran <steve.loughran AT gmail.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] uuid generation (was Re: Scope of namespaces)
  • Date: Tue, 7 Feb 2006 20:12:48 +0000

On 2/7/06, Nils Kilden-Pedersen <nilskp AT gmail.com> wrote:
> On 2/7/06, Steve Loughran <steve.loughran AT gmail.com> wrote:
> >
> > Look at the source: Its serialized. if you have one thread creating
> > many uuids, you dont take a hit, but if you have many threads, then
> > you go at the rate of the slowest.
> >
>
> Where do you see this serialization?

The serialisation is in the generation of random nos from the feed.

The static generator uses a shared random number generator, of type
SecureRandom. If you follow its code:

synchronized public void nextBytes(byte[] bytes) {
...
}

As that hands off to whatever secure number source you have
underneath, depending on the service provider it could be quick or as
long as it takes for your neutrino detector to react to the background
neutrino flux (*)

I rest my case.

As to whether it is a perf hit, the answer there is "it depends". I
know some of the Axis addons (WS-RM for reliable messaging?) had a
perf bottleneck that was related to generating unique message IDs, but
I dont know which UUID generator they used. I think the fix there was
to create the IDs in advance; every thread has a spare UUID for the
next message, after one has been sent it gets regenerated in the idle
time you have waiting for the response.

-steve

(*) very off topic: not recommended as a secure source, as any on the
planet with a significantly large neutrino source could point it at
your detector and manipulate the results. The Cern physicists at the
WA-141 were always plotting to pulse the month blanc tunnel detector,
a mere 50 miles away, to see how their colleagues would react to an
apparently modulated signal.




Archive powered by MHonArc 2.6.24.

Top of Page