1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: CORBA, RMI, threads -->
<!--X-From-R13: f001tzhNabin.jevtug.rqh -->
<!--X-Date: Mon, 26 Jan 1998 20:37:28 +0000 -->
<!--X-Message-Id: Pine.PMDF.3.95.980126143445.543226142B&#45;100000#nova,wright.edu -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 34CCBC86.41C67EA6#efrei,fr -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, CORBA, RMI, threads</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:s001gmu#nova,wright.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="msg00323.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00325.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00323.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00331.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00324">Author</A>
&nbsp;|&nbsp;<A HREF="#00324">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00324">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>CORBA, RMI, threads</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>: CORBA, RMI, threads</LI>
<LI><em>From</em>: <A HREF="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</A></LI>
<LI><em>Date</em>: Mon, 26 Jan 1998 15:37:34 -0500 (EST)</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>


On Mon, 26 Jan 1998, Marc Eyrignoux wrote:
&gt;
&gt; &gt; Speaking of which, someone (Chris L, I think) once posted several CORBA

attribution?

&gt; &gt; :* a thread for the time (in my mud, 3mn_real_life=1h_mud_life)
&gt; &gt; 
&gt; &gt; Whoa, whoa, whoa! What? Er... I think you'll find you are a lot better off
&gt; &gt; coordinating with a system clock or somewhat, instead of trying to make a
&gt; &gt; clock thread (which will go asynchronous, and screw you up royally.)
&gt; May I know how the code has to look like?

The major issue in dealing with a game clock that runs faster than real
time is adjusting in-game delays to the new scale.. IE: if 3 rl minutes ==
1 mud hour, and you have a spell that lasts 1 hour, it has to wear off in
3 minutes real time.  An easy way to do this might be to write a simple
function that converts a real time value to game time... something like:

time_struct real_to_game_time(time_struct &amp;rt);

and use it like so:

time_struct t;
...
t.hours = 1;
...
event_diver.schedule(new event(real_to_game_time(t)));

or some such.

For time events, (IE: rising of the moon, setting of the sun, etc), you
can just use an event chain with delays set appropriately.

&gt; &gt; Hash table of instances, an instance is a collection of references to a
&gt; &gt; client-side database coupled with a server-side physical model and behavior
&gt; &gt; model. You won't find better than a well implemented hash table, believe me
&gt; &gt; I tried. Dynamic trees are the next best thing.
&gt; In the case of a Hashtable, how can you store 2 identical monsters?
&gt; I think that 2 orks have the same server-side models. Is the difference
&gt; made at the client-side refernces? (I take the case where 2 orks are at
&gt; the same location, have the same number of lifepoints...)

I would us something other than location, lifepoints, or creature type as
the primary key.  typically, a unique object id assigned at creation of
the object.  Counters work well, unless you have a high turnover rate, at
which time you'd need to adopt some recycling method.

more generally, there are lots of methods for dealing with hash-tale
collisions.  as long as collisions should be infrequent (IE: you have a
sufficiently large hash table), you can get away with the entries in the
table being a linked list of all colliding entries.  with lengths of one
or two in the list, the cost is minimal.

[in response to one thread / connection, I presume]
&gt; &gt; Er... bad idea. You don't want your OS to choke on the threads; a lot of
&gt; &gt; Unix's will. Solaris and IRIX, for example...
&gt; As my teachers give me unlimited access to every resources I want, my
                         
must be nice... ;)

&gt; server will run alone on a Linux PC.

Linux thread libs are the same libs as for Unix systems... just compiled
under linux.  They suffer from the maximum thread count imposed on Unix
systems too.  I don't recall exactly why there is a max number, but it has
to do with some system defined limit that the thread libs can't get
around.  so far.  AFAIK, one thread using a select() statement should work
well to manage all the input streams from the sockets.  DIKU, all it's
faults aside, does not seem to have any undue lag resulting from it's
method of input management, and it uses select().

-Greg



</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="00323" HREF="msg00323.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></STRONG>
<UL><LI><EM>From:</EM> Marc Eyrignoux &lt;Marc.Eyrignoux#efrei,fr&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00323.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00325.html">The Anti-Mac Interface</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00323.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00331.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00324"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00324"><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]  CORBA, RMI, threads</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00307" HREF="msg00307.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Sun 25 Jan 1998, 03:32 GMT
<UL>
<LI><strong><A NAME="00443" HREF="msg00443.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Thu 12 Feb 1998, 22:22 GMT
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="00300" HREF="msg00300.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Fri 23 Jan 1998, 18:58 GMT
<UL>
<LI><strong><A NAME="00323" HREF="msg00323.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Marc Eyrignoux <a href="mailto:Marc.Eyrignoux#efrei,fr">Marc.Eyrignoux#efrei,fr</a>, Mon 26 Jan 1998, 16:40 GMT
<UL>
<LI><strong><A NAME="00324" HREF="msg00324.html">CORBA, RMI, threads</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Mon 26 Jan 1998, 20:37 GMT
</LI>
<LI><strong><A NAME="00331" HREF="msg00331.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Brandon Gillespie <a href="mailto:brandon#roguetrader,com">brandon#roguetrader,com</a>, Tue 27 Jan 1998, 21:26 GMT
<UL>
<LI><strong><A NAME="00334" HREF="msg00334.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
Marc Eyrignoux <a href="mailto:Marc.Eyrignoux#efrei,fr">Marc.Eyrignoux#efrei,fr</a>, Wed 28 Jan 1998, 10:09 GMT
<UL>
<LI><strong><A NAME="00340" HREF="msg00340.html">CORBA, RMI, threads</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Thu 29 Jan 1998, 14:46 GMT
<LI><strong><A NAME="00468" HREF="msg00468.html">Re: [MUD-Dev]  CORBA, RMI, threads</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sun 15 Feb 1998, 13:38 GMT
</LI>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</ul>
</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>