1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev]	World Persistence, flat files v/s DB v/s ?? -->
<!--X-From-R13: ptNnzv&#45;pt.UenlEntr.Sqzbagba.OP.QO (Quevf Uenl) -->
<!--X-Date: Mon, 23 Mar 1998 06:54:24 +0000 -->
<!--X-Message-Id: 9803230236.8w3d@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Content-Type: text -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev]	World Persistence, flat files v/s DB v/s ??</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">
</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="msg00832.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00834.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00830.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00864.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00833">Author</A>
&nbsp;|&nbsp;<A HREF="#00833">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00833">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev]	World Persistence, flat files v/s DB v/s ??</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: [MUD-Dev]	World Persistence, flat files v/s DB v/s ??</LI>
<LI><em>From</em>: <A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A> (Chris Gray)</LI>
<LI><em>Date</em>: Sun, 22 Mar 98 19:36:19 MST</LI>
<LI><em>>Received</em>: by ami-cg.GraySage.Edmonton.AB.CA (V1.17-beta/Amiga)  id &lt;8w3d#ami-cg,GraySage.Edmonton.AB.CA&gt;; Sun, 22 Mar 98 19:36:19 MST</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
[Vadim Tkachenko:]

:- You strictly divide the persistence engine from the logic;
:- You build the two-tiered system with the logic as a client and the
:persistence engine as a server;
:- You build them in such a way that doesn't require them both to be
:within the same binary (address space, whatever), or build the adaptor
:which will be within and will connect to the persistence engine outside;
:- Your problem is fixed, because as soon as you finish that, you don't
:have a limitation to run those thousands of threads on the same box -
:you can spread them through several servers.

Some potential problems:

    - if multiple threads are updating the single image of the DB
	(whether those threads are local or remote), then you need some
	kind of consistency mechanism. If you use locks, then you are
	vulnerable to a client vanishing when it holds locks - you will
	have to detect that and rip the locks away. This also means
	that your execution model has to be very complete with respect
	to locks, both read locks and write locks. With remotely held
	locks, you can get some *very* large latencies.

	Alternatively, you might try Chris L's lockless scheme, or some
	variant.

	In either case, information generated by a thread run often
	produces output that must go to several clients. Does each
	client know about all other clients, and so can send directly,
	or does that information have to bounce through the server?

    - threads often need a fair amount of context (mostly read-only) to run.
	Getting the up-to-date version of that to the clients can up your
	latency quite a bit. You can cache information like that on the
	clients, but see recent discussion on that for some hazards.

	If you use Chris L's lockless scheme, then after the thread has
	run, you need to send full images of changed stuff back to the
	server so that it can be compared and committed. Again, lots of
	traffic and latency. Also, that C &amp; C may take nearly as long as
	the thread execution, so you end up losing out, in terms of the
	latency seen by the user.

A fully multithreaded server, using Chris L's C&amp;C method, running on a
large multi-CPU SMP machine is likely the best way to get high throughput.

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


</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="00886" HREF="msg00886.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> Vadim Tkachenko &lt;vt#freehold,crocodile.org&gt;</li></ul>
<li><strong><A NAME="00864" HREF="msg00864.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00832.html">Re: [MUD-Dev] Describe Concept</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00834.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00830.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00864.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00833"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00833"><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] World Persistence, flat files v/s DB v/s ??</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00894" HREF="msg00894.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Wed 25 Mar 1998, 08:47 GMT
<UL>
<LI><strong><A NAME="00899" HREF="msg00899.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Thu 26 Mar 1998, 01:59 GMT
<UL>
<LI><strong><A NAME="00904" HREF="msg00904.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Joel Dillon <a href="mailto:emily#cornholio,new.ox.ac.uk">emily#cornholio,new.ox.ac.uk</a>, Thu 26 Mar 1998, 15:52 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
<LI><strong><A NAME="00830" HREF="msg00830.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 22 Mar 1998, 21:10 GMT
</LI>
<LI><strong><A NAME="00833" HREF="msg00833.html">Re: [MUD-Dev]	World Persistence, flat files v/s DB v/s ??</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 23 Mar 1998, 06:54 GMT
<UL>
<LI><strong><A NAME="00864" HREF="msg00864.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Mon 23 Mar 1998, 21:42 GMT
</LI>
<LI><strong><A NAME="00886" HREF="msg00886.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Wed 25 Mar 1998, 05:28 GMT
<UL>
<LI><strong><A NAME="00902" HREF="msg00902.html">Re: [MUD-Dev] World Persistence, flat files v/s DB v/s ??</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Thu 26 Mar 1998, 05:03 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00836" HREF="msg00836.html">Re: [MUD-Dev]	World Persistence, flat files v/s DB v/s ??</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 23 Mar 1998, 07:07 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>