<!-- 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-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>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00058.html">Previous</a>
| <a href="msg00060.html">Next</a>
]
Thread:
[ <a href="msg00058.html">Previous</a>
| <a href="msg00060.html">Next</a>
]
Index:
[ <A HREF="author.html#00059">Author</A>
| <A HREF="#00059">Date</A>
| <A HREF="thread.html#00059">Thread</A>
]
<!--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" <<A HREF="mailto:rsh#dos,nortel.com">rsh#dos,nortel.com</A>></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:
> Subject: Re: Greetings. :)
> At 01:44 PM 4/8/97 -0400, you wrote:
> >On Apr 6, 8:23am, coder#ibm,net wrote:
> >
> >[ stuff about JCL's DB snipped ]
> >
> >> This is probably better understood from the inside oot, rather than trying
> >> to look at the server side:
> >>
> >> Everything is an object.
> >> Objects are defined in a database.
> >> Objects have Unique IDs.
> >
> >I've been kicking this unique ID/object around as well, and was
> >wondering about how you generate them? I haven't been able to find
> >any algorithms that would generate a unique ID given an object (or a
> >request to do so) without having to search the list of ID's already
> >generated. I don't know for sure if that last bit is possible, but I
> >want things to still be speedy when the number of objects is large
> >(2^31). I had an idea to keep track of the next available ID, and
> >each time an object was created, assign it that value, then bump the
> >value. Whenever an object is destroyed, keep track of the last 'n'
> >(where n is something fairly small and manageable like 100) now-free
> >IDs and if you wrap your next-ID counter, pull them out of the list of
> >freed IDs. If the list runs empty, you have to search, though.
> >There's optimization to be done in that, but that's the gist.
> >
> >Any magical algorithms? :)
>
> Hmm.... cold does this integrally. I uspsect it just keeps an efficeintly
> searched list. How abotu this....
>
> A "highest allocetd" counter and a list of available (freed) numbers.
> Yo uuse the first on the free list unless the lsit is empty in which case
> you bump the "highest' number and use that?
>
> Just some thoughts.
>
> 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>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>