1998Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Persistant storage.... My current idea. -->
<!--X-From-R13: X Q Znjerapr <pynjNhaqre.rate.ftv.pbz> -->
<!--X-Date: Wed, 22 Apr 1998 16:29:23 &#45;0700 -->
<!--X-Message-Id: 199804222328.QAA283035#under,engr.sgi.com -->
<!--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: Persistant storage.... My current idea.</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:claw#under,engr.sgi.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="msg00271.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00293.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00554.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00260.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00282">Author</A>
&nbsp;|&nbsp;<A HREF="#00282">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00282">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: Persistant storage.... My current idea.</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: Persistant storage.... My current idea.</LI>
<LI><em>From</em>: J C Lawrence &lt;<A HREF="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</A>&gt;</LI>
<LI><em>Date</em>: Wed, 22 Apr 1998 16:28:49 -0700</LI>
<LI><em>Delivery-date</em>: Wed Apr 22 16:29:26 1998</LI>
<LI><em>Delivery-date</em>: Wed, 22 Apr 1998 16:29:26 -0700</LI>
<LI><em>Envelope-to</em>: claw#kanga,nu</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: "Petidomo List Agent,,,," &lt;<A HREF="mailto:petidomo#kanga,nu">petidomo#kanga,nu</A>&gt;</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>

Date: Sun, 5 Apr 98 09:03:38 MST
Message-Id: &lt;9804051603.8wb5#ami-cg,GraySage.Edmonton.AB.CA&gt;
From: cg#ami-cg,GraySage.Edmonton.AB.CA (Chris Gray)
To: cynbe#muq,org
Cc: claw#under,engr.sgi.com
Subject: Re: [MUD-Dev] Persistant storage.... My current idea.

[Had you meant this to not be going back to the MUD-Dev list?]
:cg#ami-cg,GraySage.Edmonton.AB.CA (Chris Gray):
:
:| If you keep an index table in memory all the time, then there will also
:| be no more than one disk read to get any DB entry.
:| [...] After a few header words, index file is an array of small
:| structs, containing a 16 bit slot length, a 16 bit 'used' length, and
:| a 32 bit file offset.
:
:True, but if ram is cheap, why use disk-basing at all? :)

In my case, the index file is usually quite a bit smaller than the full
database file.

:What's your average object size?

I just went and checked the 3 scenario's I have available:

       which        DB      index   ratio
    -------------------------------------
    main world   611680     49764    12.2
      castle     150004     17660     8.5
      simple       5772       716     8.1

'main world' has about 30K source lines, and includes 6 quests, combat,
on-line building, etc. 'castle' is just a graphical overhead view castle,
with no actual game-play, of a 100+ room castle on 7 levels. 'simple' is
a minimal, but playable scenario that I use as a learning example.

Small strings tend not to be duplicated, since they are either in the
world code, or are attached to model objects and inherited. The DB also
holds all of the MUD code, in a linearized parse-tree form, along with
symbol tables to hold everything, and both of those can get large.

:I presume your scheme works well with your design, but with many
:systems, statistics show an average object size of 13-16 bytes.

I looks like mine would average nearly 100 bytes.

- --
Chris Gray   cg#ami-cg,GraySage.Edmonton.AB.CA

-- 
J C Lawrence                               Internet: claw#null,net
(Contractor)                               Internet: coder#ibm,net
---------(*)                     Internet: claw#under,engr.sgi.com
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...

-- 
MUD-Dev: Advancing an unrealised future.
</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="msg00271.html">[MUD-Dev] Persistant storage.... My current idea.</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00293.html">[MUD-Dev] MAPPING: Creating a bitmaped graphic from map coordinates</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00554.html">[MUD-Dev] Re: MAPPING: Creating a bitmaped graphic from map coordinates</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00260.html">[MUD-Dev] Re:  Re: MUD Development Digest</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00282"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00282"><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: MAPPING: Creating a bitmaped graphic from map</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00506" HREF="msg00506.html">[MUD-Dev] Re: MAPPING: Creating a bitmaped graphic from map</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Fri 24 Apr 1998, 04:13 GMT
<UL>
<LI><strong><A NAME="00586" HREF="msg00586.html">[MUD-Dev] Re: MAPPING: Creating a bitmaped graphic from  map</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Fri 24 Apr 1998, 05:01 GMT
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="00576" HREF="msg00576.html">[MUD-Dev] Re: MAPPING: Creating a bitmaped graphic from map</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Fri 24 Apr 1998, 03:38 GMT
</LI>
</ul>
</ul>
<LI><strong><A NAME="00554" HREF="msg00554.html">[MUD-Dev] Re: MAPPING: Creating a bitmaped graphic from map coordinates</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Fri 24 Apr 1998, 06:00 GMT
</LI>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00282" HREF="msg00282.html">[MUD-Dev] Re: Persistant storage.... My current idea.</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 22 Apr 1998, 23:29 GMT
<LI><strong><A NAME="00260" HREF="msg00260.html">[MUD-Dev] Re:  Re: MUD Development Digest</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 22 Apr 1998, 23:26 GMT
<LI><strong><A NAME="00249" HREF="msg00249.html">[MUD-Dev] (fwd) Sea of Blood Graphical MUD</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 22 Apr 1998, 19:29 GMT
<UL>
<LI><strong><A NAME="00395" HREF="msg00395.html">[MUD-Dev] Teamwork</A></strong>, 
Ling <a href="mailto:K.L.Lo-94#student,lboro.ac.uk">K.L.Lo-94#student,lboro.ac.uk</a>, Thu 23 Apr 1998, 15:57 GMT
<UL>
<LI><strong><A NAME="00441" HREF="msg00441.html">[MUD-Dev] Re: Teamwork</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 23 Apr 1998, 17:56 GMT
</LI>
</UL>
</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>