1997Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: Greetings. :) -->
<!--X-From-R13: "Eunja Vnycraal" <efuNqbf.abegry.pbz> -->
<!--X-Date: from babe.globecomm.net [207.51.48.8] by mx01.ca.us.ibm.net id 860594927.183949&#45;1 Wed Apr  9 14:08:47 1997 -->
<!--X-Message-Id: 9704091008.ZM224@sun38 -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199704090355.DAA246684#out1,ibm.net -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: Greetings. :)</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:rsh#dos,nortel.com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00058.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00060.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00058.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00060.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00059">Author</A>
&nbsp;|&nbsp;<A HREF="#00059">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00059">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: Greetings. :)</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: Greetings. :)</LI>
<LI><em>From</em>: "Shawn Halpenny" &lt;<A HREF="mailto:rsh#dos,nortel.com">rsh#dos,nortel.com</A>&gt;</LI>
<LI><em>Date</em>: Wed, 9 Apr 1997 10:08:50 -0400</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:malachai#iname,com">malachai#iname,com</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Apr 8,  8:47pm, Jeff Kesselman wrote:
&gt; Subject: Re: Greetings. :)
&gt; At 01:44 PM 4/8/97 -0400, you wrote:
&gt; &gt;On Apr 6,  8:23am, coder#ibm,net wrote:
&gt; &gt;
&gt; &gt;[ stuff about JCL's DB snipped ]
&gt; &gt;
&gt; &gt;&gt; This is probably better understood from the inside oot, rather than trying
&gt; &gt;&gt; to look at the server side:
&gt; &gt;&gt;
&gt; &gt;&gt;   Everything is an object.
&gt; &gt;&gt;   Objects are defined in a database.
&gt; &gt;&gt;   Objects have Unique IDs.
&gt; &gt;
&gt; &gt;I've been kicking this unique ID/object around as well, and was
&gt; &gt;wondering about how you generate them?  I haven't been able to find
&gt; &gt;any algorithms that would generate a unique ID given an object (or a
&gt; &gt;request to do so) without having to search the list of ID's already
&gt; &gt;generated.  I don't know for sure if that last bit is possible, but I
&gt; &gt;want things to still be speedy when the number of objects is large
&gt; &gt;(2^31).  I had an idea to keep track of the next available ID, and
&gt; &gt;each time an object was created, assign it that value, then bump the
&gt; &gt;value.  Whenever an object is destroyed, keep track of the last 'n'
&gt; &gt;(where n is something fairly small and manageable like 100) now-free
&gt; &gt;IDs and if you wrap your next-ID counter, pull them out of the list of
&gt; &gt;freed IDs.  If the list runs empty, you have to search, though.
&gt; &gt;There's optimization to be done in that, but that's the gist.
&gt; &gt;
&gt; &gt;Any magical algorithms? :)
&gt;
&gt; Hmm.... cold does this integrally. I uspsect it just keeps an efficeintly
&gt; searched list. How abotu this....
&gt;
&gt; A "highest allocetd" counter and a list of available (freed) numbers.
&gt; Yo uuse the first on the free list unless the lsit is empty in which case
&gt; you bump the "highest' number and use that?
&gt;
&gt; Just some thoughts.
&gt;
&gt; JK

Actually, on my drive home from work yesterday, I had somewhat of an
epiphany regarding the unique IDs (Cynbe had also pointed out a very
similar scheme to me this morning):

- I've got a system clock that will be churning out unique values from now
until sometime in January 2038, so when I create an object, I should be
able to just snag the current time (with a granularity of probably
microseconds) and use that as the object's ID.  I suppose it wouldn't hurt
to save the most-recent-ID so that if there is a burp with the system
clock, I can ensure that I can restart the ID generation again at a proper
place (i.e. any time after my last ID).

That almost seems too easy and I can't help but think I've missed
something...

--
Shawn Halpenny


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00058.html">Re: Greetings. :)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00060.html">Re: Greetings. :)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00058.html">Re: Greetings. :)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00060.html">Re: Greetings. :)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00059"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00059"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: Greetings. :)</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00054" HREF="msg00054.html">Re: Greetings. :)</A></strong>, 
Jeff Kesselman <a href="mailto:jeffk#tenetwork,com">jeffk#tenetwork,com</a>, Wed 09 Apr 1997, 10:34 GMT
</LI>
<LI><strong><A NAME="00055" HREF="msg00055.html">Re: Greetings. :)</A></strong>, 
Jeff Kesselman <a href="mailto:jeffk#tenetwork,com">jeffk#tenetwork,com</a>, Wed 09 Apr 1997, 10:43 GMT
</LI>
<LI><strong><A NAME="00056" HREF="msg00056.html">Re: Greetings. :)</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Wed 09 Apr 1997, 10:49 GMT
</LI>
<LI><strong><A NAME="00058" HREF="msg00058.html">Re: Greetings. :)</A></strong>, 
Jeff Kesselman <a href="mailto:jeffk#tenetwork,com">jeffk#tenetwork,com</a>, Wed 09 Apr 1997, 11:04 GMT
</LI>
<LI><strong><A NAME="00059" HREF="msg00059.html">Re: Greetings. :)</A></strong>, 
Shawn Halpenny <a href="mailto:rsh#dos,nortel.com">rsh#dos,nortel.com</a>, Wed 09 Apr 1997, 21:08 GMT
</LI>
<LI><strong><A NAME="00060" HREF="msg00060.html">Re: Greetings. :)</A></strong>, 
Shawn Halpenny <a href="mailto:rsh#dos,nortel.com">rsh#dos,nortel.com</a>, Wed 09 Apr 1997, 21:18 GMT
</LI>
<LI><strong><A NAME="00062" HREF="msg00062.html">Re: Greetings. :)</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 09 Apr 1997, 21:46 GMT
</LI>
<LI><strong><A NAME="00063" HREF="msg00063.html">Re: Greetings. :)</A></strong>, 
Greg Munt <a href="mailto:greg#uni-corn,demon.co.uk">greg#uni-corn,demon.co.uk</a>, Thu 10 Apr 1997, 01:36 GMT
</LI>
<LI><strong><A NAME="00064" HREF="msg00064.html">Re: Greetings. :)</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Thu 10 Apr 1997, 04:42 GMT
</LI>
</ul>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>