1999Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] ColdStore -->
<!--X-From-R13: [vebfyni Evybivp <fvybivpNmrfbv.sre.ue> -->
<!--X-Date: Wed, 08 Dec 1999 12:28:48 &#45;0800 -->
<!--X-Message-Id: 7e66y9td0p.fsf#zesoi,fer.hr -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: E11vmn1&#45;00080Q&#45;00#dingo,kanga.nu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] ColdStore</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:silovic#zesoi,fer.hr">
</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="msg00545.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00549.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00545.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00552.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00546">Author</A>
&nbsp;|&nbsp;<A HREF="#00546">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00546">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] ColdStore</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>: Re: [MUD-Dev] ColdStore</LI>
<LI><em>From</em>: Miroslav Silovic &lt;<A HREF="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</A>&gt;</LI>
<LI><em>Date</em>: 08 Dec 1999 21:04:38 +0100</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>
J C Lawrence &lt;claw#kanga,nu&gt; writes:

&gt; <A  HREF="http://coldstore.linuxbox.com/">http://coldstore.linuxbox.com/</A>
&gt; 
&gt; --&lt;cut&gt;--
&gt; ColdStore is a gigabyte-scale persistent object store which mmap()s
&gt; objects into a file (for persistence), can allocate objects in a
&gt; minimal working-set of pages (for speed), permits library versions
&gt; to change without a rebuild of the store, permits application
&gt; checkpoint/restart.  ColdStore might be used to replace a database,
&gt; cache highly structured objects, act as an OODB, make STL
&gt; persistent, act as a Document Store for XML/SGML/HTML, create a
&gt; MUD. Future projects include a virtual machine toolkit, ports of
&gt; several languages, VM and byte-interpretive language workbench.
&gt; --&lt;cut&gt;--

Ok, I did more extensive research into this (mostly because I know the
authors).

It's a C++ library that mmaps a file, and then handles the allocation
and refcounting. This is very fast, of course, as the allocation
handles the locality, but that's the only good thing one can say this
approach. Problems:

 - mmap is limited by the architecture. With normal databases you can
download as needed, and the db file(s) can be bigger than the address
space - if you carefully split your db, for example. With mmap, you're
limited to the largest contiguous segment in your address space, which
really is about 1 gb on most OSes. This seems a lot but I know of at
least one production MUD whose db size hit 1gb at one point (that's
when they rewrote much of their code for data size efficiency) - and
that was Cold db that compresses small integers, so it'd be 1.5-2gb of
pure mmapped binary.

 - bug recovery is nonexistent. If your broken C++ code hits mmaped
memory, you can say goodbye to the entire db.

 - versioning issues. While upgrading ColdStore may be handled, If you
change layout of your objects, well... conversion is impossible, since
you've just mmaped the binary.

 - db format is highly non-portable. It's not just architecture
dependant, it's C++ compiler dependant (as object layout may change).

 - refcounting. Well. Some people swear by it. Usually the same people
who haven't explored its interactions with threading. The issue is
that increasing refcount needs to be done atomically - when you have
LOTS of threads, well... that just won't work. You either have to use
extra spin lock or use inline assembly for atomic increment. And since
you increment/decrement refcounts a LOT (even passing pointers as
parameters may cause refcounts to bump), this is major issue. BTW, has
there been any discussion on the list on incremental/generational GC?
(that works best for MUDs by far, IMHO - you can really bump up your
realtime response once you implement incrementality properly).

 - no way to logically split your db into multiple files. ColdStore
stores direct binary pointers.

I'd say this system is great for small MUDs that need to run on tiny
(read: outdated) servers and aren't changed a lot after the initial
hardcode is in place. It's faster than anything that uses separate db
engine and it handles small dbs efficiently. But I think it'd be a
mistake to use it for a (potentially) large size world.

-- 
How to eff the ineffable?



_______________________________________________
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>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00545" HREF="msg00545.html">[MUD-Dev] ColdStore</A></STRONG>
<UL><LI><EM>From:</EM> J C Lawrence &lt;claw#kanga,nu&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00545.html">[MUD-Dev] ColdStore</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00549.html">Re: [MUD-Dev] Neural Networks as the AI system for a MUD?</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00545.html">[MUD-Dev] ColdStore</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00552.html">Re: [MUD-Dev] ColdStore</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00546"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00546"><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] AI's in MUDS and Online Gaming</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00561" HREF="msg00561.html">Re: [MUD-Dev] AI's in MUDS and Online Gaming</A></strong>, 
IronWolf <a href="mailto:ironwolf#ewa,net">ironwolf#ewa,net</a>, Thu 09 Dec 1999, 05:42 GMT
</LI>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00557" HREF="msg00557.html">[MUD-Dev] New AI Engine released</A></strong>, 
Fabian <a href="mailto:lemkef#execpc,com">lemkef#execpc,com</a>, Thu 09 Dec 1999, 02:01 GMT
<UL>
<LI><strong><A NAME="00559" HREF="msg00559.html">Re: [MUD-Dev] New AI Engine released</A></strong>, 
Steve Houchard <a href="mailto:stevehou#engin,umich.edu">stevehou#engin,umich.edu</a>, Thu 09 Dec 1999, 04:46 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00545" HREF="msg00545.html">[MUD-Dev] ColdStore</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Wed 08 Dec 1999, 19:30 GMT
<UL>
<LI><strong><A NAME="00546" HREF="msg00546.html">Re: [MUD-Dev] ColdStore</A></strong>, 
Miroslav Silovic <a href="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</a>, Wed 08 Dec 1999, 20:28 GMT
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00552" HREF="msg00552.html">Re: [MUD-Dev] ColdStore</A></strong>, 
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Wed 08 Dec 1999, 21:48 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00543" HREF="msg00543.html">[MUD-Dev] Scenarios</A></strong>, 
Chris Lloyd <a href="mailto:crl199#soton,ac.uk">crl199#soton,ac.uk</a>, Tue 07 Dec 1999, 23:54 GMT
<LI><strong><A NAME="00526" HREF="msg00526.html">[MUD-Dev] New member</A></strong>, 
IronWolf <a href="mailto:ironwolf#ewa,net">ironwolf#ewa,net</a>, Mon 06 Dec 1999, 06:10 GMT
<LI><strong><A NAME="00523" HREF="msg00523.html">[MUD-Dev] Neural Networks as the AI system for a MUD?</A></strong>, 
PartyG2816 <a href="mailto:PartyG2816#aol,com">PartyG2816#aol,com</a>, Fri 03 Dec 1999, 00:35 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>