1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev]  Event handling &#45; some definitions -->
<!--X-From-R13: "Xba O. Znzoreg" <wyflfvapNvk.argpbz.pbz> -->
<!--X-Date: Tue, 13 Jan 1998 00:55:10 +0000 -->
<!--X-Message-Id: 199801130055.SAA27696@dfw&#45;ix14.ix.netcom.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199801112109.NAA04638#under,Eng.Sun.COM -->
<!--X-Reference: Pine.PMDF.3.95.980112092757.543169343A&#45;100000#nova,wright.edu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev]  Event handling - some definitions</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>
[&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="msg00221.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00223.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00209.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00245.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00222">Author</A>
&nbsp;|&nbsp;<A HREF="#00222">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00222">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev]  Event handling - some definitions</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>: [MUD-Dev]  Event handling - some definitions</LI>
<LI><em>From</em>: "Jon A. Lambert" &lt;<A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</A>&gt;</LI>
<LI><em>Date</em>: Mon, 12 Jan 1998 19:56:37 -4</LI>
<LI><em>Comments</em>: Authenticated sender is &lt;jlsysinc#popd,ix.netcom.com&gt;</LI>
<LI><em>Reply-to</em>: <A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</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 12 Jan 98 at 7:43, s001gmu#nova,wright.edu wrote:
&gt; On Sun, 11 Jan 1998, JC Lawrence wrote:
&gt; 
&gt; &gt; On Fri, 9 Jan 1998 15:00:37 PST8PDT 
&gt; &gt; Vadim Tkachenko&lt;vadimt#4cs,com&gt; wrote:
&gt; &gt; 
&gt; &gt; &gt; But once again, I emphasize, the difference is between treating
&gt; &gt; &gt; everything as EVENTS and PROCESSES.
&gt; &gt; 
&gt; &gt; Note: "event" is actually a very poor term for what we are describing
&gt; &gt; here.  They really aren't events, but I'm unsure of a better name for
&gt; &gt; them.  
&gt; 
&gt; Actions?   
&gt; 

Just thought I'd re-edit and repost this from the May archive:

----------------------------------------------------------------------

Event Modeling:
* An event is something that happens at a point in time.
* An event has no duration.
* Two events may be said to precede or follow another or may be unrelated. 
* Those that are unrelated are said to be concurrent. 
* An event is a one way transmission of information from one   
  object/subsystem to another object/subsystem. 
* It is not like a subroutine, thus there is no return.  An 
  object/subsystem may expect a reply, but this reply would be in the form 
  of an event under control of the second object/subsystem. 
* Objects/subsystems are considered to be concurrent.

Event-driven systems:
* Control resides within a dispatcher/monitor provided by the
   language/subsystem/OS.

* Procedures are attached to events and are called by the dispatcher when 
  the event occurs.
* All event procedures return control to the dispatcher.  They never retain 
  control.
* Program state cannot be preserved using the program counter and stack 
  because procedures return control to the dispatcher.
* Procedures must use global variables to maintain state or the dispatcher
  must maintain local state for them.
* Event-driven systems simulate cooperating processes within a single
  multi-threaded task. (multi-threading can also be simulated within the 
  dispatcher/monitor BTW)
* A good example of such a system would be Sun View.

Concurrent Systems:
* Control resides in several independent objects/subsystems.
* Events are implemented directly as one-way messages.
* A task can wait for input, but other tasks continue execution.
* The operating system "usually" provides the queuing mechanism.
* Unix is a concurrent system.  Ada supports concurrent tasking.

Procedure-driven Systems:
* Control resides within the procedural code.
* Procedures issue requests for input and then wait for it.  When input
   arrives control resumes within the procedure that made the request.
* An operation corresponds to a pair of events.  An input event and an 
  output event. {Usually implemented with call (values,...) and   return 
  (values,...) } 
* Gadzillions of programs are like this.

Many systems have subsystems which exhibit one or more of the above.
Some systems are hybrids of one or more of the above.

Some (P)ros and (C)ons-

Procedural Systems
P - very easy to implement with conventional languages
C - requires concurrency inherent in objects to be mapped into a
    sequential flow of control.
C - asynchronous input cannot be easily accommodated.
C - flexible user-interfaces are hard to build.

Event Systems
C - difficult to implement with standard languages.
P - more modular and handle error conditions better.
C - an errant procedure can block the entire application so
    good design is critical.
P - flexible control patterns can be simulated.

Concurrent Systems
P - takes advantage of SMP, parallel processing or multi-threading.
C - even more difficult to implement with conventional languages  
    because data consistency problems, code/data locking and race     
    conditions need to be handled. 
P - extremely modular and strong susbsytem separation.

cf. primarily from "Object-Oriented Modeling &amp; Design" - Rumbaugh, Blaha,
Premerlani, Eddy and Lorensen and "Rapid System Development" - Gane

-------------------------------------------------------------------- 
--
Jon A. Lambert
"Everything that deceives may be said to enchant" - Plato

</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="00198" HREF="msg00198.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></STRONG>
<UL><LI><EM>From:</EM> JC Lawrence &lt;claw#under,Eng.Sun.COM&gt;</LI></UL></LI>
<LI><STRONG><A NAME="00209" HREF="msg00209.html">Event handling (was: request for comments)</A></STRONG>
<UL><LI><EM>From:</EM> s001gmu#nova,wright.edu</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00221.html">Re: [MUD-Dev] Clients</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00223.html">[MUD-Dev] Event Handling</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00209.html">Event handling (was: request for comments)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00245.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00222"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00222"><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>Event handling (was: request for comments)</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00153" HREF="msg00153.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Fri 09 Jan 1998, 21:51 GMT
<UL>
<LI><strong><A NAME="00155" HREF="msg00155.html">Re: [MUD-Dev]  Event handling (was: request for comments)</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Fri 09 Jan 1998, 23:03 GMT
<UL>
<LI><strong><A NAME="00198" HREF="msg00198.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Sun 11 Jan 1998, 21:09 GMT
<LI><strong><A NAME="00209" HREF="msg00209.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Mon 12 Jan 1998, 14:41 GMT
<LI><strong><A NAME="00222" HREF="msg00222.html">[MUD-Dev]  Event handling - some definitions</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 13 Jan 1998, 00:55 GMT
</LI>
<LI><strong><A NAME="00245" HREF="msg00245.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Fri 16 Jan 1998, 04:31 GMT
<LI><strong><A NAME="00246" HREF="msg00246.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Fri 16 Jan 1998, 15:35 GMT
</LI>
</LI>
</LI>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00195" HREF="msg00195.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Sun 11 Jan 1998, 20:44 GMT
<UL>
<LI><strong><A NAME="00207" HREF="msg00207.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
Matt Chatterley <a href="mailto:root#mpc,dyn.ml.org">root#mpc,dyn.ml.org</a>, Mon 12 Jan 1998, 10:02 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</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>