msg00619.html
1998Q4/msg00619.html · 9.0 KB
From the archive 1998Q4.zip
Download the archive « Back to the archive contents
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD-Dev] Re: DevMUD: Inheritable modules -->
<!--X-From-R13: "Xba O. Znzoreg" <wyflfvapNvk.argpbz.pbz> -->
<!--X-Date: Fri, 30 Oct 1998 23:47:16 -0800 -->
<!--X-Message-Id: 199810310743.BAA11335@dfw-ix10.ix.netcom.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 9810301854160X.22929@d185d1e96 -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: DevMUD: Inheritable modules</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:jlsysinc#ix,netcom.com">
</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>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00618.html">Previous</a>
| <a href="msg00620.html">Next</a>
]
Thread:
[ <a href="msg00606.html">Previous</a>
| <a href="msg00624.html">Next</a>
]
Index:
[ <A HREF="author.html#00619">Author</A>
| <A HREF="#00619">Date</A>
| <A HREF="thread.html#00619">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: DevMUD: Inheritable modules</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: DevMUD: Inheritable modules</LI>
<LI><em>From</em>: "Jon A. Lambert" <<A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</A>></LI>
<LI><em>Date</em>: Sat, 31 Oct 1998 02:44:20 -5</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 30 Oct 98, James Wilson wrote:
> On Fri, 30 Oct 1998, Adam J. Thornton wrote:
>
> >I think there ought to be a one-to-one thread-to-connection mapping (there
> >may of course be non-connection oriented threads going on, but each
> >connection presumably requires its own thread, unless we want to make the
> >I/O model nonblocking, which I think will get unwieldy for large numbers of
> >players). Also message queues of some sort to handle the data that each
> >connection is transporting. >
>
> async i/o and thread pools scale much better than thread-per-connection,
> as I understand it.
I mentioned in an earlier post about not having a core but a set of
modules that together implement core functionality....so in that
vein...
Why couldn't each module implement it's own desired level of
threading. The loader would dynamically load the module and then
start it running using a createthread(), startthread() mechanism.
Each module then starts as a single thread. The module writer need
not even be concerned that they are threaded. Since there seems to be
agreement that a common module interface is necessary, why not make
that small bit of common inter-module interface code thread-safe by
issuing the necessary locking mechanisms within the interface wrapper
itself.
ModuleA calls ModuleB wrapper ----> ModuleB function
ModuleB calls ModuleA wrapper ----> ModuleA function
All the code in the wrapper is fully reusable, generic and
threadsafe. It just contains bindings (data) for the module
it is attached to. Creation of wrappers could even be
automated. It might also be useful to require the loaded
module to use a standard function name (i.e. init()) so
we can have a handle to start a thread on. And perhaps
a kill() or stop() handle.
The base loader could:
dynamic_load()
process_symbols()
build_wrapper()
create_thread()
start_thread()
A module wrapper's data portion might contain a simple message
queue and handled as such. Thus a module could call
the wrapper function receive_message() which pops() the wrapper
queue and causes one of the modules routines to be executed.
The return of the function would of course occur in the wrapper
and any return value is sent_back to the caller via a wrapper
function send_message(). Note that the owning threads during
function calls will be the called module's. So single-threaded
modules can interface easily with multi-threaded modules.
Just some more strange thoughts... :)
--
--/*\ Jon A. Lambert - TychoMUD Internet:jlsysinc#ix,netcom.com /*\--
--/*\ Mud Server Developer's Page <<A HREF="http://www.netcom.com/~jlsysinc">http://www.netcom.com/~jlsysinc</A>> /*\--
--/*\ "Everything that deceives may be said to enchant" - Plato /*\--
</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="00851" HREF="msg00851.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>
<ul compact><li><em>From:</em> James Wilson <jwilson#rochester,rr.com></li></ul>
<li><strong><A NAME="00624" HREF="msg00624.html">[MUD-Dev] Why modules? (Was: Inheritable modules)</A></strong>
<ul compact><li><em>From:</em> Ola Fosheim Grøstad <olag#ifi,uio.no></li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00606" HREF="msg00606.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></STRONG>
<UL><LI><EM>From:</EM> James Wilson <jwilson#rochester,rr.com></LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00618.html">[MUD-Dev] Re: Recursive look</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00620.html">[MUD-Dev] Re: DevMUD Objectives?</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00606.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00624.html">[MUD-Dev] Why modules? (Was: Inheritable modules)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00619"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00619"><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>[MUD-Dev] Re: DevMUD: Inheritable modules</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00705" HREF="msg00705.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>,
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 03 Nov 1998, 06:06 GMT
</LI>
</ul>
</ul>
</ul>
<LI><strong><A NAME="00597" HREF="msg00597.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>,
Darrin Hyrup <a href="mailto:shades#mythicgames,com">shades#mythicgames,com</a>, Fri 30 Oct 1998, 17:25 GMT
<UL>
<LI><strong><A NAME="00599" HREF="msg00599.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>,
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Fri 30 Oct 1998, 18:47 GMT
<UL>
<LI><strong><A NAME="00606" HREF="msg00606.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>,
James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Sat 31 Oct 1998, 00:05 GMT
<UL>
<LI><strong><A NAME="00619" HREF="msg00619.html">[MUD-Dev] Re: DevMUD: Inheritable modules</A></strong>,
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sat 31 Oct 1998, 07:47 GMT
<UL>
<LI><strong><A NAME="00624" HREF="msg00624.html">[MUD-Dev] Why modules? (Was: Inheritable modules)</A></strong>,
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Sat 31 Oct 1998, 14:13 GMT
<LI><strong><A NAME="00627" HREF="msg00627.html">[MUD-Dev] Re: Why modules? (Was: Inheritable modules)</A></strong>,
Thandor <a href="mailto:thandor#donut,dhis.org">thandor#donut,dhis.org</a>, Sat 31 Oct 1998, 15:06 GMT
</LI>
<LI><strong><A NAME="00648" HREF="msg00648.html">[MUD-Dev] Re: Why modules? (Was: Inheritable modules)</A></strong>,
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Sat 31 Oct 1998, 23:04 GMT
<LI><strong><A NAME="00651" HREF="msg00651.html">[MUD-Dev] Re: Why modules? (Was: Inheritable modules)</A></strong>,
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Sun 01 Nov 1998, 00:40 GMT
</LI>
</LI>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</ul>
</ul>
</LI>
</UL></BLOCKQUOTE>
</ul>
<hr>
<center>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>