[Opensim-users] Room management application

Justin Clark-Casey jjustincc at googlemail.com
Fri Apr 29 23:59:23 UTC 2011


On 29/04/11 08:34, Karl Haas wrote:
> Dear OpenSim users,
>
> I'm an Austrian student and I'm writing my master's thesis about flexible learning environments in virtual worlds. The
> practical part of the work will be a web-based room configuration and reservation tool. The configured rooms (walls,
> chairs, tables, whiteboards, ...) should be generated automatically by the application within an OpenSim region.
>
> I just started with OpenSim and I have read about Application Plugins, Region Modules (which i could use to create and
> manage the objects) and the REST features. I have some questions concerning the realisation in OpenSim:
>
>     * What's are possible ways to communicate with an external service (e.g. the room manager)?

Hi Karl.  There are many ways, including communication out of scripts (via llHTTPRequest) and direct communication via 
region modules.

>     * How can objects (chairs, tables, whiteboards, ...) be crated by scripting?

By scripting, this can be done via llRezObject().  There are many examples of this on the web, I'm sure.  Things can 
also be created directly from region modules though this is currently a little tricky.  I don't know of any good example 
public code but the regression test code might be worth looking at.

>     * How can the content or the state of an object (e.g. whiteboards) be saved externally?

If you're able to use Viewer 2 (though unfortunately there are some restrictions with this at present with OpenSim) then 
the easiest way may be to use media on a prim to display whiteboard web pages from some external application that 
synchronizes state between people looking at different webpages for the same whiteboard.

Alternatively, I think that the Immersive Education folks (http://immersiveeducation.org/) have a tool that enables a 
whiteboard with older Second Life viewers, though I can't remember what the exact mechanism is.

>     * How can I save the state of an object immediately after it has been changed (e.g. whiteboard content modified)?

As before, by far the easier method is to use an existing synchronized whiteboard app if possible.

>     * In order to create a RESTful API, would it be a suitable approach to extend the class RestPlugin?

The RestPlugin has not been maintained for a long time, unfortunately, and is almost completely non-functional now, 
afaik.  One would have to create ones own web services using the HttpServer facilities available in OpenSim.  If you 
don't know the code, this probably isn't particularly simple though there might be public example code for this in the 
coming months.  On a basic level, one could also look through the code that uses HttpServer in OpenSim, though none of 
that implements much of a REST interface afaik.

>     * Would it be an appropriate approach to write a region module, which creates and manages the rooms and the objects
>       within the rooms?

Personally, I would recommend this approach if you're familiar with C# and don't mind spending quite a lot of time 
looking through OpenSim code (and asking questions).  The advantage over scripts is that there are no delays or any need 
to perform synchronization between operations that occur on different script engine threads.  Also, one gets to use all 
the power of C# and a good IDE.  One can implement sophisticated applications this way without using scripts at all, or 
one can use a hybrid script + region module approach.

The disadvantage is that the OpenSim internal 'APIs' are ad-hoc and often undocumented and little good example code yet 
exists of writing these kinds of modules.

The advantage of scripts is that one can port them to other hosts without requiring server access.  And if one sticks to 
LL functions then one can port them to Linden Lab's grid (though there are some gotchas due to subtle differences 
between the XEngine script engine, the parser for LSL on OpenSim and the Linden Labs implementation of these things). 
One can also take the approach of offloading as much logic to an external application as possible and using the 
environment as just a view layer.  I suspect this is the approach that you're considering from your earlier questions.

>

> Also links to useful information about the related topics would help me a lot.
>
> Thanks for any hint in advance!
>
> Best regards,
> Karl Haas
>
>
>
>
>
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users


-- 
Justin Clark-Casey (justincc)
http://justincc.org/blog
http://twitter.com/justincc



More information about the Opensim-users mailing list