1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Socket&#45;Script: Socket&#45;capabable script language and matching library -->
<!--X-From-R13: "Oqnz X. Fubeagba" <nqnzNcubravk.Bevaprgba.SRG> -->
<!--X-Date: Wed, 5 Aug 1998 14:05:52 &#45;0700 -->
<!--X-Message-Id: 19980805170039.B958#flagstaff,Princeton.EDU -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 19980805110035.A20957#flagstaff,Princeton.EDU -->
<!--X-Reference: Pine.GSO.3.95q.980805081421.16112A&#45;100000@uhunix2 -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: Socket-Script: Socket-capabable script language </title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:adam#phoenix,Princeton.EDU">
</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="msg00497.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00499.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00496.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00499.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00498">Author</A>
&nbsp;|&nbsp;<A HREF="#00498">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00498">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</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: Socket-Script: Socket-capabable script language and matching library</LI>
<LI><em>From</em>: "Adam J. Thornton" &lt;<A HREF="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</A>&gt;</LI>
<LI><em>Date</em>: Wed, 5 Aug 1998 17:00:39 -0400</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>
On Wed, Aug 05, 1998 at 09:43:48AM -1000, Nathan F Yospe wrote:
&gt; Interesting... I've got a lot of "runtime state" data that never gets
&gt; written to disk. My disk/memory storage is designed to be completely
&gt; transparent, so anything that is on disk could reside in memory... but
&gt; the thing that sort of occurs to me here is... is this just for crash
&gt; protection? Or is there some basic reason to duplicate information?

Hmmmm.

Now that's an interesting question.

The initial answer is "because my world state lives in the database."

Which, as you point out, isn't an answer at all.

I suppose "Crash Protection" is one reason.  Namely, a room with no one in
it has no processes, so it occupies no memory, so any persistence is
implemented on the disk, currently in the form of PostgreSQL tables.  

So it's not exactly crash protection so much as it is that processes--and,
even more so, threads--are meant to be transient entities.  The only reason
I save the state of a room in memory is to limit the number of (very time
consuming) DB accesses.

Which does, I suppose, mean that you could read in a room state when the
first player enters, and write it out again when the last player leaves.
So all intermediate updates are, yes, merely for crash protection.  Depends
on how much time it takes to do it as to whether it's worth it.  I haven't
gotten far enough to tell what the optimal commit-room-state-to-DB
frequency is.

&gt; As I use a rather distinctly different model (everything is a container,
&gt; and threads occur at the lowest "occupied" container and up, with main 
&gt; locks projecting upward to the maximum "event space" of an event... I use
&gt; process locks instead of mutexes... my own thread model, based on pthreads.

Makes sense,  I'm going to try to write as little wrapper code around the
base pthreads calls as possible.  Unless I really do use Java.

&gt; Ropes. Ah. They, and their kin, trouble me too... they're always locking
&gt; in the event tree several layers up from the current containter. Well, in
&gt; the end, I decided ropes were like radiation. They pass messages back,
&gt; and if there are time delays and hicoughs occasionally... so be it. The
&gt; rope's a little stretchy. Seems to keep the threads running smoother.

Hmmm.  I just don't see any clean way to do ropes.  I may at least
initially cheat and make ropes purely local phenomena, so you can (using
Inform-like syntax here) &lt;&lt;Attach Gondola Dock&gt;&gt; or &lt;&lt;Attach Horse Post&gt;&gt;
but not string a tripwire across the piazza.

&gt; I've got to write the client, so I can actually *see* the world-state,
&gt; instead of printing out numerical models.

I hear you there.

Adam
-- 
adam#princeton,edu 
"There's a border to somewhere waiting, and a tank full of time." - J. Steinman


</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="00491" HREF="msg00491.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></STRONG>
<UL><LI><EM>From:</EM> "Adam J. Thornton" &lt;adam#phoenix,Princeton.EDU&gt;</LI></UL></LI>
<LI><STRONG><A NAME="00496" HREF="msg00496.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></STRONG>
<UL><LI><EM>From:</EM> Nathan F Yospe &lt;yospe#hawaii,edu&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00497.html">[MUD-Dev] Re: Alternate UOL's</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00499.html">[MUD-Dev] Toba Java-&gt;C</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00496.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00499.html">[MUD-Dev] Toba Java-&gt;C</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00498"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00498"><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><A NAME="00489" HREF="msg00489.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 05 Aug 1998, 13:29 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00490" HREF="msg00490.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 05 Aug 1998, 13:33 GMT
<UL>
<LI><strong><A NAME="00491" HREF="msg00491.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Wed 05 Aug 1998, 15:05 GMT
<UL>
<LI><strong><A NAME="00496" HREF="msg00496.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>, 
Nathan F Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Wed 05 Aug 1998, 19:47 GMT
<UL>
<LI><strong><A NAME="00498" HREF="msg00498.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Wed 05 Aug 1998, 21:05 GMT
</LI>
<LI><strong><A NAME="00499" HREF="msg00499.html">[MUD-Dev] Toba Java-&gt;C</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Wed 05 Aug 1998, 21:11 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00492" HREF="msg00492.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>, 
##Make Nylander <a href="mailto:thenewt#use,usit.net">thenewt#use,usit.net</a>, Wed 05 Aug 1998, 16:00 GMT
<UL>
<LI><strong><A NAME="00495" HREF="msg00495.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Wed 05 Aug 1998, 17:13 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00485" HREF="msg00485.html">[MUD-Dev] 3D World Models</A></strong>, 
Leach, Brad BA <a href="mailto:Leach.Brad.BA#bhp,com.au">Leach.Brad.BA#bhp,com.au</a>, Wed 05 Aug 1998, 08:31 GMT
</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>