<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Tedd,<BR>
 <BR>
first of all I'd recommend you to build your approach so this isn't tied hard to LSL; much could be gained by inserting a provider interface in there somewhere.<BR>
 <BR>
The 'expect immediate reply' is easier and harder than what one would think; but the easiest approach would be just to halt script execution until the reply comes back.<BR>
 <BR>
I'd suggest you do this by dividing your script executions into 'pieces of work' in such a way that the thread can easily yield if it encounters an synch operation (consider, for example, to do those using the asynch pattern) and let the current thread just go on with the next piece of work.<BR>
 <BR>
Also, I'd say that if you want to code proof, you'd halt the incoming requests until the next update sweep, as otherwise you'll have inconsistent data between sweeps (and between sequential reads)<BR>
 <BR>
Or, you could hook into the UpdateMovement / Simulate / Update chain to Perform Writes / Halt / Perform Reads. (having two request queues)<BR>
 <BR>
Also, you need to decide whether one script host serves many regions, or the opposite; allowing a many-to-many relation would in all probability create a lot of small updates and queries, but choosing a 1-to-many relation would give you an option to queue and send chunks of updates. On a side note, you'd really want some statistics on what events are the most common; world updates or script updates.<BR>
 <BR>
I still feel you will get a lot more bang for your buck by leaving the LSL event/object model and tailor something new.<BR>
 <BR>
It's a dead cool initiative though.<BR>
 <BR>
All the best,<BR>
/Stefan<BR><BR><BR>
<BLOCKQUOTE>
<HR id=EC_stopSpelling>
Date: Sat, 6 Oct 2007 02:08:59 +0200<BR>From: tedd@konge.net<BR>To: opensim-dev@lists.berlios.de<BR>Subject: [Opensim-dev] ScriptServer communication<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass EC_p.MsoNormal, .ExternalClass EC_li.MsoNormal, .ExternalClass EC_div.MsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman';}
.ExternalClass a:link, .ExternalClass EC_span.MsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass EC_span.MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass EC_span.EpostStil17
{font-family:Arial;color:windowtext;}
@page Section1
{size:595.3pt 841.9pt;}
.ExternalClass EC_div.Section1
{page:Section1;}
.ExternalClass ol
{margin-bottom:0cm;}
.ExternalClass ul
{margin-bottom:0cm;}

</STYLE>

<DIV class=EC_Section1>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> ok... so I got this neato plan on getting stand alone ScriptEngine working, and making good progress...</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> BUT - I need some feedback</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> Communication between stand alone ScriptEngine and the Region... How to handle... here are a few keywords:</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> * Event from region to ScriptEngine (to script) for create new script and for the 16 events like touch_start.</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> * LSL command to manipulate something in-world from script to region</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> * LSL command to query something in-world and have it returned as an LSL event</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> nevermind local LSL commands like timers or http get, those will be handled in scriptengine internally</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> * Now the problem: LSL Commands that query/set parameters in-world and expect imediate reply</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> And of course:</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> * Latency</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">[23:15:56] <Tedd> * Being able to put many commands (from one specific scriptengine to one specific region) into one request</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have been doing some thinking and had a good discussion with Tleiades.</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Would like more inputs?</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<UL type=disc>
<LI class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">EVENTS: Region -> Script</SPAN></FONT></LI>
<LI class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">FUNCTION CALL (no feedback): Script -> Region</SPAN></FONT></LI>
<LI class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">FUNCTION CALL (feedback): Script -> Region</SPAN></FONT></LI></UL>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">With 10.000 scripts running, would probably be nice with lazy write on network and sending an array of function calls/events at the time.</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I’m thinking of going for a .Net Remoting with simple function calling (one by one) as a first implementation.</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Sincerely,</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> Tedd</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"> </SPAN></FONT></P></DIV></BLOCKQUOTE></body>
</html>