[Opensim-dev] ScriptServer communication

Stefan Andersson stefan at tribalmedia.se
Fri Oct 12 13:49:57 UTC 2007


Tedd,
 
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.
 
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.
 
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.
 
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)
 
Or, you could hook into the UpdateMovement / Simulate / Update chain to Perform Writes / Halt / Perform Reads. (having two request queues)
 
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.
 
I still feel you will get a lot more bang for your buck by leaving the LSL event/object model and tailor something new.
 
It's a dead cool initiative though.
 
All the best,
/Stefan


Date: Sat, 6 Oct 2007 02:08:59 +0200From: tedd at konge.netTo: opensim-dev at lists.berlios.deSubject: [Opensim-dev] ScriptServer communication




[23:15:56] <Tedd> ok... so I got this neato plan on getting stand alone ScriptEngine working, and making good progress...
[23:15:56] <Tedd> BUT - I need some feedback
[23:15:56] <Tedd> Communication between stand alone ScriptEngine and the Region... How to handle... here are a few keywords:
[23:15:56] <Tedd> * Event from region to ScriptEngine (to script) for create new script and for the 16 events like touch_start.
[23:15:56] <Tedd> * LSL command to manipulate something in-world from script to region
[23:15:56] <Tedd> * LSL command to query something in-world and have it returned as an LSL event
[23:15:56] <Tedd> nevermind local LSL commands like timers or http get, those will be handled in scriptengine internally
[23:15:56] <Tedd> * Now the problem: LSL Commands that query/set parameters in-world and expect imediate reply
[23:15:56] <Tedd> And of course:
[23:15:56] <Tedd> * Latency
[23:15:56] <Tedd> * Being able to put many commands (from one specific scriptengine to one specific region) into one request
 
I have been doing some thinking and had a good discussion with Tleiades.
Would like more inputs?
 

EVENTS: Region -> Script
FUNCTION CALL (no feedback): Script -> Region
FUNCTION CALL (feedback): Script -> Region
 
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.
 
I’m thinking of going for a .Net Remoting with simple function calling (one by one) as a first implementation.
 
Sincerely,
 Tedd
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20071012/14682bb3/attachment-0001.html>


More information about the Opensim-dev mailing list