Home   :   Other Stuff   :   xUML in Second Life   :   Inner Workings

 

How the Simulation Works

 

The basic building block in Second Life is called a prim and appears to the user as box (cuboid) or potentially any other shape.  As in Real Life, Second Life is a highly concurrent event driven system and every prim in the model contains a script which runs as single concurrent process.  Prims communicate by sending messages to each other and this is their only means of communication.  There are no shared variables or common memory areas.

Messages are broadcast by prims on specified channels which are monitored by receiving prims.  If a prim is too busy to deal with its messages, they are queued (separately at each prim) until processed.  A prim's script is organised into states and each state can be made to react to a different set of system events, user events or prim to prim messages (they all use the messaging mechanism).  In this respect a script's structure maps to the xUML formalism very well indeed, although there are drawbacks.

 

It was found that occasionally a part of the model would get out of synchronisation with some other part causing the simulation to look wrong for a while.  This typically occurred because there had been a delay, either in the client browser or in the server at Second Life and as a result a message was delivered or processed late.  This was usually rectified when the delayed messages were processed.

Copyright © 2017 Dark Matter Systems Ltd. All Rights Reserved.