1999Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Collecting ideas for a MUD server... (fwd) -->
<!--X-From-R13: X Q Znjerapr <pynjNpc.arg> -->
<!--X-Date: Wed, 22 Dec 1999 16:29:28 &#45;0800 -->
<!--X-Message-Id: E120w8C&#45;0001Jw&#45;00@under.eng.cp.net -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.3.96.991222111510.12836A&#45;100000@maul.sith.vpn -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:claw@cp.net">
</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="msg00741.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00743.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00768.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00751.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00742">Author</A>
&nbsp;|&nbsp;<A HREF="#00742">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00742">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</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] Collecting ideas for a MUD server... (fwd) </LI>
<LI><em>From</em>: J C Lawrence &lt;<A HREF="mailto:claw#cp,net">claw#cp,net</A>&gt;</LI>
<LI><em>Date</em>: Wed, 22 Dec 1999 16:29:24 -0800</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>
On Wed, 22 Dec 1999 11:19:09 -0800 (PST) 
Wesley W Terpstra &lt;terpstra#iota,dhs.org&gt; wrote:

&gt; On Wed, 22 Dec 1999, Rahul Sinha &lt;rsinha#glue,umd.edu&gt; wrote:

&gt;&gt; is this more advantageous than coding the mud in C++ and making
&gt;&gt; it scriptable via this language, that way you can have whatever
&gt;&gt; language features you need to write the mud, and still avoid
&gt;&gt; making the scripting langauge overcomplicated....

&gt; Well... The idea is that we would like to be able to change the
&gt; underlying protocol without needing a reboot. This is because we
&gt; wanted to have a special client program to render graphics. That
&gt; way we can use openGL. :-)

You are relating several concepts as being dependent on each other
when they are not.

Some of the items are:

  1) persistance of state across game reboots.
  2) persistance of state across protocol redefinitions.
  3) persistance of player experience across game reboots.
  4) persistance of player experience across protocol redefinitions.
  5) client server architectures and the server state dependencies 
     of the clients
  6) OpenGL in the client

Taking those in order:

  #1 State persistance across reboots really has nothing to do with
the languages the MUD or server are programmed in.  It is a question
of data persistance and re-initialisation.  You can go whole hg as
I've tried to do and to create and use a truly persistent language
where ALL data is ALWAYS persistent no matter what happens to the
system, or you can use your own manual data marshalling and
demarshalling routines with a backing store and handle all the
migrations yourself, or soemthing in between.  

  #2 Gets a little more tricky as it requires an adaptive client.
If you define a meta-protocol for the client such that the client is
able, transparently at runtime, to acquire and implement new methods
in a controlled manner, this can be done.  This is of course easier
to do in a some sort of scripting language (Tcl/TK, Python,
whatever) which provide explicit support for runtime object
import/export, but it can be accomplished with hard coded languages
as well.  The really big concern is security -- data integrity,
corrrectness, and authentication -- for the meta-protocol and the
entire "plugin/replace" process otherwise you run the risk of your
users spending more time killing/taking_advantage_of each other's
clients than of the game.

  #3 Has significant prior art.  The usual method is to fork the
sockets along with some state and authentication data to a holder
process while the game server reboots and then recover them when the
server comes back (method is OS dependent).

  #4 Depends on how elegantly you handle the meta protocol in #2.
If you attempt to go for a base redefinition you require the client
to be able to do a quit/restart and retain state.  An easy way to do
this is in exactly the same manner as #3, just treating the client
as a server.

  #5 Is a rats nest that really has nothing to do with any of the
other points.  It comes down to your definitions of your Finite
State Machines, your protocols (which are state machines in
themselves), and the logical dependencies of your data structures
(which is really part of your over-all FSM).

  #6 Has nothing to do with any of the rest, and exists in
parallel.  

&gt; Writing a scripting language isn't that difficult using flex&amp;bison
&gt; - two tools I've used quite often. 

Having been there, I would strongly recommend ANTLR (was PCCTS) over
the above (see the Library at Kanga.Nu).  You can find some
discussion of all these tools, and others, in the archives.  

Its also worth reading the Crenshaw compiler tutorial.  Building a
decent VM or bytecode engine is trivial only at the very beginning.
You can find a copy in the archives or at ftp.kanga.nu.

&gt; Of course, but how do current in-MUD programming languages handle
&gt; race conditions? Do they do something similar to the java
&gt; synchronize keyword?  Do they use semaphores? What? What? And what
&gt; is the best in peoples opinions?

My own view is that the data and synchronisation model of the base
server should bever be exposed to the User Programmer.  As such I
use a fully persistent language and a mutli-threaded lockless DB
(see the archives) to hide all of this from the users.  Due to this,
User Programmers are able to assume, correctly as happens, that ther
code executes in isolation and with the full control of the system
during that time.

Not-So-Simple-Translation: To the User Programmer the system is a
simple single-threaded linear procedural system without an interrupt
system.

&gt; Our model was going to be more just one virtual machine which
&gt; opens a bunch of ports and connects objects (inMUD language) to
&gt; the sockets and tags on a thread or two. :-) Any problems with
&gt; this model that people have run into?

Beware of thread count performance limits and the "thundering herd"
problem.

&gt;&gt; all commands are implemented as shared libraries, so that they
&gt;&gt; can be dlopen()ed during runtime (so as to not have to take down
&gt;&gt; server)

&gt; Hmmm. That's interesting. I didn't think of that. In fact, I like
&gt; that very much. That's certainly faster than an interpreted
&gt; language.  Maybe the MUD should allow you to code in C++ and
&gt; compile to .so files which it then loads on the fly. Of course
&gt; this is a security can of worms, but...  I will have to think
&gt; about this. Maybe a virtual machine isn't the only solution.

My approach (which is about to change again), uses Python as an
embedded persistent language.  The server itself consists only of a
socket/connection engine, the language interpreter, the DB for the
persistence layer, and an event engine
(Executor/Dispathchor/ThreadPool) to turn the crank.  Everything
else is in the DB under Python.  

Recoding the world, the in-game parser, or anything of that nature
is just a matter of logging into the game and of editing the
appropriate objects in the game world and then watching the game
redefine itself about those new definitions.

Recoding the base server (say a tweak to the event engine), merely
requires killing ths server and having its manager process restart
it (the server is a child of the manager).  The new child server
then inherits all the same old sockets etc from the manager, and as
far as the players are concerned, NOTHING changes in the game world
encluding their running commands and command queues due to the
persistent nature of the base system.

&gt; I want clients to store certificates - player stats on their own
&gt; machines.
...etc on using digital signatures to create a web of trust among
servers for character edits...

Hurm.  Neat idea.  The problems with rogue servers are obvious, but
probably can be either worked around or simply accepted for most
cases.

&gt; You see the potential? Forgetten realms characters can walk into
&gt; Ravenloft and some of their skills carry over and some don't. They
&gt; are now under the Ravenloft admin's jurisdiction and any missing
&gt; skills can be explained away as: "physically impossible to do a
&gt; flying roundhouse kick from a ..."

The next problem of course is when the base models of the two MUDs
are so entirely different that little to nothing translates.  Add
any sort of user programming to the scene and it gets *really*
messy.

-- 
J C Lawrence                              Internet: claw#kanga,nu
----------(*)                            Internet: coder#kanga,nu
...Honorary Member of Clan McFud -- Teamer's Avenging Monolith...


_______________________________________________
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="00724" HREF="msg00724.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></STRONG>
<UL><LI><EM>From:</EM> "Wesley W. Terpstra" &lt;terpstra@iota.dhs.org&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00741.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00743.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00768.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00751.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00742"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00742"><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] Collecting ideas for a MUD server... (fwd)</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00731" HREF="msg00731.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
Greg Miller <a href="mailto:gmiller@classic-games.com">gmiller@classic-games.com</a>, Wed 22 Dec 1999, 21:32 GMT
<UL>
<LI><strong><A NAME="00752" HREF="msg00752.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
Rahul Sinha <a href="mailto:rsinha@glue.umd.edu">rsinha@glue.umd.edu</a>, Thu 23 Dec 1999, 05:39 GMT
<UL>
<LI><strong><A NAME="00761" HREF="msg00761.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
Wesley W. Terpstra <a href="mailto:terpstra@iota.dhs.org">terpstra@iota.dhs.org</a>, Thu 23 Dec 1999, 17:00 GMT
<UL>
<LI><strong><A NAME="00768" HREF="msg00768.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
J C Lawrence <a href="mailto:claw@kanga.nu">claw@kanga.nu</a>, Thu 23 Dec 1999, 17:08 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00742" HREF="msg00742.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
J C Lawrence <a href="mailto:claw@cp.net">claw@cp.net</a>, Thu 23 Dec 1999, 00:29 GMT
</LI>
</ul>
<LI><strong><A NAME="00751" HREF="msg00751.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
Rahul Sinha <a href="mailto:rsinha@glue.umd.edu">rsinha@glue.umd.edu</a>, Thu 23 Dec 1999, 05:36 GMT
<UL>
<LI><strong><A NAME="00753" HREF="msg00753.html">[MUD-Dev] PGP player certificates (was: collecting ideas...)</A></strong>, 
Wesley W. Terpstra <a href="mailto:terpstra@iota.dhs.org">terpstra@iota.dhs.org</a>, Thu 23 Dec 1999, 05:39 GMT
<UL>
<LI><strong><A NAME="00766" HREF="msg00766.html">Re: [MUD-Dev] PGP player certificates (was: collecting ideas...)</A></strong>, 
David Bennett <a href="mailto:ddt@discworld.imaginary.com">ddt@discworld.imaginary.com</a>, Thu 23 Dec 1999, 17:00 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00758" HREF="msg00758.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
J C Lawrence <a href="mailto:claw@kanga.nu">claw@kanga.nu</a>, Thu 23 Dec 1999, 07:50 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>