<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.5pt;
font-family:Consolas;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:Consolas;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoPlainText>I am committing a set of patches this week which make
data access and locking of presences within the scene graph more consistent.
There are currently many ways to get presence data from the scene graph and/or
iterate over it. To name a few, there are GetScenePresence, TryGetAvatar,
GetScenePresences and ForEachScenePresence. Unfortunately, some of these have
relied on the callers locking the list or checking for null references which
was missing in many places.<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>The patches move all locking into SceneGraph, eliminate
GetScenePresence in favor of TryGetAvatar, and consolidates the two different
presence iteration patterns. Instead of calling GetScenePresences() and
iterating over the result, modules and other code should call
ForEachScenePresence(Action<ScenePresence>) and let SceneGraph do the
parallel work. Eventually this will also mean that the list does not need to be
copied or locked in order to iterate since it changes infrequently but is
iterated my many callers simultaneously.<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>The goal is to move SceneGraph toward a self-supporting
container of entities with properties and a small lightweight interface for
adding, removing, and performing actions on the container through the use of
properties/components, filters, and delegates. Supporting or allowing a module
to grab a reference to the internal array of presences and lock it so that no
other thread may add/remove/iterate is seriously limiting scalability and has
introduced reliability issues and races between the scene and some modules.<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>Dan lake<o:p></o:p></p>
<p class=MsoPlainText>Intel Labs<o:p></o:p></p>
<p class=MsoPlainText><a href="mailto:dan.lake@intel.com">dan.lake@intel.com</a><o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>