1999Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Optimized Object Storage -->
<!--X-From-R13: "Wna [npvagbfu" <vznaNvfflfgrzf.pb.am> -->
<!--X-Date: Fri, 17 Dec 1999 09:06:44 &#45;0800 -->
<!--X-Message-Id: 000001bf48ac$077758a0$02010101#akl,issystems.co.nz -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199912170206.TAA02230@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Optimized Object Storage</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:iman#issystems,co.nz">
</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="msg00636.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00639.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00634.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00651.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00637">Author</A>
&nbsp;|&nbsp;<A HREF="#00637">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00637">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Optimized Object Storage</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: [MUD-Dev] Optimized Object Storage</LI>
<LI><em>From</em>: "Ian Macintosh" &lt;<A HREF="mailto:iman#issystems,co.nz">iman#issystems,co.nz</A>&gt;</LI>
<LI><em>Date</em>: Sat, 18 Dec 1999 05:30:28 +1300</LI>
<LI><em>Importance</em>: Normal</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#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>

The Subject line used to be "[MUD-Dev] The grass is always greener in
the other field".  Time to change it I thought.

I'm not going to quote all the relevant parts or parties.  There are
too many :-)

Firstly, my opinions.  Let's you know what probably influences me in
certain directions.  I strongly dislike OOC solutions, or
transparently artificial solutions.  Object decay fits both of those
to my mind, so I dislike it.  That's the philosopical viewpoint.  Now
to the technical.

I have implemented my solution in what is to me, a very simple way.  I
am sure I'll get corrected where necessary by ya'll were I'm wrong :-)
Please note that I'm using the LambdaMOO server and my own DB built
from scratch, so some concepts may not be as transportable to other
technologies.

There is a generic object, which contains the absolute minimum stats.
Description, type (class), size, weight, etc.  Your definition of
minimum might vary.  When an object gets dumped into a storage
location (correctly identifying a storage location is a small topic on
it's own), the full object is written to disk.  Use a suitable fast
and secure system for that.  I recommend SQL, don't make a trillion
small files in a directory.  An OS *is not* optimised for that task.
SQL *is* optimised for that task.

After successfully writing it to disk (use a transparent "write object
to disk" object method that can alter the storage location and method
transparent to the rest of the system), change the parent object to
the generic 'storage-object'.  That drops all unique info, and then
write the retrieval key data into that object.  To retrieve the
original item when a player 'touches' the object is trivial.  To
simplify my system somewhat, I keep original objects out of the game,
and all in-game objects are children of those 'master' objects.  No
in-game object ever has a child inheriting from it.

I have thought of, but not yet implemented, a technique whereby I
consolidate multiple identical storage-objects via a counter property.
The way I have considered doing this is by first writing a new
storage-object into a to-do list, and later, when the system detects
plenty spare CPU time available, iterate through the other objects in
that location and consolidate.  That would then only need a small
modification where there is a list of retrieval keys instead of a
singular retrieval key.  Then 75 'small swords' would become massively
efficient in terms of in-game memory.

While writing this, it crosses my mind that it would also be possible
to write the entire contents of a storage object to the SQL server,
and only retrieve this when required.  Using this on top of all the
other methods should lead to tremendous savings.

What do you think?

Regards,

Ian Macintosh.




_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00651" HREF="msg00651.html">Re: [MUD-Dev] Optimized Object Storage</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#cp,net&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00634" HREF="msg00634.html">Re: [MUD-Dev] The grass is always greener in the other field</A></STRONG>
<UL><LI><EM>From:</EM> cg#ami-cg,GraySage.Edmonton.AB.CA</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00636.html">Re: [MUD-Dev] The grass is always greener in the other field</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00639.html">Re: [MUD-Dev] Fair/Unfair? Scenarios (fwd)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00634.html">Re: [MUD-Dev] The grass is always greener in the other field</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00651.html">Re: [MUD-Dev] Optimized Object Storage</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00637"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00637"><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: [MUD-Dev] The grass is always greener in the other field</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00623" HREF="msg00623.html">Re: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Ilya, Game Commandos <a href="mailto:Ilya#gamecommandos,com">Ilya#gamecommandos,com</a>, Fri 17 Dec 1999, 00:27 GMT
</LI>
<LI><strong><A NAME="00628" HREF="msg00628.html">Re: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 17 Dec 1999, 01:01 GMT
</LI>
<LI><strong><A NAME="00626" HREF="msg00626.html">RE: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Fri 17 Dec 1999, 01:01 GMT
</LI>
<LI><strong><A NAME="00634" HREF="msg00634.html">Re: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 17 Dec 1999, 04:04 GMT
<UL>
<LI><strong><A NAME="00637" HREF="msg00637.html">[MUD-Dev] Optimized Object Storage</A></strong>, 
Ian Macintosh <a href="mailto:iman#issystems,co.nz">iman#issystems,co.nz</a>, Fri 17 Dec 1999, 17:06 GMT
<UL>
<LI><strong><A NAME="00651" HREF="msg00651.html">Re: [MUD-Dev] Optimized Object Storage</A></strong>, 
J C Lawrence <a href="mailto:claw#cp,net">claw#cp,net</a>, Fri 17 Dec 1999, 23:36 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00638" HREF="msg00638.html">Re: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Scatter <a href="mailto:scatter#thevortex,com">scatter#thevortex,com</a>, Fri 17 Dec 1999, 17:06 GMT
</LI>
<LI><strong><A NAME="00641" HREF="msg00641.html">Re: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Ilya, Game Commandos <a href="mailto:Ilya#gamecommandos,com">Ilya#gamecommandos,com</a>, Fri 17 Dec 1999, 17:44 GMT
</LI>
<LI><strong><A NAME="00644" HREF="msg00644.html">RE: [MUD-Dev] The grass is always greener in the other field</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Fri 17 Dec 1999, 22:05 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>