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: @nguna T Kbfcr <lbfcrNunjnvv.rqh> -->
<!--X-Date: Wed, 5 Aug 1998 12:47:32 &#45;0700 -->
<!--X-Message-Id: Pine.GSO.3.95q.980805081421.16112A&#45;100000@uhunix2 -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 19980805110035.A20957#flagstaff,Princeton.EDU -->
<!--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:yospe#hawaii,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="msg00495.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00497.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00491.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00498.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00496">Author</A>
&nbsp;|&nbsp;<A HREF="#00496">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00496">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>: Nathan F Yospe &lt;<A HREF="mailto:yospe#hawaii,edu">yospe#hawaii,edu</A>&gt;</LI>
<LI><em>Date</em>: Wed, 5 Aug 1998 09:43:48 -1000</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, 5 Aug 1998, Adam J. Thornton wrote:

&lt;snip stuff others answered better than I could&gt;

:I'm not actually too worried about the N-processes-for-N-players problem,
:mainly because empty rooms are kind of boring, and I suspect that players
:will quickly congregate in rooms with other players.  If I have per-room
:scoping then I have a reasonably natural solution to the data
:representation problem by making each room a process and making its object
:data available to all threads (player objects) running in it.  Object data
:is ultimately represented in the database backend, but for each process it
:is locally represented in in-memory data structures, which, as they change,
:get written to a low-priority database queue thread, which runs when the
:cycles are free or gets flushed on some schedule (e.g. every thirty seconds
:if it hasn't had a chance to run yet).

Interesting... I've got a lot of "runtime state" data that never gets
written to disk. My disk/memory storage is designed to be completely
transparent, so anything that is on disk could reside in memory... but
the thing that sort of occurs to me here is... is this just for crash
protection? Or is there some basic reason to duplicate information?

I use to-disk conversion for reused (derived from and duplicated)
objects, and for anything that will be distributed across servers (I'm
still working on this. The design is progressing well in the scraps of
time I can recover on weekends. I'll be starting coding again, after a
long, long hiatus, in a few weeks. Scheduled 15 hours a week for this.)
I also do to-disk conversion... and memory deallocation... for anything
in a projection zone - one where the current thread has gone inactive,
and the geographical region has been slated for long term updates. The
to-disk occurs immediately on projection stage one. Memory deallocation
occurs quite a bit later, at projection stage two, after a few hours of
inactivity.

:One thing I haven't worked out yet in my model is just what to lock when
:players move globally visible objects.  I could lock everything in the
:room--that is, put a mutex around the room data for as long as it took to
:copy the transaction to the DB queue thread--but that locks a lot of stuff
:that doesn't need to be locked.  If I'm willing to do the computation, I
:can lock the object tree with the manipulated object's parent at its head
:(that is, if an orange is in the cupboard, lock the cupboard and everything
:in it...but if an orange is in a shoebox in a cupboard, do I lock the
:cupboard or the shoebox?), or I can cheat a little and lock the region of
:space that contains the object in question (each room has a Cartesian grid
:underlying it--if the orange in the shoebox in the cupboard is at (5,5),

As I use a rather distinctly different model (everything is a container,
and threads occur at the lowest "occupied" container and up, with main 
locks projecting upward to the maximum "event space" of an event... I use
process locks instead of mutexes... my own thread model, based on pthreads.
In short, I reduce everything to single threaded for regions of possible
conflict using a you-enter-first bailout, then reengaging lower levels. I
have recently been looking at a way to allow lower level threads along all
but affected branches of the process tree to continue. Again... I really
have been meaning to post a bunch of design documentation for this, but I
have had time pinching like you wouldn't believe. Combination of work, my
practice schedule (race on Saturday, we've stepped up practice), GF, etc.
And the design docs need some rework before I post them. I'm not planning
to post the algorithms for some of it... I spent tens of hours working the
math for those, and plan to keep them.

:lock all objects which are at (5,5)).  This works up until I want objects
:that occupy multiple spaces; for instance, ropes.  However, ropes are such
:hideously intractable objects (rec.arts.int-fiction yells about this at
:least once a month) that I'm tempted to go with a purely localized object
:model and do spatial locking, at least for now.

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

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

Nathan F. Yospe - Aimed High, Crashed Hard, In the Hanger, Back Flying Soon
Jr Software Engineer, Textron Systems Division (On loan to Rocketdyne Tech)
(Temporarily on Hold) Student, University of Hawaii at Manoa, Physics Dept.
yospe#hawaii.edu nyospe#premier.mhpcc.af.mil <A  HREF="http://www2.hawaii.edu/~yospe/">http://www2.hawaii.edu/~yospe/</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="00499" HREF="msg00499.html">[MUD-Dev] Toba Java-&gt;C</A></strong>
<ul compact><li><em>From:</em> "Adam J. Thornton" &lt;adam#phoenix,Princeton.EDU&gt;</li></ul>
<li><strong><A NAME="00498" HREF="msg00498.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>
<ul compact><li><em>From:</em> "Adam J. Thornton" &lt;adam#phoenix,Princeton.EDU&gt;</li></ul>
</UL></LI></UL>
<!--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>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00495.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00497.html">[MUD-Dev] Re: Alternate UOL's</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00491.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00498.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00496"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00496"><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="00493" HREF="msg00493.html">[MUD-Dev] Re: 3D World Models</A></strong>, 
S. Patrick Gallaty <a href="mailto:choke#sirius,com">choke#sirius,com</a>, Wed 05 Aug 1998, 16:12 GMT
<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>
</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>