1998Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: [DevMUD] Re: Database module -->
<!--X-From-R13: "Tryvk O. Qebrf" <sryvkNqjbexva.ay> -->
<!--X-Date: Tue, 22 Dec 1998 13:42:08 &#45;0800 -->
<!--X-Message-Id: 199812222136.WAA12833#pattern,dworkin.nl -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: [DevMUD] Re: Database module</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:felix#dworkin,nl">
</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="msg01043.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01045.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg01041.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01024.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#01044">Author</A>
&nbsp;|&nbsp;<A HREF="#01044">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#01044">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: [DevMUD] Re: Database module</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: [DevMUD] Re: Database module</LI>
<LI><em>From</em>: "Felix A. Croes" &lt;<A HREF="mailto:felix#dworkin,nl">felix#dworkin,nl</A>&gt;</LI>
<LI><em>Date</em>: Tue, 22 Dec 1998 22:36:07 +0100 (CET)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
J C Lawrence &lt;claw#kanga,nu&gt; wrote:

&gt; Crossed to MUD-Dev as the discussion of ObjectID's is generic to
&gt; server designe as versus DevMUD.
&gt;
&gt; On Sun, 20 Dec 1998 12:05:57 -0800 
&gt; Jon Leonard&lt;jleonard#divcom,slimy.com&gt; wrote:
&gt;
&gt; &gt; Things that we want to look up in the database have numeric IDs to
&gt; &gt; identify them, and there are newid() and recycle_id() to allocate
&gt; &gt; new ones and to tell the database than an ID is no longer in use.  I
&gt; &gt; was planning on using unsigned longs as the ID type (64-bit on
&gt; &gt; frost).
&gt;
&gt; I went thru the problem of ObjectID's and their re-use on MUD-Dev
&gt; extensively.  A key problem is that there may be pointers or
&gt; references to an object after the object has been destructed, and that
&gt; once you have an ObjectID-&gt;human_readable-&gt;ObjectID translation
&gt; mapping, you can never guarantee that a reference count is accurate.

For DGD, I use the following solution:

Object references internally consist of a pair of numbers, an index
in the object array and an "object reference count".  The object
reference count, a 32 bit number, is increased with one for every
new object created, starting with 2 for the first object.

All objects are referred to by these object references; there are
no direct pointers.  When an object is destructed, its object
reference is immediately set to 0.  When the slot in the object
array is reused for a new object, it gets a new object reference
count.

Since all objects are referred to by their &lt;index, count&gt; pairs,
it is easy to see if the object referred to does still exist:
the reference count will be different if the object has been
destructed.

Every time the mud reboots from a state dump file, all object
references are examined.  Those that refer to now-destructed
objects are given the (invalid) reference count 1.  The remainder
is renumbered, starting at 2.  So, saving the state of the entire
mud in a state dump and rebooting can be used to prevent
object reference count wraparound.  Assuming that 1000 new
objects are created every second on average, it would be
sufficient to reboot at least once every 49 days.

Felix Croes


</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="msg01043.html">[MUD-Dev] Re: Re[2]:[MUD-Dev] Re: MUD Design doc (long)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg01045.html">[MUD-Dev] [RRE]AAAI 1999 Fall Symposium: Narrative Intelligence</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg01041.html">[MUD-Dev] Re: [DevMUD] Re: Database module</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg01024.html">[MUD-Dev] Developing a MUD for the first time?</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#01044"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#01044"><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>[MUD-Dev] Re: [DevMUD] Re: Database module</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="01039" HREF="msg01039.html">[MUD-Dev] Re: [DevMUD] Re: Database module</A></strong>, 
cynbe <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Tue 22 Dec 1998, 10:14 GMT
</LI>
</ul>
<LI><strong><A NAME="01040" HREF="msg01040.html">[MUD-Dev] Re: [DevMUD] Re: Database module</A></strong>, 
Jay Carlson <a href="mailto:nop#mitre,org">nop#mitre,org</a>, Tue 22 Dec 1998, 15:02 GMT
<UL>
<LI><strong><A NAME="01042" HREF="msg01042.html">[MUD-Dev] Re: [DevMUD] Re: Database module</A></strong>, 
cynbe <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Tue 22 Dec 1998, 20:12 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="01041" HREF="msg01041.html">[MUD-Dev] Re: [DevMUD] Re: Database module</A></strong>, 
T. Alexander Popiel <a href="mailto:popiel#snugharbor,com">popiel#snugharbor,com</a>, Tue 22 Dec 1998, 16:32 GMT
</LI>
</ul>
<LI><strong><A NAME="01044" HREF="msg01044.html">[MUD-Dev] Re: [DevMUD] Re: Database module</A></strong>, 
Felix A. Croes <a href="mailto:felix#dworkin,nl">felix#dworkin,nl</a>, Tue 22 Dec 1998, 21:42 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="01024" HREF="msg01024.html">[MUD-Dev] Developing a MUD for the first time?</A></strong>, 
Alex Oren <a href="mailto:alexo#bigfoot,com">alexo#bigfoot,com</a>, Mon 21 Dec 1998, 07:13 GMT
<LI><strong><A NAME="01022" HREF="msg01022.html">[MUD-Dev] client stuff...</A></strong>, 
Andrew Wilson <a href="mailto:andrew#aaaaaaaa,demon.co.uk">andrew#aaaaaaaa,demon.co.uk</a>, Sat 19 Dec 1998, 20:04 GMT
<LI><strong><A NAME="01017" HREF="msg01017.html">[MUD-Dev] example custom protocol and its uses</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 19 Dec 1998, 07:26 GMT
<LI><strong><A NAME="01015" HREF="msg01015.html">[MUD-Dev] Re: Response (Was Re: MUD Design doc (long))</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 19 Dec 1998, 04:51 GMT
</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>