[MUD-Dev] Question about multithreaded servers

Jon A. Lambert jlsysinc at ix.netcom.com
Sun Jan 16 22:52:17 CET 2000


Fabian wrote:
>
>I wasn't planning on having a fully transactional-based system, or
>otherwise, that is surely the most attractive and elegant approach.  I may
>just have to cut that ability out, or find a way to reorganize it where it
>will fail gracefully if a lock attempt times-out.  I suppose just by making
>a simple requirement that all objects must be secured at the begining of the
>script would take care of that.  

Not a simple requirement though.  How about this sort of script construct:

for player in connected
   player.message("How about some spam!?!")
endfor

Do you lock every player object in the connected list?  
Would the above method be an atomic transaction requiring
completion of all events it would generate?
Or would you spawn a new event to each player object, 
and not worry about completion thus making the method 
above non-atomic?  

And what about guaranteeing event sequence?

for player in connected
   player.message("LINE 1")
   player.message("LINE 2")
   player.message("LINE 3")
endfor

Perhaps when sending "LINE 1" the lock cannot be achieved and
is rescheduled or terminated.  So the Player receives:

"LINE 2"
"LINE 3"
"LINE 1"

Just a few things to think about.  :)

--
--*     Jon A. Lambert - TychoMUD Email: jlsysinc at nospam.ix.netcom.com     *--
--*     Mud Server Developer's Page <http://jlsysinc.home.netcom.com>      *--
--* "No Free man shall ever be debarred the use of arms." Thomas Jefferson *--





_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list