2000Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] distributed objects -->
<!--X-From-R13: pwbarfNbar.arg -->
<!--X-Date: Mon, 14 Feb 2000 09:21:45 &#45;0800 -->
<!--X-Message-Id: 0bf973501110e20FE3#mail3,cinci.rr.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 200002140509.QAA00821#nara,off.connect.com.au -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] distributed objects</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cjones#one,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="msg00308.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00307.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00333.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00309.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00306">Author</A>
&nbsp;|&nbsp;<A HREF="#00306">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00306">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] distributed objects</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] distributed objects</LI>
<LI><em>From</em>: <A HREF="mailto:cjones#one,net">cjones#one,net</A></LI>
<LI><em>Date</em>: Mon, 14 Feb 2000 06:03:39 -0500 (EST)</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 14 Feb, Kevin Littlejohn wrote:

&lt;!--snip--&gt;

Caveat: I'm approaching this from the standpoint of a Java
programmer...that includes Java Remote Method Invocation (RMI) which
establishes an object's methods that can be called via a Java Interface.

&gt;   ------------------------------------------------------------------------
&gt; 
&gt; (Ramble about caps and object trustworthiness)
&gt; 
&gt; Ok, we were discussing the other day the whole 'objects interrelating' thing.
&gt; My original thought was that each object was an entity unto itself - the "pure"
&gt; object view, where nothing is changed in an object except by asking the
&gt; object to change it, and each object itself is master of it's own domain.
&gt; Interestingly enough, that's the first precept of the writings at
&gt; www.erights.org, regarding caps systems over distributed objects.
&gt; 
&gt; Phil's comment on that was that it's impossible to construct a decent fight
&gt; system, for instance, under that setup, because you can never guarantee that
&gt; an object has actually decremented it's hit points when it's been asked to.
&gt; The solution he had to this was a 'mediator' setup, tied into the caps system,
&gt; which I kinda like.  Basically as follows:
&gt; 
&gt; 1) We have caps over various ops on various attributes of objects.  In the caps
&gt; world, this means we make a 'key', that says 'whoever holds this key can change
&gt; my hit points'.
&gt; 
&gt; 2) We have objects talking to each other, if they want to let others change
&gt; their hit points, they hand them the key.  All well and good to here.  The
&gt; degenerate case is that every object has the 'set' keys to it's own attributes,
&gt; and 'get' keys for all other object's attributes.
&gt; 
&gt; 3) Now we introduce mediators.  These would define a context of 'being' -
&gt; to join that context, you'd have to satisfy the mediator's conditions.  Those
&gt; conditions would be expressed in terms of keys - the mediator would say 'to
&gt; participate in this context, you're going to have to give me the key to set
&gt; your hitpoints, and drop it yourself.'  If an object chooses not to participate,
&gt; it's effectively ignored, and cannot use the facilities provided by that
&gt; mediator/context.  If it chooses to participate, it hands over the keys to
&gt; its hitpoints, and can no longer set them itself.
&gt; 
&gt; This seems like a neat idea - it allows us to move the world mechanics
&gt; completely into the world itself (no comments about defining a system
&gt; within the system being impossible, please ;).

By making all the object properties public, then you can perform
verification that is assured to be accurate--it's not necessarily the
object's methods returning the property value, but the machine itself.

However, you still want to perform setter operations through the
mechanics provided by the object. In that way, the object can perform
housekeeping as certain conditions occur:

- it's not the caller's job to know that the object has just died or
  entered some other state (mortally wounded, bleeding, etc.)
- it's not the caller's job to know that the object is immortal or
  invulnerable, such that no damage can occur to the object, or that the
  object can assume damage, but can never enter the dead state
- it makes world mechanics so much easier to assume that the object is
  the authority, so that healing or other external manipulations can
  take place by notifying the single object, not broadcasting for the
  last caller who may hold the lock. (This is one of the things I like
  least about the caps/key system--even if the lock is published on a
  global data structure, you can run into race conditions.)

All objects that implement that 'Attackable' interface, for example,
know how to BE attacked. It's the individual object's implementation
that varies, though most will pass the attack call to a utility class
(which acts as a mediator, though this can be bypassed). In this way,
you can make sure that certain objects like doors, windows, or equipment
that can be damaged or destroyed don't require special methods to assume
that damage. Specialized classes like NPCs can capture relevant
information about the attacker and use it for hate lists, notifications
to allies, etc.

But no, there's nothing to prevent the objects from lying about their
state. The assumption is, even with remote classes and objects being
loaded into the machine, that all objects follow the contract put forth
in the Interfaces (that a PC (superclass to NPC and Player) will always
implement Attackable) and that the implementation is correct.


&gt; I was thinking further about this today, after running across
&gt; <A  HREF="http://home.devlocus.org/psion/prog/manifesto.html">http://home.devlocus.org/psion/prog/manifesto.html</A> - someone's 3D distributed
&gt; object engine.  The major flaw in the above is that this all relies on some
&gt; way of verifying that the object is actually telling the truth about having
&gt; reliquished the keys.  We can guarantee that's so in our current case,
&gt; because we control the object data, but should we be paying some thought to
&gt; the idea of distributing the objects themselves - data and all?  How would you
&gt; guarantee that a remote object is behaving the way it claims to be behaving?
&gt; Is this the same problem EverQuest et al face with clients that have too
&gt; much information, and is there a solution?  If there isn't, does that mean
&gt; that multi-user games are ever and anon going to have to store all data
&gt; server-side, and perform all manipulations there likewise?

I would tend to consider that trust in those objects would only come
when the objects originate from a trusted server. Objects are signed as
they pass enter the network. The signature is used to verify the origin,
with each server using a server key that is registered with the
destination server. Bad code could only enter the trust network if a
trusted host acts to relay and resign the classes, rather than indicate
that the classes should be loaded from the untrusted host. You can do 
the same thing with clients that keep part of the state of the
world--only do business with those that already have that relationship
(signature) established.

Please note that because of my Java heritage, I'm not worried about
execution of bad RMI code on my server from some other server. The code
will actually execute against the data on that other server, on that
other server's VM. I'm waiting for a reply to my method calls, and if
the other server has poorly written code that consumes all of its VM,
it's not my problem--I just need to catch those exceptions and provide
for timeouts. My VM keeps on trucking.

Alternatively, if you design your own VM that doesn't perform RMI, you
can perform verification of the class methods as they enter your system
and check them for correctness. I think it's just easier, however, to
designate which servers you trust.


&gt; One alternative would be to enforce the keys thing above by migrating
&gt; object data to the server where the object relinquishes control over it - so
&gt; in the degenerate case, all objects carry their own data, but when they
&gt; choose to participate in a context, they relinquish control of their data
&gt; not only by handing the keys over, but by handing the data over as well.  This
&gt; has synchronisation issues, especially if the object is being used on
&gt; multiple different services (thinks sideways toward the idea of a single
&gt; avatar for multiple games, grins, carries on), but that might be an easier
&gt; to address issue than trust of remote objects...

This whole message sounds a lot like some of the issues they've had with
the GPLed Quake, recently, except that you don't play multiple games at
once.

&gt; Rambling,
&gt; KevinL

Chris Jones






_______________________________________________
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="00304" HREF="msg00304.html">[MUD-Dev] distributed objects</A></STRONG>
<UL><LI><EM>From:</EM> Kevin Littlejohn &lt;darius#connect,com.au&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00308.html">Re: [MUD-Dev] distributed objects</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00307.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00333.html">Re: [MUD-Dev] distributed objects</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00309.html">Re: [MUD-Dev] distributed objects</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00306"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00306"><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] distributed objects</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00321" HREF="msg00321.html">Re: [MUD-Dev] distributed objects</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 15 Feb 2000, 07:17 GMT
</LI>
<LI><strong><A NAME="00327" HREF="msg00327.html">Re: [MUD-Dev] distributed objects</A></strong>, 
Vijay Weasel Prabhakar <a href="mailto:weasel#cs,columbia.edu">weasel#cs,columbia.edu</a>, Tue 15 Feb 2000, 19:57 GMT
<UL>
<LI><strong><A NAME="00330" HREF="msg00330.html">Re: [MUD-Dev] distributed objects</A></strong>, 
Phillip Lenhardt <a href="mailto:philen#funky,monkey.org">philen#funky,monkey.org</a>, Tue 15 Feb 2000, 20:59 GMT
</LI>
<LI><strong><A NAME="00333" HREF="msg00333.html">Re: [MUD-Dev] distributed objects</A></strong>, 
David Bennett <a href="mailto:ddt#discworld,imaginary.com">ddt#discworld,imaginary.com</a>, Tue 15 Feb 2000, 21:44 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
<LI><strong><A NAME="00306" HREF="msg00306.html">Re: [MUD-Dev] distributed objects</A></strong>, 
cjones <a href="mailto:cjones#one,net">cjones#one,net</a>, Mon 14 Feb 2000, 17:21 GMT
</LI>
<LI><strong><A NAME="00309" HREF="msg00309.html">Re: [MUD-Dev] distributed objects</A></strong>, 
F. Randall Farmer <a href="mailto:randy#communities,com">randy#communities,com</a>, Mon 14 Feb 2000, 18:37 GMT
<UL>
<LI><strong><A NAME="00313" HREF="msg00313.html">Re: [MUD-Dev] distributed objects</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 15 Feb 2000, 00:49 GMT
<UL>
<LI><strong><A NAME="00315" HREF="msg00315.html">RE: [MUD-Dev] distributed objects</A></strong>, 
Gary Whitten <a href="mailto:undiscoveredworlds#mediaone,net">undiscoveredworlds#mediaone,net</a>, Tue 15 Feb 2000, 02:21 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00316" HREF="msg00316.html">Re: [MUD-Dev] distributed objects</A></strong>, 
Kevin Littlejohn <a href="mailto:darius#connect,com.au">darius#connect,com.au</a>, Tue 15 Feb 2000, 03:04 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>